generated-configure.sh revision 625:28071e4ca1de
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
786BDEPS_FTP
787BDEPS_UNZIP
788OS_VERSION_MICRO
789OS_VERSION_MINOR
790OS_VERSION_MAJOR
791PKG_CONFIG
792TIME
793STAT
794HG
795READELF
796OTOOL
797LDD
798ZIP
799UNZIP
800FIND_DELETE
801MAKE
802CHECK_TOOLSDIR_MAKE
803CHECK_TOOLSDIR_GMAKE
804CHECK_MAKE
805CHECK_GMAKE
806PKGHANDLER
807OUTPUT_ROOT
808CONF_NAME
809SPEC
810BUILD_VARIANT_RELEASE
811DEBUG_CLASSFILES
812FASTDEBUG
813VARIANT
814DEBUG_LEVEL
815MACOSX_UNIVERSAL
816JVM_VARIANT_ZEROSHARK
817JVM_VARIANT_ZERO
818JVM_VARIANT_KERNEL
819JVM_VARIANT_MINIMAL1
820JVM_VARIANT_CLIENT
821JVM_VARIANT_SERVER
822JVM_VARIANTS
823JDK_VARIANT
824SET_OPENJDK
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
965enable_openjdk_only
966with_jdk_variant
967with_jvm_variants
968enable_debug
969with_debug_level
970with_conf_name
971with_builddeps_conf
972with_builddeps_server
973with_builddeps_dir
974with_builddeps_group
975enable_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-openjdk-only   suppress building custom source even if present
1661                          [disabled]
1662  --enable-debug          set the debug level to fastdebug (shorthand for
1663                          --with-debug-level=fastdebug) [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#
2940# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2941# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2942#
2943# This code is free software; you can redistribute it and/or modify it
2944# under the terms of the GNU General Public License version 2 only, as
2945# published by the Free Software Foundation.  Oracle designates this
2946# particular file as subject to the "Classpath" exception as provided
2947# by Oracle in the LICENSE file that accompanied this code.
2948#
2949# This code is distributed in the hope that it will be useful, but WITHOUT
2950# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2951# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2952# version 2 for more details (a copy is included in the LICENSE file that
2953# accompanied this code).
2954#
2955# You should have received a copy of the GNU General Public License version
2956# 2 along with this work; if not, write to the Free Software Foundation,
2957# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2958#
2959# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2960# or visit www.oracle.com if you need additional information or have any
2961# questions.
2962#
2963
2964#
2965# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2966#
2967# This program is free software; you can redistribute it and/or modify
2968# it under the terms of the GNU General Public License as published by
2969# the Free Software Foundation; either version 2 of the License, or
2970# (at your option) any later version.
2971#
2972# This program is distributed in the hope that it will be useful, but
2973# WITHOUT ANY WARRANTY; without even the implied warranty of
2974# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2975# General Public License for more details.
2976#
2977# You should have received a copy of the GNU General Public License
2978# along with this program; if not, write to the Free Software
2979# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2980#
2981# As a special exception to the GNU General Public License, if you
2982# distribute this file as part of a program that contains a
2983# configuration script generated by Autoconf, you may include it under
2984# the same distribution terms that you use for the rest of that program.
2985
2986# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2987# ----------------------------------
2988# PKG_PROG_PKG_CONFIG
2989
2990# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2991#
2992# Check to see whether a particular set of modules exists.  Similar
2993# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2994#
2995#
2996# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2997# this or PKG_CHECK_MODULES is called, or make sure to call
2998# PKG_CHECK_EXISTS manually
2999# --------------------------------------------------------------
3000
3001
3002
3003# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3004# ---------------------------------------------
3005# _PKG_CONFIG
3006
3007# _PKG_SHORT_ERRORS_SUPPORTED
3008# -----------------------------
3009# _PKG_SHORT_ERRORS_SUPPORTED
3010
3011
3012# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3013# [ACTION-IF-NOT-FOUND])
3014#
3015#
3016# Note that if there is a possibility the first call to
3017# PKG_CHECK_MODULES might not happen, you should be sure to include an
3018# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3019#
3020#
3021# --------------------------------------------------------------
3022# PKG_CHECK_MODULES
3023
3024
3025# Include these first...
3026#
3027# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3028# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3029#
3030# This code is free software; you can redistribute it and/or modify it
3031# under the terms of the GNU General Public License version 2 only, as
3032# published by the Free Software Foundation.  Oracle designates this
3033# particular file as subject to the "Classpath" exception as provided
3034# by Oracle in the LICENSE file that accompanied this code.
3035#
3036# This code is distributed in the hope that it will be useful, but WITHOUT
3037# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3038# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3039# version 2 for more details (a copy is included in the LICENSE file that
3040# accompanied this code).
3041#
3042# You should have received a copy of the GNU General Public License version
3043# 2 along with this work; if not, write to the Free Software Foundation,
3044# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3045#
3046# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3047# or visit www.oracle.com if you need additional information or have any
3048# questions.
3049#
3050
3051
3052
3053# This will make sure the given variable points to a full and proper
3054# path. This means:
3055# 1) There will be no spaces in the path. On posix platforms,
3056#    spaces in the path will result in an error. On Windows,
3057#    the path will be rewritten using short-style to be space-free.
3058# 2) The path will be absolute, and it will be in unix-style (on
3059#     cygwin).
3060# $1: The name of the variable to fix
3061
3062
3063# This will make sure the given variable points to a executable
3064# with a full and proper path. This means:
3065# 1) There will be no spaces in the path. On posix platforms,
3066#    spaces in the path will result in an error. On Windows,
3067#    the path will be rewritten using short-style to be space-free.
3068# 2) The path will be absolute, and it will be in unix-style (on
3069#     cygwin).
3070# Any arguments given to the executable is preserved.
3071# If the input variable does not have a directory specification, then
3072# it need to be in the PATH.
3073# $1: The name of the variable to fix
3074
3075
3076
3077
3078
3079
3080# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3081# $1: variable to check
3082# $2: executable name to print in warning (optional)
3083
3084
3085# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3086# Arguments as AC_PATH_PROG:
3087# $1: variable to set
3088# $2: executable name to look for
3089
3090
3091# Setup the most fundamental tools that relies on not much else to set up,
3092# but is used by much of the early bootstrap code.
3093
3094
3095# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3096
3097
3098
3099
3100
3101
3102
3103#%%% Simple tools %%%
3104
3105# Check if we have found a usable version of make
3106# $1: the path to a potential make binary (or empty)
3107# $2: the description on how we found this
3108
3109
3110# Goes looking for a usable version of GNU make.
3111
3112
3113
3114
3115
3116
3117# Check if build directory is on local disk. If not possible to determine,
3118# we prefer to claim it's local.
3119# Argument 1: directory to test
3120# Argument 2: what to do if it is on local disk
3121# Argument 3: what to do otherwise (remote disk or failure)
3122
3123
3124# Check that source files have basic read permissions set. This might
3125# not be the case in cygwin in certain conditions.
3126
3127
3128
3129
3130#
3131# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3132# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3133#
3134# This code is free software; you can redistribute it and/or modify it
3135# under the terms of the GNU General Public License version 2 only, as
3136# published by the Free Software Foundation.  Oracle designates this
3137# particular file as subject to the "Classpath" exception as provided
3138# by Oracle in the LICENSE file that accompanied this code.
3139#
3140# This code is distributed in the hope that it will be useful, but WITHOUT
3141# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3142# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3143# version 2 for more details (a copy is included in the LICENSE file that
3144# accompanied this code).
3145#
3146# You should have received a copy of the GNU General Public License version
3147# 2 along with this work; if not, write to the Free Software Foundation,
3148# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3149#
3150# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3151# or visit www.oracle.com if you need additional information or have any
3152# questions.
3153#
3154
3155
3156
3157
3158
3159# Helper function which possibly converts a path using DOS-style short mode.
3160# If so, the updated path is stored in $new_path.
3161# $1: The path to check
3162
3163
3164# Helper function which possibly converts a path using DOS-style short mode.
3165# If so, the updated path is stored in $new_path.
3166# $1: The path to check
3167
3168
3169# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3170# and could probably be heavily simplified. However, all changes in this
3171# area tend to need lot of testing in different scenarios, and in lack of
3172# proper unit testing, cleaning this up has not been deemed worth the effort
3173# at the moment.
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3184
3185
3186
3187
3188#
3189# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3190# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3191#
3192# This code is free software; you can redistribute it and/or modify it
3193# under the terms of the GNU General Public License version 2 only, as
3194# published by the Free Software Foundation.  Oracle designates this
3195# particular file as subject to the "Classpath" exception as provided
3196# by Oracle in the LICENSE file that accompanied this code.
3197#
3198# This code is distributed in the hope that it will be useful, but WITHOUT
3199# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3200# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3201# version 2 for more details (a copy is included in the LICENSE file that
3202# accompanied this code).
3203#
3204# You should have received a copy of the GNU General Public License version
3205# 2 along with this work; if not, write to the Free Software Foundation,
3206# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3207#
3208# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3209# or visit www.oracle.com if you need additional information or have any
3210# questions.
3211#
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223# ... then the rest
3224#
3225# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3226# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3227#
3228# This code is free software; you can redistribute it and/or modify it
3229# under the terms of the GNU General Public License version 2 only, as
3230# published by the Free Software Foundation.  Oracle designates this
3231# particular file as subject to the "Classpath" exception as provided
3232# by Oracle in the LICENSE file that accompanied this code.
3233#
3234# This code is distributed in the hope that it will be useful, but WITHOUT
3235# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3236# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3237# version 2 for more details (a copy is included in the LICENSE file that
3238# accompanied this code).
3239#
3240# You should have received a copy of the GNU General Public License version
3241# 2 along with this work; if not, write to the Free Software Foundation,
3242# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3243#
3244# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3245# or visit www.oracle.com if you need additional information or have any
3246# questions.
3247#
3248
3249# Execute the check given as argument, and verify the result
3250# If the Boot JDK was previously found, do nothing
3251# $1 A command line (typically autoconf macro) to execute
3252
3253
3254# Test: Is bootjdk explicitely set by command line arguments?
3255
3256
3257# Test: Is bootjdk available from builddeps?
3258
3259
3260# Test: Is $JAVA_HOME set?
3261
3262
3263# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3264
3265
3266# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3267
3268
3269# Look for a jdk in the given path. If there are multiple, try to select the newest.
3270# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3271# $1 = Path to directory containing jdk installations.
3272# $2 = String to append to the found JDK directory to get the proper JDK home
3273
3274
3275# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3276# environmental variable as base for where to look.
3277# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3278
3279
3280# Test: Is there a JDK installed in default, well-known locations?
3281
3282
3283# Check that a command-line tool in the Boot JDK is correct
3284# $1 = name of variable to assign
3285# $2 = name of binary
3286
3287
3288###############################################################################
3289#
3290# We need a Boot JDK to bootstrap the build.
3291#
3292
3293
3294
3295
3296
3297#
3298# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3299# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3300#
3301# This code is free software; you can redistribute it and/or modify it
3302# under the terms of the GNU General Public License version 2 only, as
3303# published by the Free Software Foundation.  Oracle designates this
3304# particular file as subject to the "Classpath" exception as provided
3305# by Oracle in the LICENSE file that accompanied this code.
3306#
3307# This code is distributed in the hope that it will be useful, but WITHOUT
3308# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3309# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3310# version 2 for more details (a copy is included in the LICENSE file that
3311# accompanied this code).
3312#
3313# You should have received a copy of the GNU General Public License version
3314# 2 along with this work; if not, write to the Free Software Foundation,
3315# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3316#
3317# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3318# or visit www.oracle.com if you need additional information or have any
3319# questions.
3320#
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339#
3340# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3341# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3342#
3343# This code is free software; you can redistribute it and/or modify it
3344# under the terms of the GNU General Public License version 2 only, as
3345# published by the Free Software Foundation.  Oracle designates this
3346# particular file as subject to the "Classpath" exception as provided
3347# by Oracle in the LICENSE file that accompanied this code.
3348#
3349# This code is distributed in the hope that it will be useful, but WITHOUT
3350# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3351# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3352# version 2 for more details (a copy is included in the LICENSE file that
3353# accompanied this code).
3354#
3355# You should have received a copy of the GNU General Public License version
3356# 2 along with this work; if not, write to the Free Software Foundation,
3357# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3358#
3359# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3360# or visit www.oracle.com if you need additional information or have any
3361# questions.
3362#
3363
3364
3365
3366
3367
3368cygwin_help() {
3369    case $1 in
3370    unzip)
3371        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3372    zip)
3373        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3374    make)
3375        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3376    * )
3377       break ;;
3378    esac
3379}
3380
3381apt_help() {
3382    case $1 in
3383    devkit)
3384        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3385    openjdk)
3386        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3387    alsa)
3388        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3389    cups)
3390        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3391    freetype2)
3392        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3393    pulse)
3394        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3395    x11)
3396        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3397    ccache)
3398        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3399    * )
3400       break ;;
3401    esac
3402}
3403
3404yum_help() {
3405    case $1 in
3406    devkit)
3407        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3408    openjdk)
3409        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3410    alsa)
3411        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3412    cups)
3413        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3414    freetype2)
3415        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3416    pulse)
3417        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3418    x11)
3419        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3420    ccache)
3421        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3422    * )
3423       break ;;
3424    esac
3425}
3426
3427port_help() {
3428    PKGHANDLER_COMMAND=""
3429}
3430
3431pkgutil_help() {
3432    PKGHANDLER_COMMAND=""
3433}
3434
3435pkgadd_help() {
3436    PKGHANDLER_COMMAND=""
3437}
3438
3439
3440
3441#
3442# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3443# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3444#
3445# This code is free software; you can redistribute it and/or modify it
3446# under the terms of the GNU General Public License version 2 only, as
3447# published by the Free Software Foundation.  Oracle designates this
3448# particular file as subject to the "Classpath" exception as provided
3449# by Oracle in the LICENSE file that accompanied this code.
3450#
3451# This code is distributed in the hope that it will be useful, but WITHOUT
3452# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3453# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3454# version 2 for more details (a copy is included in the LICENSE file that
3455# accompanied this code).
3456#
3457# You should have received a copy of the GNU General Public License version
3458# 2 along with this work; if not, write to the Free Software Foundation,
3459# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3460#
3461# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3462# or visit www.oracle.com if you need additional information or have any
3463# questions.
3464#
3465
3466
3467
3468
3469
3470
3471
3472
3473###############################################################################
3474#
3475# Should we build only OpenJDK even if closed sources are present?
3476#
3477
3478
3479
3480
3481###############################################################################
3482#
3483# Setup version numbers
3484#
3485
3486
3487
3488
3489
3490
3491# Support for customization of the build process. Some build files
3492# will include counterparts from this location, if they exist. This allows
3493# for a degree of customization of the build targets and the rules/recipes
3494# to create them
3495
3496# Check whether --with-custom-make-dir was given.
3497if test "${with_custom_make_dir+set}" = set; then :
3498  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3499fi
3500
3501
3502
3503#
3504# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3506#
3507# This code is free software; you can redistribute it and/or modify it
3508# under the terms of the GNU General Public License version 2 only, as
3509# published by the Free Software Foundation.  Oracle designates this
3510# particular file as subject to the "Classpath" exception as provided
3511# by Oracle in the LICENSE file that accompanied this code.
3512#
3513# This code is distributed in the hope that it will be useful, but WITHOUT
3514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3516# version 2 for more details (a copy is included in the LICENSE file that
3517# accompanied this code).
3518#
3519# You should have received a copy of the GNU General Public License version
3520# 2 along with this work; if not, write to the Free Software Foundation,
3521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3522#
3523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3524# or visit www.oracle.com if you need additional information or have any
3525# questions.
3526#
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542#
3543# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3544# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3545#
3546# This code is free software; you can redistribute it and/or modify it
3547# under the terms of the GNU General Public License version 2 only, as
3548# published by the Free Software Foundation.  Oracle designates this
3549# particular file as subject to the "Classpath" exception as provided
3550# by Oracle in the LICENSE file that accompanied this code.
3551#
3552# This code is distributed in the hope that it will be useful, but WITHOUT
3553# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3554# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3555# version 2 for more details (a copy is included in the LICENSE file that
3556# accompanied this code).
3557#
3558# You should have received a copy of the GNU General Public License version
3559# 2 along with this work; if not, write to the Free Software Foundation,
3560# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3561#
3562# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3563# or visit www.oracle.com if you need additional information or have any
3564# questions.
3565#
3566
3567# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3568# Converts autoconf style CPU name to OpenJDK style, into
3569# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3570
3571
3572# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3573# Converts autoconf style OS name to OpenJDK style, into
3574# VAR_OS and VAR_OS_API.
3575
3576
3577# Expects $host_os $host_cpu $build_os and $build_cpu
3578# and $with_target_bits to have been setup!
3579#
3580# Translate the standard triplet(quadruplet) definition
3581# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3582# OPENJDK_BUILD_OS, etc.
3583
3584
3585# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3586# accordingly. Must be done after setting up build and target system, but before
3587# doing anything else with these values.
3588
3589
3590    # Setup the legacy variables, for controlling the old makefiles.
3591    #
3592
3593
3594
3595
3596#%%% Build and target systems %%%
3597
3598
3599
3600
3601# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3602# Add -mX to various FLAGS variables.
3603
3604
3605
3606
3607
3608
3609#
3610# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3611# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3612#
3613# This code is free software; you can redistribute it and/or modify it
3614# under the terms of the GNU General Public License version 2 only, as
3615# published by the Free Software Foundation.  Oracle designates this
3616# particular file as subject to the "Classpath" exception as provided
3617# by Oracle in the LICENSE file that accompanied this code.
3618#
3619# This code is distributed in the hope that it will be useful, but WITHOUT
3620# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3621# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3622# version 2 for more details (a copy is included in the LICENSE file that
3623# accompanied this code).
3624#
3625# You should have received a copy of the GNU General Public License version
3626# 2 along with this work; if not, write to the Free Software Foundation,
3627# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3628#
3629# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3630# or visit www.oracle.com if you need additional information or have any
3631# questions.
3632#
3633
3634
3635
3636
3637
3638
3639
3640
3641#
3642# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3643# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3644#
3645# This code is free software; you can redistribute it and/or modify it
3646# under the terms of the GNU General Public License version 2 only, as
3647# published by the Free Software Foundation.  Oracle designates this
3648# particular file as subject to the "Classpath" exception as provided
3649# by Oracle in the LICENSE file that accompanied this code.
3650#
3651# This code is distributed in the hope that it will be useful, but WITHOUT
3652# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3653# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3654# version 2 for more details (a copy is included in the LICENSE file that
3655# accompanied this code).
3656#
3657# You should have received a copy of the GNU General Public License version
3658# 2 along with this work; if not, write to the Free Software Foundation,
3659# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3660#
3661# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3662# or visit www.oracle.com if you need additional information or have any
3663# questions.
3664#
3665
3666# $1 = compiler to test (CC or CXX)
3667# $2 = human readable name of compiler (C or C++)
3668
3669
3670
3671
3672
3673# $1 = compiler to test (CC or CXX)
3674# $2 = human readable name of compiler (C or C++)
3675# $3 = list of compiler names to search for
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688#
3689# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3690# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3691#
3692# This code is free software; you can redistribute it and/or modify it
3693# under the terms of the GNU General Public License version 2 only, as
3694# published by the Free Software Foundation.  Oracle designates this
3695# particular file as subject to the "Classpath" exception as provided
3696# by Oracle in the LICENSE file that accompanied this code.
3697#
3698# This code is distributed in the hope that it will be useful, but WITHOUT
3699# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3700# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3701# version 2 for more details (a copy is included in the LICENSE file that
3702# accompanied this code).
3703#
3704# You should have received a copy of the GNU General Public License version
3705# 2 along with this work; if not, write to the Free Software Foundation,
3706# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3707#
3708# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3709# or visit www.oracle.com if you need additional information or have any
3710# questions.
3711#
3712
3713
3714
3715
3716
3717
3718
3719# Check if the VS env variables were setup prior to running configure.
3720# If not, then find vcvarsall.bat and run it automatically, and integrate
3721# the set env variables into the spec file.
3722
3723
3724
3725
3726
3727
3728# This line needs to be here, verbatim, after all includes and the dummy hook
3729# definitions. It is replaced with custom functionality when building
3730# custom sources.
3731#CUSTOM_AUTOCONF_INCLUDE
3732
3733# Do not change or remove the following line, it is needed for consistency checks:
3734DATE_WHEN_GENERATED=1361137039
3735
3736###############################################################################
3737#
3738# Initialization / Boot-strapping
3739#
3740# The bootstrapping process needs to solve the "chicken or the egg" problem,
3741# thus it jumps back and forth, each time gaining something needed later on.
3742#
3743###############################################################################
3744
3745# Basic initialization that must happen first of all
3746
3747# Save the original command line. This is passed to us by the wrapper configure script.
3748
3749DATE_WHEN_CONFIGURED=`LANG=C date`
3750
3751{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3752$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3753{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3754$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3755
3756
3757
3758# Start with tools that do not need have cross compilation support
3759# and can be expected to be found in the default PATH. These tools are
3760# used by configure. Nor are these tools expected to be found in the
3761# devkit from the builddeps server either, since they are
3762# needed to download the devkit.
3763
3764# First are all the simple required tools.
3765
3766    for ac_prog in basename
3767do
3768  # Extract the first word of "$ac_prog", so it can be a program name with args.
3769set dummy $ac_prog; ac_word=$2
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
3772if ${ac_cv_path_BASENAME+:} false; then :
3773  $as_echo_n "(cached) " >&6
3774else
3775  case $BASENAME in
3776  [\\/]* | ?:[\\/]*)
3777  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3778  ;;
3779  *)
3780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783  IFS=$as_save_IFS
3784  test -z "$as_dir" && as_dir=.
3785    for ac_exec_ext in '' $ac_executable_extensions; do
3786  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3787    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3789    break 2
3790  fi
3791done
3792  done
3793IFS=$as_save_IFS
3794
3795  ;;
3796esac
3797fi
3798BASENAME=$ac_cv_path_BASENAME
3799if test -n "$BASENAME"; then
3800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3801$as_echo "$BASENAME" >&6; }
3802else
3803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
3805fi
3806
3807
3808  test -n "$BASENAME" && break
3809done
3810
3811
3812    if test "x$BASENAME" = x; then
3813        if test "xbasename" = x; then
3814          PROG_NAME=basename
3815        else
3816          PROG_NAME=basename
3817        fi
3818        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3819$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3820        as_fn_error $? "Cannot continue" "$LINENO" 5
3821    fi
3822
3823
3824
3825    for ac_prog in bash
3826do
3827  # Extract the first word of "$ac_prog", so it can be a program name with args.
3828set dummy $ac_prog; ac_word=$2
3829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3830$as_echo_n "checking for $ac_word... " >&6; }
3831if ${ac_cv_path_BASH+:} false; then :
3832  $as_echo_n "(cached) " >&6
3833else
3834  case $BASH in
3835  [\\/]* | ?:[\\/]*)
3836  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3837  ;;
3838  *)
3839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3840for as_dir in $PATH
3841do
3842  IFS=$as_save_IFS
3843  test -z "$as_dir" && as_dir=.
3844    for ac_exec_ext in '' $ac_executable_extensions; do
3845  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3846    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3848    break 2
3849  fi
3850done
3851  done
3852IFS=$as_save_IFS
3853
3854  ;;
3855esac
3856fi
3857BASH=$ac_cv_path_BASH
3858if test -n "$BASH"; then
3859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3860$as_echo "$BASH" >&6; }
3861else
3862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3863$as_echo "no" >&6; }
3864fi
3865
3866
3867  test -n "$BASH" && break
3868done
3869
3870
3871    if test "x$BASH" = x; then
3872        if test "xbash" = x; then
3873          PROG_NAME=bash
3874        else
3875          PROG_NAME=bash
3876        fi
3877        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3878$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3879        as_fn_error $? "Cannot continue" "$LINENO" 5
3880    fi
3881
3882
3883
3884    for ac_prog in cat
3885do
3886  # Extract the first word of "$ac_prog", so it can be a program name with args.
3887set dummy $ac_prog; ac_word=$2
3888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3889$as_echo_n "checking for $ac_word... " >&6; }
3890if ${ac_cv_path_CAT+:} false; then :
3891  $as_echo_n "(cached) " >&6
3892else
3893  case $CAT in
3894  [\\/]* | ?:[\\/]*)
3895  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3896  ;;
3897  *)
3898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3899for as_dir in $PATH
3900do
3901  IFS=$as_save_IFS
3902  test -z "$as_dir" && as_dir=.
3903    for ac_exec_ext in '' $ac_executable_extensions; do
3904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3905    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3907    break 2
3908  fi
3909done
3910  done
3911IFS=$as_save_IFS
3912
3913  ;;
3914esac
3915fi
3916CAT=$ac_cv_path_CAT
3917if test -n "$CAT"; then
3918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3919$as_echo "$CAT" >&6; }
3920else
3921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922$as_echo "no" >&6; }
3923fi
3924
3925
3926  test -n "$CAT" && break
3927done
3928
3929
3930    if test "x$CAT" = x; then
3931        if test "xcat" = x; then
3932          PROG_NAME=cat
3933        else
3934          PROG_NAME=cat
3935        fi
3936        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3937$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3938        as_fn_error $? "Cannot continue" "$LINENO" 5
3939    fi
3940
3941
3942
3943    for ac_prog in chmod
3944do
3945  # Extract the first word of "$ac_prog", so it can be a program name with args.
3946set dummy $ac_prog; ac_word=$2
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3948$as_echo_n "checking for $ac_word... " >&6; }
3949if ${ac_cv_path_CHMOD+:} false; then :
3950  $as_echo_n "(cached) " >&6
3951else
3952  case $CHMOD in
3953  [\\/]* | ?:[\\/]*)
3954  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3955  ;;
3956  *)
3957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3958for as_dir in $PATH
3959do
3960  IFS=$as_save_IFS
3961  test -z "$as_dir" && as_dir=.
3962    for ac_exec_ext in '' $ac_executable_extensions; do
3963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3964    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3966    break 2
3967  fi
3968done
3969  done
3970IFS=$as_save_IFS
3971
3972  ;;
3973esac
3974fi
3975CHMOD=$ac_cv_path_CHMOD
3976if test -n "$CHMOD"; then
3977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3978$as_echo "$CHMOD" >&6; }
3979else
3980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3981$as_echo "no" >&6; }
3982fi
3983
3984
3985  test -n "$CHMOD" && break
3986done
3987
3988
3989    if test "x$CHMOD" = x; then
3990        if test "xchmod" = x; then
3991          PROG_NAME=chmod
3992        else
3993          PROG_NAME=chmod
3994        fi
3995        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3996$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3997        as_fn_error $? "Cannot continue" "$LINENO" 5
3998    fi
3999
4000
4001
4002    for ac_prog in cmp
4003do
4004  # Extract the first word of "$ac_prog", so it can be a program name with args.
4005set dummy $ac_prog; ac_word=$2
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4007$as_echo_n "checking for $ac_word... " >&6; }
4008if ${ac_cv_path_CMP+:} false; then :
4009  $as_echo_n "(cached) " >&6
4010else
4011  case $CMP in
4012  [\\/]* | ?:[\\/]*)
4013  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4014  ;;
4015  *)
4016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4017for as_dir in $PATH
4018do
4019  IFS=$as_save_IFS
4020  test -z "$as_dir" && as_dir=.
4021    for ac_exec_ext in '' $ac_executable_extensions; do
4022  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4023    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4025    break 2
4026  fi
4027done
4028  done
4029IFS=$as_save_IFS
4030
4031  ;;
4032esac
4033fi
4034CMP=$ac_cv_path_CMP
4035if test -n "$CMP"; then
4036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4037$as_echo "$CMP" >&6; }
4038else
4039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4040$as_echo "no" >&6; }
4041fi
4042
4043
4044  test -n "$CMP" && break
4045done
4046
4047
4048    if test "x$CMP" = x; then
4049        if test "xcmp" = x; then
4050          PROG_NAME=cmp
4051        else
4052          PROG_NAME=cmp
4053        fi
4054        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4055$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4056        as_fn_error $? "Cannot continue" "$LINENO" 5
4057    fi
4058
4059
4060
4061    for ac_prog in comm
4062do
4063  # Extract the first word of "$ac_prog", so it can be a program name with args.
4064set dummy $ac_prog; ac_word=$2
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4066$as_echo_n "checking for $ac_word... " >&6; }
4067if ${ac_cv_path_COMM+:} false; then :
4068  $as_echo_n "(cached) " >&6
4069else
4070  case $COMM in
4071  [\\/]* | ?:[\\/]*)
4072  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4073  ;;
4074  *)
4075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076for as_dir in $PATH
4077do
4078  IFS=$as_save_IFS
4079  test -z "$as_dir" && as_dir=.
4080    for ac_exec_ext in '' $ac_executable_extensions; do
4081  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4082    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4084    break 2
4085  fi
4086done
4087  done
4088IFS=$as_save_IFS
4089
4090  ;;
4091esac
4092fi
4093COMM=$ac_cv_path_COMM
4094if test -n "$COMM"; then
4095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4096$as_echo "$COMM" >&6; }
4097else
4098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4099$as_echo "no" >&6; }
4100fi
4101
4102
4103  test -n "$COMM" && break
4104done
4105
4106
4107    if test "x$COMM" = x; then
4108        if test "xcomm" = x; then
4109          PROG_NAME=comm
4110        else
4111          PROG_NAME=comm
4112        fi
4113        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4114$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4115        as_fn_error $? "Cannot continue" "$LINENO" 5
4116    fi
4117
4118
4119
4120    for ac_prog in cp
4121do
4122  # Extract the first word of "$ac_prog", so it can be a program name with args.
4123set dummy $ac_prog; ac_word=$2
4124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4125$as_echo_n "checking for $ac_word... " >&6; }
4126if ${ac_cv_path_CP+:} false; then :
4127  $as_echo_n "(cached) " >&6
4128else
4129  case $CP in
4130  [\\/]* | ?:[\\/]*)
4131  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4132  ;;
4133  *)
4134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4135for as_dir in $PATH
4136do
4137  IFS=$as_save_IFS
4138  test -z "$as_dir" && as_dir=.
4139    for ac_exec_ext in '' $ac_executable_extensions; do
4140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4141    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4143    break 2
4144  fi
4145done
4146  done
4147IFS=$as_save_IFS
4148
4149  ;;
4150esac
4151fi
4152CP=$ac_cv_path_CP
4153if test -n "$CP"; then
4154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4155$as_echo "$CP" >&6; }
4156else
4157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4158$as_echo "no" >&6; }
4159fi
4160
4161
4162  test -n "$CP" && break
4163done
4164
4165
4166    if test "x$CP" = x; then
4167        if test "xcp" = x; then
4168          PROG_NAME=cp
4169        else
4170          PROG_NAME=cp
4171        fi
4172        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4173$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4174        as_fn_error $? "Cannot continue" "$LINENO" 5
4175    fi
4176
4177
4178
4179    for ac_prog in cpio
4180do
4181  # Extract the first word of "$ac_prog", so it can be a program name with args.
4182set dummy $ac_prog; ac_word=$2
4183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4184$as_echo_n "checking for $ac_word... " >&6; }
4185if ${ac_cv_path_CPIO+:} false; then :
4186  $as_echo_n "(cached) " >&6
4187else
4188  case $CPIO in
4189  [\\/]* | ?:[\\/]*)
4190  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4191  ;;
4192  *)
4193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4194for as_dir in $PATH
4195do
4196  IFS=$as_save_IFS
4197  test -z "$as_dir" && as_dir=.
4198    for ac_exec_ext in '' $ac_executable_extensions; do
4199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4200    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4202    break 2
4203  fi
4204done
4205  done
4206IFS=$as_save_IFS
4207
4208  ;;
4209esac
4210fi
4211CPIO=$ac_cv_path_CPIO
4212if test -n "$CPIO"; then
4213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4214$as_echo "$CPIO" >&6; }
4215else
4216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4217$as_echo "no" >&6; }
4218fi
4219
4220
4221  test -n "$CPIO" && break
4222done
4223
4224
4225    if test "x$CPIO" = x; then
4226        if test "xcpio" = x; then
4227          PROG_NAME=cpio
4228        else
4229          PROG_NAME=cpio
4230        fi
4231        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4232$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4233        as_fn_error $? "Cannot continue" "$LINENO" 5
4234    fi
4235
4236
4237
4238    for ac_prog in cut
4239do
4240  # Extract the first word of "$ac_prog", so it can be a program name with args.
4241set dummy $ac_prog; ac_word=$2
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4243$as_echo_n "checking for $ac_word... " >&6; }
4244if ${ac_cv_path_CUT+:} false; then :
4245  $as_echo_n "(cached) " >&6
4246else
4247  case $CUT in
4248  [\\/]* | ?:[\\/]*)
4249  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4250  ;;
4251  *)
4252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4253for as_dir in $PATH
4254do
4255  IFS=$as_save_IFS
4256  test -z "$as_dir" && as_dir=.
4257    for ac_exec_ext in '' $ac_executable_extensions; do
4258  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4259    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4261    break 2
4262  fi
4263done
4264  done
4265IFS=$as_save_IFS
4266
4267  ;;
4268esac
4269fi
4270CUT=$ac_cv_path_CUT
4271if test -n "$CUT"; then
4272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4273$as_echo "$CUT" >&6; }
4274else
4275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4276$as_echo "no" >&6; }
4277fi
4278
4279
4280  test -n "$CUT" && break
4281done
4282
4283
4284    if test "x$CUT" = x; then
4285        if test "xcut" = x; then
4286          PROG_NAME=cut
4287        else
4288          PROG_NAME=cut
4289        fi
4290        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4291$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4292        as_fn_error $? "Cannot continue" "$LINENO" 5
4293    fi
4294
4295
4296
4297    for ac_prog in date
4298do
4299  # Extract the first word of "$ac_prog", so it can be a program name with args.
4300set dummy $ac_prog; ac_word=$2
4301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4302$as_echo_n "checking for $ac_word... " >&6; }
4303if ${ac_cv_path_DATE+:} false; then :
4304  $as_echo_n "(cached) " >&6
4305else
4306  case $DATE in
4307  [\\/]* | ?:[\\/]*)
4308  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4309  ;;
4310  *)
4311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4312for as_dir in $PATH
4313do
4314  IFS=$as_save_IFS
4315  test -z "$as_dir" && as_dir=.
4316    for ac_exec_ext in '' $ac_executable_extensions; do
4317  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4318    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4320    break 2
4321  fi
4322done
4323  done
4324IFS=$as_save_IFS
4325
4326  ;;
4327esac
4328fi
4329DATE=$ac_cv_path_DATE
4330if test -n "$DATE"; then
4331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4332$as_echo "$DATE" >&6; }
4333else
4334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4335$as_echo "no" >&6; }
4336fi
4337
4338
4339  test -n "$DATE" && break
4340done
4341
4342
4343    if test "x$DATE" = x; then
4344        if test "xdate" = x; then
4345          PROG_NAME=date
4346        else
4347          PROG_NAME=date
4348        fi
4349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4350$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4351        as_fn_error $? "Cannot continue" "$LINENO" 5
4352    fi
4353
4354
4355
4356    for ac_prog in gdiff diff
4357do
4358  # Extract the first word of "$ac_prog", so it can be a program name with args.
4359set dummy $ac_prog; ac_word=$2
4360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4361$as_echo_n "checking for $ac_word... " >&6; }
4362if ${ac_cv_path_DIFF+:} false; then :
4363  $as_echo_n "(cached) " >&6
4364else
4365  case $DIFF in
4366  [\\/]* | ?:[\\/]*)
4367  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4368  ;;
4369  *)
4370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4371for as_dir in $PATH
4372do
4373  IFS=$as_save_IFS
4374  test -z "$as_dir" && as_dir=.
4375    for ac_exec_ext in '' $ac_executable_extensions; do
4376  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4377    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4379    break 2
4380  fi
4381done
4382  done
4383IFS=$as_save_IFS
4384
4385  ;;
4386esac
4387fi
4388DIFF=$ac_cv_path_DIFF
4389if test -n "$DIFF"; then
4390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4391$as_echo "$DIFF" >&6; }
4392else
4393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4394$as_echo "no" >&6; }
4395fi
4396
4397
4398  test -n "$DIFF" && break
4399done
4400
4401
4402    if test "x$DIFF" = x; then
4403        if test "xgdiff diff" = x; then
4404          PROG_NAME=diff
4405        else
4406          PROG_NAME=gdiff diff
4407        fi
4408        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4409$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4410        as_fn_error $? "Cannot continue" "$LINENO" 5
4411    fi
4412
4413
4414
4415    for ac_prog in dirname
4416do
4417  # Extract the first word of "$ac_prog", so it can be a program name with args.
4418set dummy $ac_prog; ac_word=$2
4419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4420$as_echo_n "checking for $ac_word... " >&6; }
4421if ${ac_cv_path_DIRNAME+:} false; then :
4422  $as_echo_n "(cached) " >&6
4423else
4424  case $DIRNAME in
4425  [\\/]* | ?:[\\/]*)
4426  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4427  ;;
4428  *)
4429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4430for as_dir in $PATH
4431do
4432  IFS=$as_save_IFS
4433  test -z "$as_dir" && as_dir=.
4434    for ac_exec_ext in '' $ac_executable_extensions; do
4435  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4436    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4438    break 2
4439  fi
4440done
4441  done
4442IFS=$as_save_IFS
4443
4444  ;;
4445esac
4446fi
4447DIRNAME=$ac_cv_path_DIRNAME
4448if test -n "$DIRNAME"; then
4449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4450$as_echo "$DIRNAME" >&6; }
4451else
4452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4453$as_echo "no" >&6; }
4454fi
4455
4456
4457  test -n "$DIRNAME" && break
4458done
4459
4460
4461    if test "x$DIRNAME" = x; then
4462        if test "xdirname" = x; then
4463          PROG_NAME=dirname
4464        else
4465          PROG_NAME=dirname
4466        fi
4467        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4468$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4469        as_fn_error $? "Cannot continue" "$LINENO" 5
4470    fi
4471
4472
4473
4474    for ac_prog in echo
4475do
4476  # Extract the first word of "$ac_prog", so it can be a program name with args.
4477set dummy $ac_prog; ac_word=$2
4478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4479$as_echo_n "checking for $ac_word... " >&6; }
4480if ${ac_cv_path_ECHO+:} false; then :
4481  $as_echo_n "(cached) " >&6
4482else
4483  case $ECHO in
4484  [\\/]* | ?:[\\/]*)
4485  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4486  ;;
4487  *)
4488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4489for as_dir in $PATH
4490do
4491  IFS=$as_save_IFS
4492  test -z "$as_dir" && as_dir=.
4493    for ac_exec_ext in '' $ac_executable_extensions; do
4494  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4495    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4497    break 2
4498  fi
4499done
4500  done
4501IFS=$as_save_IFS
4502
4503  ;;
4504esac
4505fi
4506ECHO=$ac_cv_path_ECHO
4507if test -n "$ECHO"; then
4508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4509$as_echo "$ECHO" >&6; }
4510else
4511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4512$as_echo "no" >&6; }
4513fi
4514
4515
4516  test -n "$ECHO" && break
4517done
4518
4519
4520    if test "x$ECHO" = x; then
4521        if test "xecho" = x; then
4522          PROG_NAME=echo
4523        else
4524          PROG_NAME=echo
4525        fi
4526        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4527$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4528        as_fn_error $? "Cannot continue" "$LINENO" 5
4529    fi
4530
4531
4532
4533    for ac_prog in expr
4534do
4535  # Extract the first word of "$ac_prog", so it can be a program name with args.
4536set dummy $ac_prog; ac_word=$2
4537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4538$as_echo_n "checking for $ac_word... " >&6; }
4539if ${ac_cv_path_EXPR+:} false; then :
4540  $as_echo_n "(cached) " >&6
4541else
4542  case $EXPR in
4543  [\\/]* | ?:[\\/]*)
4544  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4545  ;;
4546  *)
4547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4548for as_dir in $PATH
4549do
4550  IFS=$as_save_IFS
4551  test -z "$as_dir" && as_dir=.
4552    for ac_exec_ext in '' $ac_executable_extensions; do
4553  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4554    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4556    break 2
4557  fi
4558done
4559  done
4560IFS=$as_save_IFS
4561
4562  ;;
4563esac
4564fi
4565EXPR=$ac_cv_path_EXPR
4566if test -n "$EXPR"; then
4567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4568$as_echo "$EXPR" >&6; }
4569else
4570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4571$as_echo "no" >&6; }
4572fi
4573
4574
4575  test -n "$EXPR" && break
4576done
4577
4578
4579    if test "x$EXPR" = x; then
4580        if test "xexpr" = x; then
4581          PROG_NAME=expr
4582        else
4583          PROG_NAME=expr
4584        fi
4585        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4586$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4587        as_fn_error $? "Cannot continue" "$LINENO" 5
4588    fi
4589
4590
4591
4592    for ac_prog in file
4593do
4594  # Extract the first word of "$ac_prog", so it can be a program name with args.
4595set dummy $ac_prog; ac_word=$2
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if ${ac_cv_path_FILE+:} false; then :
4599  $as_echo_n "(cached) " >&6
4600else
4601  case $FILE in
4602  [\\/]* | ?:[\\/]*)
4603  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4604  ;;
4605  *)
4606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609  IFS=$as_save_IFS
4610  test -z "$as_dir" && as_dir=.
4611    for ac_exec_ext in '' $ac_executable_extensions; do
4612  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4613    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615    break 2
4616  fi
4617done
4618  done
4619IFS=$as_save_IFS
4620
4621  ;;
4622esac
4623fi
4624FILE=$ac_cv_path_FILE
4625if test -n "$FILE"; then
4626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4627$as_echo "$FILE" >&6; }
4628else
4629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630$as_echo "no" >&6; }
4631fi
4632
4633
4634  test -n "$FILE" && break
4635done
4636
4637
4638    if test "x$FILE" = x; then
4639        if test "xfile" = x; then
4640          PROG_NAME=file
4641        else
4642          PROG_NAME=file
4643        fi
4644        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4645$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4646        as_fn_error $? "Cannot continue" "$LINENO" 5
4647    fi
4648
4649
4650
4651    for ac_prog in find
4652do
4653  # Extract the first word of "$ac_prog", so it can be a program name with args.
4654set dummy $ac_prog; ac_word=$2
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656$as_echo_n "checking for $ac_word... " >&6; }
4657if ${ac_cv_path_FIND+:} false; then :
4658  $as_echo_n "(cached) " >&6
4659else
4660  case $FIND in
4661  [\\/]* | ?:[\\/]*)
4662  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4663  ;;
4664  *)
4665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4666for as_dir in $PATH
4667do
4668  IFS=$as_save_IFS
4669  test -z "$as_dir" && as_dir=.
4670    for ac_exec_ext in '' $ac_executable_extensions; do
4671  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4672    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4674    break 2
4675  fi
4676done
4677  done
4678IFS=$as_save_IFS
4679
4680  ;;
4681esac
4682fi
4683FIND=$ac_cv_path_FIND
4684if test -n "$FIND"; then
4685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4686$as_echo "$FIND" >&6; }
4687else
4688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4689$as_echo "no" >&6; }
4690fi
4691
4692
4693  test -n "$FIND" && break
4694done
4695
4696
4697    if test "x$FIND" = x; then
4698        if test "xfind" = x; then
4699          PROG_NAME=find
4700        else
4701          PROG_NAME=find
4702        fi
4703        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4704$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4705        as_fn_error $? "Cannot continue" "$LINENO" 5
4706    fi
4707
4708
4709
4710    for ac_prog in head
4711do
4712  # Extract the first word of "$ac_prog", so it can be a program name with args.
4713set dummy $ac_prog; ac_word=$2
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715$as_echo_n "checking for $ac_word... " >&6; }
4716if ${ac_cv_path_HEAD+:} false; then :
4717  $as_echo_n "(cached) " >&6
4718else
4719  case $HEAD in
4720  [\\/]* | ?:[\\/]*)
4721  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4722  ;;
4723  *)
4724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725for as_dir in $PATH
4726do
4727  IFS=$as_save_IFS
4728  test -z "$as_dir" && as_dir=.
4729    for ac_exec_ext in '' $ac_executable_extensions; do
4730  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4731    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733    break 2
4734  fi
4735done
4736  done
4737IFS=$as_save_IFS
4738
4739  ;;
4740esac
4741fi
4742HEAD=$ac_cv_path_HEAD
4743if test -n "$HEAD"; then
4744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4745$as_echo "$HEAD" >&6; }
4746else
4747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4748$as_echo "no" >&6; }
4749fi
4750
4751
4752  test -n "$HEAD" && break
4753done
4754
4755
4756    if test "x$HEAD" = x; then
4757        if test "xhead" = x; then
4758          PROG_NAME=head
4759        else
4760          PROG_NAME=head
4761        fi
4762        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4763$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4764        as_fn_error $? "Cannot continue" "$LINENO" 5
4765    fi
4766
4767
4768
4769    for ac_prog in ln
4770do
4771  # Extract the first word of "$ac_prog", so it can be a program name with args.
4772set dummy $ac_prog; ac_word=$2
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774$as_echo_n "checking for $ac_word... " >&6; }
4775if ${ac_cv_path_LN+:} false; then :
4776  $as_echo_n "(cached) " >&6
4777else
4778  case $LN in
4779  [\\/]* | ?:[\\/]*)
4780  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4781  ;;
4782  *)
4783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784for as_dir in $PATH
4785do
4786  IFS=$as_save_IFS
4787  test -z "$as_dir" && as_dir=.
4788    for ac_exec_ext in '' $ac_executable_extensions; do
4789  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4790    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4792    break 2
4793  fi
4794done
4795  done
4796IFS=$as_save_IFS
4797
4798  ;;
4799esac
4800fi
4801LN=$ac_cv_path_LN
4802if test -n "$LN"; then
4803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4804$as_echo "$LN" >&6; }
4805else
4806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
4808fi
4809
4810
4811  test -n "$LN" && break
4812done
4813
4814
4815    if test "x$LN" = x; then
4816        if test "xln" = x; then
4817          PROG_NAME=ln
4818        else
4819          PROG_NAME=ln
4820        fi
4821        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4822$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4823        as_fn_error $? "Cannot continue" "$LINENO" 5
4824    fi
4825
4826
4827
4828    for ac_prog in ls
4829do
4830  # Extract the first word of "$ac_prog", so it can be a program name with args.
4831set dummy $ac_prog; ac_word=$2
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833$as_echo_n "checking for $ac_word... " >&6; }
4834if ${ac_cv_path_LS+:} false; then :
4835  $as_echo_n "(cached) " >&6
4836else
4837  case $LS in
4838  [\\/]* | ?:[\\/]*)
4839  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4840  ;;
4841  *)
4842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843for as_dir in $PATH
4844do
4845  IFS=$as_save_IFS
4846  test -z "$as_dir" && as_dir=.
4847    for ac_exec_ext in '' $ac_executable_extensions; do
4848  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4849    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4851    break 2
4852  fi
4853done
4854  done
4855IFS=$as_save_IFS
4856
4857  ;;
4858esac
4859fi
4860LS=$ac_cv_path_LS
4861if test -n "$LS"; then
4862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4863$as_echo "$LS" >&6; }
4864else
4865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866$as_echo "no" >&6; }
4867fi
4868
4869
4870  test -n "$LS" && break
4871done
4872
4873
4874    if test "x$LS" = x; then
4875        if test "xls" = x; then
4876          PROG_NAME=ls
4877        else
4878          PROG_NAME=ls
4879        fi
4880        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4881$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4882        as_fn_error $? "Cannot continue" "$LINENO" 5
4883    fi
4884
4885
4886
4887    for ac_prog in mkdir
4888do
4889  # Extract the first word of "$ac_prog", so it can be a program name with args.
4890set dummy $ac_prog; ac_word=$2
4891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4892$as_echo_n "checking for $ac_word... " >&6; }
4893if ${ac_cv_path_MKDIR+:} false; then :
4894  $as_echo_n "(cached) " >&6
4895else
4896  case $MKDIR in
4897  [\\/]* | ?:[\\/]*)
4898  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4899  ;;
4900  *)
4901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4902for as_dir in $PATH
4903do
4904  IFS=$as_save_IFS
4905  test -z "$as_dir" && as_dir=.
4906    for ac_exec_ext in '' $ac_executable_extensions; do
4907  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4908    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4910    break 2
4911  fi
4912done
4913  done
4914IFS=$as_save_IFS
4915
4916  ;;
4917esac
4918fi
4919MKDIR=$ac_cv_path_MKDIR
4920if test -n "$MKDIR"; then
4921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4922$as_echo "$MKDIR" >&6; }
4923else
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4925$as_echo "no" >&6; }
4926fi
4927
4928
4929  test -n "$MKDIR" && break
4930done
4931
4932
4933    if test "x$MKDIR" = x; then
4934        if test "xmkdir" = x; then
4935          PROG_NAME=mkdir
4936        else
4937          PROG_NAME=mkdir
4938        fi
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4940$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4941        as_fn_error $? "Cannot continue" "$LINENO" 5
4942    fi
4943
4944
4945
4946    for ac_prog in mktemp
4947do
4948  # Extract the first word of "$ac_prog", so it can be a program name with args.
4949set dummy $ac_prog; ac_word=$2
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4951$as_echo_n "checking for $ac_word... " >&6; }
4952if ${ac_cv_path_MKTEMP+:} false; then :
4953  $as_echo_n "(cached) " >&6
4954else
4955  case $MKTEMP in
4956  [\\/]* | ?:[\\/]*)
4957  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4958  ;;
4959  *)
4960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961for as_dir in $PATH
4962do
4963  IFS=$as_save_IFS
4964  test -z "$as_dir" && as_dir=.
4965    for ac_exec_ext in '' $ac_executable_extensions; do
4966  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4967    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4969    break 2
4970  fi
4971done
4972  done
4973IFS=$as_save_IFS
4974
4975  ;;
4976esac
4977fi
4978MKTEMP=$ac_cv_path_MKTEMP
4979if test -n "$MKTEMP"; then
4980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4981$as_echo "$MKTEMP" >&6; }
4982else
4983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984$as_echo "no" >&6; }
4985fi
4986
4987
4988  test -n "$MKTEMP" && break
4989done
4990
4991
4992    if test "x$MKTEMP" = x; then
4993        if test "xmktemp" = x; then
4994          PROG_NAME=mktemp
4995        else
4996          PROG_NAME=mktemp
4997        fi
4998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4999$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5000        as_fn_error $? "Cannot continue" "$LINENO" 5
5001    fi
5002
5003
5004
5005    for ac_prog in mv
5006do
5007  # Extract the first word of "$ac_prog", so it can be a program name with args.
5008set dummy $ac_prog; ac_word=$2
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010$as_echo_n "checking for $ac_word... " >&6; }
5011if ${ac_cv_path_MV+:} false; then :
5012  $as_echo_n "(cached) " >&6
5013else
5014  case $MV in
5015  [\\/]* | ?:[\\/]*)
5016  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5017  ;;
5018  *)
5019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022  IFS=$as_save_IFS
5023  test -z "$as_dir" && as_dir=.
5024    for ac_exec_ext in '' $ac_executable_extensions; do
5025  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5026    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5028    break 2
5029  fi
5030done
5031  done
5032IFS=$as_save_IFS
5033
5034  ;;
5035esac
5036fi
5037MV=$ac_cv_path_MV
5038if test -n "$MV"; then
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5040$as_echo "$MV" >&6; }
5041else
5042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043$as_echo "no" >&6; }
5044fi
5045
5046
5047  test -n "$MV" && break
5048done
5049
5050
5051    if test "x$MV" = x; then
5052        if test "xmv" = x; then
5053          PROG_NAME=mv
5054        else
5055          PROG_NAME=mv
5056        fi
5057        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5058$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5059        as_fn_error $? "Cannot continue" "$LINENO" 5
5060    fi
5061
5062
5063
5064    for ac_prog in printf
5065do
5066  # Extract the first word of "$ac_prog", so it can be a program name with args.
5067set dummy $ac_prog; ac_word=$2
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
5070if ${ac_cv_path_PRINTF+:} false; then :
5071  $as_echo_n "(cached) " >&6
5072else
5073  case $PRINTF in
5074  [\\/]* | ?:[\\/]*)
5075  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5076  ;;
5077  *)
5078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081  IFS=$as_save_IFS
5082  test -z "$as_dir" && as_dir=.
5083    for ac_exec_ext in '' $ac_executable_extensions; do
5084  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5085    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087    break 2
5088  fi
5089done
5090  done
5091IFS=$as_save_IFS
5092
5093  ;;
5094esac
5095fi
5096PRINTF=$ac_cv_path_PRINTF
5097if test -n "$PRINTF"; then
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5099$as_echo "$PRINTF" >&6; }
5100else
5101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
5103fi
5104
5105
5106  test -n "$PRINTF" && break
5107done
5108
5109
5110    if test "x$PRINTF" = x; then
5111        if test "xprintf" = x; then
5112          PROG_NAME=printf
5113        else
5114          PROG_NAME=printf
5115        fi
5116        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5117$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5118        as_fn_error $? "Cannot continue" "$LINENO" 5
5119    fi
5120
5121
5122
5123    for ac_prog in pwd
5124do
5125  # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if ${ac_cv_path_THEPWDCMD+:} false; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  case $THEPWDCMD in
5133  [\\/]* | ?:[\\/]*)
5134  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5135  ;;
5136  *)
5137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140  IFS=$as_save_IFS
5141  test -z "$as_dir" && as_dir=.
5142    for ac_exec_ext in '' $ac_executable_extensions; do
5143  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5144    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146    break 2
5147  fi
5148done
5149  done
5150IFS=$as_save_IFS
5151
5152  ;;
5153esac
5154fi
5155THEPWDCMD=$ac_cv_path_THEPWDCMD
5156if test -n "$THEPWDCMD"; then
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5158$as_echo "$THEPWDCMD" >&6; }
5159else
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165  test -n "$THEPWDCMD" && break
5166done
5167
5168
5169    if test "x$THEPWDCMD" = x; then
5170        if test "xpwd" = x; then
5171          PROG_NAME=thepwdcmd
5172        else
5173          PROG_NAME=pwd
5174        fi
5175        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5176$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5177        as_fn_error $? "Cannot continue" "$LINENO" 5
5178    fi
5179
5180
5181
5182    for ac_prog in rm
5183do
5184  # Extract the first word of "$ac_prog", so it can be a program name with args.
5185set dummy $ac_prog; ac_word=$2
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5187$as_echo_n "checking for $ac_word... " >&6; }
5188if ${ac_cv_path_RM+:} false; then :
5189  $as_echo_n "(cached) " >&6
5190else
5191  case $RM in
5192  [\\/]* | ?:[\\/]*)
5193  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5194  ;;
5195  *)
5196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5197for as_dir in $PATH
5198do
5199  IFS=$as_save_IFS
5200  test -z "$as_dir" && as_dir=.
5201    for ac_exec_ext in '' $ac_executable_extensions; do
5202  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5203    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5205    break 2
5206  fi
5207done
5208  done
5209IFS=$as_save_IFS
5210
5211  ;;
5212esac
5213fi
5214RM=$ac_cv_path_RM
5215if test -n "$RM"; then
5216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5217$as_echo "$RM" >&6; }
5218else
5219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5220$as_echo "no" >&6; }
5221fi
5222
5223
5224  test -n "$RM" && break
5225done
5226
5227
5228    if test "x$RM" = x; then
5229        if test "xrm" = x; then
5230          PROG_NAME=rm
5231        else
5232          PROG_NAME=rm
5233        fi
5234        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5235$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5236        as_fn_error $? "Cannot continue" "$LINENO" 5
5237    fi
5238
5239
5240
5241    for ac_prog in sh
5242do
5243  # Extract the first word of "$ac_prog", so it can be a program name with args.
5244set dummy $ac_prog; ac_word=$2
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5246$as_echo_n "checking for $ac_word... " >&6; }
5247if ${ac_cv_path_SH+:} false; then :
5248  $as_echo_n "(cached) " >&6
5249else
5250  case $SH in
5251  [\\/]* | ?:[\\/]*)
5252  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5253  ;;
5254  *)
5255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5256for as_dir in $PATH
5257do
5258  IFS=$as_save_IFS
5259  test -z "$as_dir" && as_dir=.
5260    for ac_exec_ext in '' $ac_executable_extensions; do
5261  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5262    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5264    break 2
5265  fi
5266done
5267  done
5268IFS=$as_save_IFS
5269
5270  ;;
5271esac
5272fi
5273SH=$ac_cv_path_SH
5274if test -n "$SH"; then
5275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5276$as_echo "$SH" >&6; }
5277else
5278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5279$as_echo "no" >&6; }
5280fi
5281
5282
5283  test -n "$SH" && break
5284done
5285
5286
5287    if test "x$SH" = x; then
5288        if test "xsh" = x; then
5289          PROG_NAME=sh
5290        else
5291          PROG_NAME=sh
5292        fi
5293        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5294$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5295        as_fn_error $? "Cannot continue" "$LINENO" 5
5296    fi
5297
5298
5299
5300    for ac_prog in sort
5301do
5302  # Extract the first word of "$ac_prog", so it can be a program name with args.
5303set dummy $ac_prog; ac_word=$2
5304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5305$as_echo_n "checking for $ac_word... " >&6; }
5306if ${ac_cv_path_SORT+:} false; then :
5307  $as_echo_n "(cached) " >&6
5308else
5309  case $SORT in
5310  [\\/]* | ?:[\\/]*)
5311  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5312  ;;
5313  *)
5314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5315for as_dir in $PATH
5316do
5317  IFS=$as_save_IFS
5318  test -z "$as_dir" && as_dir=.
5319    for ac_exec_ext in '' $ac_executable_extensions; do
5320  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5321    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5323    break 2
5324  fi
5325done
5326  done
5327IFS=$as_save_IFS
5328
5329  ;;
5330esac
5331fi
5332SORT=$ac_cv_path_SORT
5333if test -n "$SORT"; then
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5335$as_echo "$SORT" >&6; }
5336else
5337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338$as_echo "no" >&6; }
5339fi
5340
5341
5342  test -n "$SORT" && break
5343done
5344
5345
5346    if test "x$SORT" = x; then
5347        if test "xsort" = x; then
5348          PROG_NAME=sort
5349        else
5350          PROG_NAME=sort
5351        fi
5352        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5353$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5354        as_fn_error $? "Cannot continue" "$LINENO" 5
5355    fi
5356
5357
5358
5359    for ac_prog in tail
5360do
5361  # Extract the first word of "$ac_prog", so it can be a program name with args.
5362set dummy $ac_prog; ac_word=$2
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5364$as_echo_n "checking for $ac_word... " >&6; }
5365if ${ac_cv_path_TAIL+:} false; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  case $TAIL in
5369  [\\/]* | ?:[\\/]*)
5370  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5371  ;;
5372  *)
5373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5374for as_dir in $PATH
5375do
5376  IFS=$as_save_IFS
5377  test -z "$as_dir" && as_dir=.
5378    for ac_exec_ext in '' $ac_executable_extensions; do
5379  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5380    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5382    break 2
5383  fi
5384done
5385  done
5386IFS=$as_save_IFS
5387
5388  ;;
5389esac
5390fi
5391TAIL=$ac_cv_path_TAIL
5392if test -n "$TAIL"; then
5393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5394$as_echo "$TAIL" >&6; }
5395else
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399
5400
5401  test -n "$TAIL" && break
5402done
5403
5404
5405    if test "x$TAIL" = x; then
5406        if test "xtail" = x; then
5407          PROG_NAME=tail
5408        else
5409          PROG_NAME=tail
5410        fi
5411        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5412$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5413        as_fn_error $? "Cannot continue" "$LINENO" 5
5414    fi
5415
5416
5417
5418    for ac_prog in tar
5419do
5420  # Extract the first word of "$ac_prog", so it can be a program name with args.
5421set dummy $ac_prog; ac_word=$2
5422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5423$as_echo_n "checking for $ac_word... " >&6; }
5424if ${ac_cv_path_TAR+:} false; then :
5425  $as_echo_n "(cached) " >&6
5426else
5427  case $TAR in
5428  [\\/]* | ?:[\\/]*)
5429  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5430  ;;
5431  *)
5432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5433for as_dir in $PATH
5434do
5435  IFS=$as_save_IFS
5436  test -z "$as_dir" && as_dir=.
5437    for ac_exec_ext in '' $ac_executable_extensions; do
5438  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5439    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5441    break 2
5442  fi
5443done
5444  done
5445IFS=$as_save_IFS
5446
5447  ;;
5448esac
5449fi
5450TAR=$ac_cv_path_TAR
5451if test -n "$TAR"; then
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5453$as_echo "$TAR" >&6; }
5454else
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5456$as_echo "no" >&6; }
5457fi
5458
5459
5460  test -n "$TAR" && break
5461done
5462
5463
5464    if test "x$TAR" = x; then
5465        if test "xtar" = x; then
5466          PROG_NAME=tar
5467        else
5468          PROG_NAME=tar
5469        fi
5470        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5471$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5472        as_fn_error $? "Cannot continue" "$LINENO" 5
5473    fi
5474
5475
5476
5477    for ac_prog in tee
5478do
5479  # Extract the first word of "$ac_prog", so it can be a program name with args.
5480set dummy $ac_prog; ac_word=$2
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5482$as_echo_n "checking for $ac_word... " >&6; }
5483if ${ac_cv_path_TEE+:} false; then :
5484  $as_echo_n "(cached) " >&6
5485else
5486  case $TEE in
5487  [\\/]* | ?:[\\/]*)
5488  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5489  ;;
5490  *)
5491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5492for as_dir in $PATH
5493do
5494  IFS=$as_save_IFS
5495  test -z "$as_dir" && as_dir=.
5496    for ac_exec_ext in '' $ac_executable_extensions; do
5497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5498    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5500    break 2
5501  fi
5502done
5503  done
5504IFS=$as_save_IFS
5505
5506  ;;
5507esac
5508fi
5509TEE=$ac_cv_path_TEE
5510if test -n "$TEE"; then
5511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5512$as_echo "$TEE" >&6; }
5513else
5514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5515$as_echo "no" >&6; }
5516fi
5517
5518
5519  test -n "$TEE" && break
5520done
5521
5522
5523    if test "x$TEE" = x; then
5524        if test "xtee" = x; then
5525          PROG_NAME=tee
5526        else
5527          PROG_NAME=tee
5528        fi
5529        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5530$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5531        as_fn_error $? "Cannot continue" "$LINENO" 5
5532    fi
5533
5534
5535
5536    for ac_prog in touch
5537do
5538  # Extract the first word of "$ac_prog", so it can be a program name with args.
5539set dummy $ac_prog; ac_word=$2
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541$as_echo_n "checking for $ac_word... " >&6; }
5542if ${ac_cv_path_TOUCH+:} false; then :
5543  $as_echo_n "(cached) " >&6
5544else
5545  case $TOUCH in
5546  [\\/]* | ?:[\\/]*)
5547  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5548  ;;
5549  *)
5550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5551for as_dir in $PATH
5552do
5553  IFS=$as_save_IFS
5554  test -z "$as_dir" && as_dir=.
5555    for ac_exec_ext in '' $ac_executable_extensions; do
5556  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5557    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5559    break 2
5560  fi
5561done
5562  done
5563IFS=$as_save_IFS
5564
5565  ;;
5566esac
5567fi
5568TOUCH=$ac_cv_path_TOUCH
5569if test -n "$TOUCH"; then
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5571$as_echo "$TOUCH" >&6; }
5572else
5573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574$as_echo "no" >&6; }
5575fi
5576
5577
5578  test -n "$TOUCH" && break
5579done
5580
5581
5582    if test "x$TOUCH" = x; then
5583        if test "xtouch" = x; then
5584          PROG_NAME=touch
5585        else
5586          PROG_NAME=touch
5587        fi
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5589$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5590        as_fn_error $? "Cannot continue" "$LINENO" 5
5591    fi
5592
5593
5594
5595    for ac_prog in tr
5596do
5597  # Extract the first word of "$ac_prog", so it can be a program name with args.
5598set dummy $ac_prog; ac_word=$2
5599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5600$as_echo_n "checking for $ac_word... " >&6; }
5601if ${ac_cv_path_TR+:} false; then :
5602  $as_echo_n "(cached) " >&6
5603else
5604  case $TR in
5605  [\\/]* | ?:[\\/]*)
5606  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5607  ;;
5608  *)
5609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612  IFS=$as_save_IFS
5613  test -z "$as_dir" && as_dir=.
5614    for ac_exec_ext in '' $ac_executable_extensions; do
5615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5616    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5618    break 2
5619  fi
5620done
5621  done
5622IFS=$as_save_IFS
5623
5624  ;;
5625esac
5626fi
5627TR=$ac_cv_path_TR
5628if test -n "$TR"; then
5629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5630$as_echo "$TR" >&6; }
5631else
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5633$as_echo "no" >&6; }
5634fi
5635
5636
5637  test -n "$TR" && break
5638done
5639
5640
5641    if test "x$TR" = x; then
5642        if test "xtr" = x; then
5643          PROG_NAME=tr
5644        else
5645          PROG_NAME=tr
5646        fi
5647        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5648$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5649        as_fn_error $? "Cannot continue" "$LINENO" 5
5650    fi
5651
5652
5653
5654    for ac_prog in uname
5655do
5656  # Extract the first word of "$ac_prog", so it can be a program name with args.
5657set dummy $ac_prog; ac_word=$2
5658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
5660if ${ac_cv_path_UNAME+:} false; then :
5661  $as_echo_n "(cached) " >&6
5662else
5663  case $UNAME in
5664  [\\/]* | ?:[\\/]*)
5665  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5666  ;;
5667  *)
5668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5669for as_dir in $PATH
5670do
5671  IFS=$as_save_IFS
5672  test -z "$as_dir" && as_dir=.
5673    for ac_exec_ext in '' $ac_executable_extensions; do
5674  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5675    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5677    break 2
5678  fi
5679done
5680  done
5681IFS=$as_save_IFS
5682
5683  ;;
5684esac
5685fi
5686UNAME=$ac_cv_path_UNAME
5687if test -n "$UNAME"; then
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5689$as_echo "$UNAME" >&6; }
5690else
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
5693fi
5694
5695
5696  test -n "$UNAME" && break
5697done
5698
5699
5700    if test "x$UNAME" = x; then
5701        if test "xuname" = x; then
5702          PROG_NAME=uname
5703        else
5704          PROG_NAME=uname
5705        fi
5706        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5707$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5708        as_fn_error $? "Cannot continue" "$LINENO" 5
5709    fi
5710
5711
5712
5713    for ac_prog in uniq
5714do
5715  # Extract the first word of "$ac_prog", so it can be a program name with args.
5716set dummy $ac_prog; ac_word=$2
5717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5718$as_echo_n "checking for $ac_word... " >&6; }
5719if ${ac_cv_path_UNIQ+:} false; then :
5720  $as_echo_n "(cached) " >&6
5721else
5722  case $UNIQ in
5723  [\\/]* | ?:[\\/]*)
5724  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5725  ;;
5726  *)
5727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5728for as_dir in $PATH
5729do
5730  IFS=$as_save_IFS
5731  test -z "$as_dir" && as_dir=.
5732    for ac_exec_ext in '' $ac_executable_extensions; do
5733  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5734    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5736    break 2
5737  fi
5738done
5739  done
5740IFS=$as_save_IFS
5741
5742  ;;
5743esac
5744fi
5745UNIQ=$ac_cv_path_UNIQ
5746if test -n "$UNIQ"; then
5747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5748$as_echo "$UNIQ" >&6; }
5749else
5750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5751$as_echo "no" >&6; }
5752fi
5753
5754
5755  test -n "$UNIQ" && break
5756done
5757
5758
5759    if test "x$UNIQ" = x; then
5760        if test "xuniq" = x; then
5761          PROG_NAME=uniq
5762        else
5763          PROG_NAME=uniq
5764        fi
5765        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5766$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5767        as_fn_error $? "Cannot continue" "$LINENO" 5
5768    fi
5769
5770
5771
5772    for ac_prog in wc
5773do
5774  # Extract the first word of "$ac_prog", so it can be a program name with args.
5775set dummy $ac_prog; ac_word=$2
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5777$as_echo_n "checking for $ac_word... " >&6; }
5778if ${ac_cv_path_WC+:} false; then :
5779  $as_echo_n "(cached) " >&6
5780else
5781  case $WC in
5782  [\\/]* | ?:[\\/]*)
5783  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5784  ;;
5785  *)
5786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787for as_dir in $PATH
5788do
5789  IFS=$as_save_IFS
5790  test -z "$as_dir" && as_dir=.
5791    for ac_exec_ext in '' $ac_executable_extensions; do
5792  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5793    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795    break 2
5796  fi
5797done
5798  done
5799IFS=$as_save_IFS
5800
5801  ;;
5802esac
5803fi
5804WC=$ac_cv_path_WC
5805if test -n "$WC"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5807$as_echo "$WC" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814  test -n "$WC" && break
5815done
5816
5817
5818    if test "x$WC" = x; then
5819        if test "xwc" = x; then
5820          PROG_NAME=wc
5821        else
5822          PROG_NAME=wc
5823        fi
5824        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5825$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5826        as_fn_error $? "Cannot continue" "$LINENO" 5
5827    fi
5828
5829
5830
5831    for ac_prog in which
5832do
5833  # Extract the first word of "$ac_prog", so it can be a program name with args.
5834set dummy $ac_prog; ac_word=$2
5835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5836$as_echo_n "checking for $ac_word... " >&6; }
5837if ${ac_cv_path_WHICH+:} false; then :
5838  $as_echo_n "(cached) " >&6
5839else
5840  case $WHICH in
5841  [\\/]* | ?:[\\/]*)
5842  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5843  ;;
5844  *)
5845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5846for as_dir in $PATH
5847do
5848  IFS=$as_save_IFS
5849  test -z "$as_dir" && as_dir=.
5850    for ac_exec_ext in '' $ac_executable_extensions; do
5851  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5852    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5854    break 2
5855  fi
5856done
5857  done
5858IFS=$as_save_IFS
5859
5860  ;;
5861esac
5862fi
5863WHICH=$ac_cv_path_WHICH
5864if test -n "$WHICH"; then
5865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5866$as_echo "$WHICH" >&6; }
5867else
5868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5869$as_echo "no" >&6; }
5870fi
5871
5872
5873  test -n "$WHICH" && break
5874done
5875
5876
5877    if test "x$WHICH" = x; then
5878        if test "xwhich" = x; then
5879          PROG_NAME=which
5880        else
5881          PROG_NAME=which
5882        fi
5883        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5884$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5885        as_fn_error $? "Cannot continue" "$LINENO" 5
5886    fi
5887
5888
5889
5890    for ac_prog in xargs
5891do
5892  # Extract the first word of "$ac_prog", so it can be a program name with args.
5893set dummy $ac_prog; ac_word=$2
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5895$as_echo_n "checking for $ac_word... " >&6; }
5896if ${ac_cv_path_XARGS+:} false; then :
5897  $as_echo_n "(cached) " >&6
5898else
5899  case $XARGS in
5900  [\\/]* | ?:[\\/]*)
5901  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5902  ;;
5903  *)
5904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5905for as_dir in $PATH
5906do
5907  IFS=$as_save_IFS
5908  test -z "$as_dir" && as_dir=.
5909    for ac_exec_ext in '' $ac_executable_extensions; do
5910  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5911    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5913    break 2
5914  fi
5915done
5916  done
5917IFS=$as_save_IFS
5918
5919  ;;
5920esac
5921fi
5922XARGS=$ac_cv_path_XARGS
5923if test -n "$XARGS"; then
5924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5925$as_echo "$XARGS" >&6; }
5926else
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928$as_echo "no" >&6; }
5929fi
5930
5931
5932  test -n "$XARGS" && break
5933done
5934
5935
5936    if test "x$XARGS" = x; then
5937        if test "xxargs" = x; then
5938          PROG_NAME=xargs
5939        else
5940          PROG_NAME=xargs
5941        fi
5942        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5943$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5944        as_fn_error $? "Cannot continue" "$LINENO" 5
5945    fi
5946
5947
5948
5949# Then required tools that require some special treatment.
5950for ac_prog in gawk mawk nawk awk
5951do
5952  # Extract the first word of "$ac_prog", so it can be a program name with args.
5953set dummy $ac_prog; ac_word=$2
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5955$as_echo_n "checking for $ac_word... " >&6; }
5956if ${ac_cv_prog_AWK+:} false; then :
5957  $as_echo_n "(cached) " >&6
5958else
5959  if test -n "$AWK"; then
5960  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5961else
5962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963for as_dir in $PATH
5964do
5965  IFS=$as_save_IFS
5966  test -z "$as_dir" && as_dir=.
5967    for ac_exec_ext in '' $ac_executable_extensions; do
5968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5969    ac_cv_prog_AWK="$ac_prog"
5970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5971    break 2
5972  fi
5973done
5974  done
5975IFS=$as_save_IFS
5976
5977fi
5978fi
5979AWK=$ac_cv_prog_AWK
5980if test -n "$AWK"; then
5981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5982$as_echo "$AWK" >&6; }
5983else
5984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5985$as_echo "no" >&6; }
5986fi
5987
5988
5989  test -n "$AWK" && break
5990done
5991
5992
5993    if test "x$AWK" = x; then
5994        if test "x" = x; then
5995          PROG_NAME=awk
5996        else
5997          PROG_NAME=
5998        fi
5999        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6000$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6001        as_fn_error $? "Cannot continue" "$LINENO" 5
6002    fi
6003
6004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6005$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6006if ${ac_cv_path_GREP+:} false; then :
6007  $as_echo_n "(cached) " >&6
6008else
6009  if test -z "$GREP"; then
6010  ac_path_GREP_found=false
6011  # Loop through the user's path and test for each of PROGNAME-LIST
6012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6013for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6014do
6015  IFS=$as_save_IFS
6016  test -z "$as_dir" && as_dir=.
6017    for ac_prog in grep ggrep; do
6018    for ac_exec_ext in '' $ac_executable_extensions; do
6019      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6020      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6021# Check for GNU ac_path_GREP and select it if it is found.
6022  # Check for GNU $ac_path_GREP
6023case `"$ac_path_GREP" --version 2>&1` in
6024*GNU*)
6025  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6026*)
6027  ac_count=0
6028  $as_echo_n 0123456789 >"conftest.in"
6029  while :
6030  do
6031    cat "conftest.in" "conftest.in" >"conftest.tmp"
6032    mv "conftest.tmp" "conftest.in"
6033    cp "conftest.in" "conftest.nl"
6034    $as_echo 'GREP' >> "conftest.nl"
6035    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6036    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6037    as_fn_arith $ac_count + 1 && ac_count=$as_val
6038    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6039      # Best one so far, save it but keep looking for a better one
6040      ac_cv_path_GREP="$ac_path_GREP"
6041      ac_path_GREP_max=$ac_count
6042    fi
6043    # 10*(2^10) chars as input seems more than enough
6044    test $ac_count -gt 10 && break
6045  done
6046  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6047esac
6048
6049      $ac_path_GREP_found && break 3
6050    done
6051  done
6052  done
6053IFS=$as_save_IFS
6054  if test -z "$ac_cv_path_GREP"; then
6055    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6056  fi
6057else
6058  ac_cv_path_GREP=$GREP
6059fi
6060
6061fi
6062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6063$as_echo "$ac_cv_path_GREP" >&6; }
6064 GREP="$ac_cv_path_GREP"
6065
6066
6067
6068    if test "x$GREP" = x; then
6069        if test "x" = x; then
6070          PROG_NAME=grep
6071        else
6072          PROG_NAME=
6073        fi
6074        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6075$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6076        as_fn_error $? "Cannot continue" "$LINENO" 5
6077    fi
6078
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6080$as_echo_n "checking for egrep... " >&6; }
6081if ${ac_cv_path_EGREP+:} false; then :
6082  $as_echo_n "(cached) " >&6
6083else
6084  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6085   then ac_cv_path_EGREP="$GREP -E"
6086   else
6087     if test -z "$EGREP"; then
6088  ac_path_EGREP_found=false
6089  # Loop through the user's path and test for each of PROGNAME-LIST
6090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6091for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6092do
6093  IFS=$as_save_IFS
6094  test -z "$as_dir" && as_dir=.
6095    for ac_prog in egrep; do
6096    for ac_exec_ext in '' $ac_executable_extensions; do
6097      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6098      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6099# Check for GNU ac_path_EGREP and select it if it is found.
6100  # Check for GNU $ac_path_EGREP
6101case `"$ac_path_EGREP" --version 2>&1` in
6102*GNU*)
6103  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6104*)
6105  ac_count=0
6106  $as_echo_n 0123456789 >"conftest.in"
6107  while :
6108  do
6109    cat "conftest.in" "conftest.in" >"conftest.tmp"
6110    mv "conftest.tmp" "conftest.in"
6111    cp "conftest.in" "conftest.nl"
6112    $as_echo 'EGREP' >> "conftest.nl"
6113    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6114    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6115    as_fn_arith $ac_count + 1 && ac_count=$as_val
6116    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6117      # Best one so far, save it but keep looking for a better one
6118      ac_cv_path_EGREP="$ac_path_EGREP"
6119      ac_path_EGREP_max=$ac_count
6120    fi
6121    # 10*(2^10) chars as input seems more than enough
6122    test $ac_count -gt 10 && break
6123  done
6124  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6125esac
6126
6127      $ac_path_EGREP_found && break 3
6128    done
6129  done
6130  done
6131IFS=$as_save_IFS
6132  if test -z "$ac_cv_path_EGREP"; then
6133    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6134  fi
6135else
6136  ac_cv_path_EGREP=$EGREP
6137fi
6138
6139   fi
6140fi
6141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6142$as_echo "$ac_cv_path_EGREP" >&6; }
6143 EGREP="$ac_cv_path_EGREP"
6144
6145
6146
6147    if test "x$EGREP" = x; then
6148        if test "x" = x; then
6149          PROG_NAME=egrep
6150        else
6151          PROG_NAME=
6152        fi
6153        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6154$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6155        as_fn_error $? "Cannot continue" "$LINENO" 5
6156    fi
6157
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6159$as_echo_n "checking for fgrep... " >&6; }
6160if ${ac_cv_path_FGREP+:} false; then :
6161  $as_echo_n "(cached) " >&6
6162else
6163  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6164   then ac_cv_path_FGREP="$GREP -F"
6165   else
6166     if test -z "$FGREP"; then
6167  ac_path_FGREP_found=false
6168  # Loop through the user's path and test for each of PROGNAME-LIST
6169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6171do
6172  IFS=$as_save_IFS
6173  test -z "$as_dir" && as_dir=.
6174    for ac_prog in fgrep; do
6175    for ac_exec_ext in '' $ac_executable_extensions; do
6176      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6177      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6178# Check for GNU ac_path_FGREP and select it if it is found.
6179  # Check for GNU $ac_path_FGREP
6180case `"$ac_path_FGREP" --version 2>&1` in
6181*GNU*)
6182  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6183*)
6184  ac_count=0
6185  $as_echo_n 0123456789 >"conftest.in"
6186  while :
6187  do
6188    cat "conftest.in" "conftest.in" >"conftest.tmp"
6189    mv "conftest.tmp" "conftest.in"
6190    cp "conftest.in" "conftest.nl"
6191    $as_echo 'FGREP' >> "conftest.nl"
6192    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6193    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6194    as_fn_arith $ac_count + 1 && ac_count=$as_val
6195    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6196      # Best one so far, save it but keep looking for a better one
6197      ac_cv_path_FGREP="$ac_path_FGREP"
6198      ac_path_FGREP_max=$ac_count
6199    fi
6200    # 10*(2^10) chars as input seems more than enough
6201    test $ac_count -gt 10 && break
6202  done
6203  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6204esac
6205
6206      $ac_path_FGREP_found && break 3
6207    done
6208  done
6209  done
6210IFS=$as_save_IFS
6211  if test -z "$ac_cv_path_FGREP"; then
6212    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6213  fi
6214else
6215  ac_cv_path_FGREP=$FGREP
6216fi
6217
6218   fi
6219fi
6220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6221$as_echo "$ac_cv_path_FGREP" >&6; }
6222 FGREP="$ac_cv_path_FGREP"
6223
6224
6225
6226    if test "x$FGREP" = x; then
6227        if test "x" = x; then
6228          PROG_NAME=fgrep
6229        else
6230          PROG_NAME=
6231        fi
6232        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6233$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6234        as_fn_error $? "Cannot continue" "$LINENO" 5
6235    fi
6236
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6238$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6239if ${ac_cv_path_SED+:} false; then :
6240  $as_echo_n "(cached) " >&6
6241else
6242            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6243     for ac_i in 1 2 3 4 5 6 7; do
6244       ac_script="$ac_script$as_nl$ac_script"
6245     done
6246     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6247     { ac_script=; unset ac_script;}
6248     if test -z "$SED"; then
6249  ac_path_SED_found=false
6250  # Loop through the user's path and test for each of PROGNAME-LIST
6251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252for as_dir in $PATH
6253do
6254  IFS=$as_save_IFS
6255  test -z "$as_dir" && as_dir=.
6256    for ac_prog in sed gsed; do
6257    for ac_exec_ext in '' $ac_executable_extensions; do
6258      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6259      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6260# Check for GNU ac_path_SED and select it if it is found.
6261  # Check for GNU $ac_path_SED
6262case `"$ac_path_SED" --version 2>&1` in
6263*GNU*)
6264  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6265*)
6266  ac_count=0
6267  $as_echo_n 0123456789 >"conftest.in"
6268  while :
6269  do
6270    cat "conftest.in" "conftest.in" >"conftest.tmp"
6271    mv "conftest.tmp" "conftest.in"
6272    cp "conftest.in" "conftest.nl"
6273    $as_echo '' >> "conftest.nl"
6274    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6275    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6276    as_fn_arith $ac_count + 1 && ac_count=$as_val
6277    if test $ac_count -gt ${ac_path_SED_max-0}; then
6278      # Best one so far, save it but keep looking for a better one
6279      ac_cv_path_SED="$ac_path_SED"
6280      ac_path_SED_max=$ac_count
6281    fi
6282    # 10*(2^10) chars as input seems more than enough
6283    test $ac_count -gt 10 && break
6284  done
6285  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6286esac
6287
6288      $ac_path_SED_found && break 3
6289    done
6290  done
6291  done
6292IFS=$as_save_IFS
6293  if test -z "$ac_cv_path_SED"; then
6294    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6295  fi
6296else
6297  ac_cv_path_SED=$SED
6298fi
6299
6300fi
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6302$as_echo "$ac_cv_path_SED" >&6; }
6303 SED="$ac_cv_path_SED"
6304  rm -f conftest.sed
6305
6306
6307    if test "x$SED" = x; then
6308        if test "x" = x; then
6309          PROG_NAME=sed
6310        else
6311          PROG_NAME=
6312        fi
6313        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6314$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6315        as_fn_error $? "Cannot continue" "$LINENO" 5
6316    fi
6317
6318
6319for ac_prog in nawk gawk awk
6320do
6321  # Extract the first word of "$ac_prog", so it can be a program name with args.
6322set dummy $ac_prog; ac_word=$2
6323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6324$as_echo_n "checking for $ac_word... " >&6; }
6325if ${ac_cv_path_NAWK+:} false; then :
6326  $as_echo_n "(cached) " >&6
6327else
6328  case $NAWK in
6329  [\\/]* | ?:[\\/]*)
6330  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6331  ;;
6332  *)
6333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6334for as_dir in $PATH
6335do
6336  IFS=$as_save_IFS
6337  test -z "$as_dir" && as_dir=.
6338    for ac_exec_ext in '' $ac_executable_extensions; do
6339  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6340    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6342    break 2
6343  fi
6344done
6345  done
6346IFS=$as_save_IFS
6347
6348  ;;
6349esac
6350fi
6351NAWK=$ac_cv_path_NAWK
6352if test -n "$NAWK"; then
6353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6354$as_echo "$NAWK" >&6; }
6355else
6356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6357$as_echo "no" >&6; }
6358fi
6359
6360
6361  test -n "$NAWK" && break
6362done
6363
6364
6365    if test "x$NAWK" = x; then
6366        if test "x" = x; then
6367          PROG_NAME=nawk
6368        else
6369          PROG_NAME=
6370        fi
6371        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6372$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6373        as_fn_error $? "Cannot continue" "$LINENO" 5
6374    fi
6375
6376
6377# Always force rm.
6378RM="$RM -f"
6379
6380# These are not required on all platforms
6381# Extract the first word of "cygpath", so it can be a program name with args.
6382set dummy cygpath; ac_word=$2
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6384$as_echo_n "checking for $ac_word... " >&6; }
6385if ${ac_cv_path_CYGPATH+:} false; then :
6386  $as_echo_n "(cached) " >&6
6387else
6388  case $CYGPATH in
6389  [\\/]* | ?:[\\/]*)
6390  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6391  ;;
6392  *)
6393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6394for as_dir in $PATH
6395do
6396  IFS=$as_save_IFS
6397  test -z "$as_dir" && as_dir=.
6398    for ac_exec_ext in '' $ac_executable_extensions; do
6399  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6400    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6402    break 2
6403  fi
6404done
6405  done
6406IFS=$as_save_IFS
6407
6408  ;;
6409esac
6410fi
6411CYGPATH=$ac_cv_path_CYGPATH
6412if test -n "$CYGPATH"; then
6413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6414$as_echo "$CYGPATH" >&6; }
6415else
6416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417$as_echo "no" >&6; }
6418fi
6419
6420
6421# Extract the first word of "readlink", so it can be a program name with args.
6422set dummy readlink; ac_word=$2
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6424$as_echo_n "checking for $ac_word... " >&6; }
6425if ${ac_cv_path_READLINK+:} false; then :
6426  $as_echo_n "(cached) " >&6
6427else
6428  case $READLINK in
6429  [\\/]* | ?:[\\/]*)
6430  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6431  ;;
6432  *)
6433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6434for as_dir in $PATH
6435do
6436  IFS=$as_save_IFS
6437  test -z "$as_dir" && as_dir=.
6438    for ac_exec_ext in '' $ac_executable_extensions; do
6439  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6440    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6442    break 2
6443  fi
6444done
6445  done
6446IFS=$as_save_IFS
6447
6448  ;;
6449esac
6450fi
6451READLINK=$ac_cv_path_READLINK
6452if test -n "$READLINK"; then
6453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6454$as_echo "$READLINK" >&6; }
6455else
6456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
6458fi
6459
6460
6461# Extract the first word of "df", so it can be a program name with args.
6462set dummy df; ac_word=$2
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6464$as_echo_n "checking for $ac_word... " >&6; }
6465if ${ac_cv_path_DF+:} false; then :
6466  $as_echo_n "(cached) " >&6
6467else
6468  case $DF in
6469  [\\/]* | ?:[\\/]*)
6470  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6471  ;;
6472  *)
6473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6474for as_dir in $PATH
6475do
6476  IFS=$as_save_IFS
6477  test -z "$as_dir" && as_dir=.
6478    for ac_exec_ext in '' $ac_executable_extensions; do
6479  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6480    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6482    break 2
6483  fi
6484done
6485  done
6486IFS=$as_save_IFS
6487
6488  ;;
6489esac
6490fi
6491DF=$ac_cv_path_DF
6492if test -n "$DF"; then
6493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6494$as_echo "$DF" >&6; }
6495else
6496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497$as_echo "no" >&6; }
6498fi
6499
6500
6501# Extract the first word of "SetFile", so it can be a program name with args.
6502set dummy SetFile; ac_word=$2
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6504$as_echo_n "checking for $ac_word... " >&6; }
6505if ${ac_cv_path_SETFILE+:} false; then :
6506  $as_echo_n "(cached) " >&6
6507else
6508  case $SETFILE in
6509  [\\/]* | ?:[\\/]*)
6510  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6511  ;;
6512  *)
6513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6514for as_dir in $PATH
6515do
6516  IFS=$as_save_IFS
6517  test -z "$as_dir" && as_dir=.
6518    for ac_exec_ext in '' $ac_executable_extensions; do
6519  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6520    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6522    break 2
6523  fi
6524done
6525  done
6526IFS=$as_save_IFS
6527
6528  ;;
6529esac
6530fi
6531SETFILE=$ac_cv_path_SETFILE
6532if test -n "$SETFILE"; then
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6534$as_echo "$SETFILE" >&6; }
6535else
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6537$as_echo "no" >&6; }
6538fi
6539
6540
6541
6542
6543# Now we can determine OpenJDK build and target platforms. This is required to
6544# have early on.
6545# Make sure we can run config.sub.
6546$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6547  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6548
6549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6550$as_echo_n "checking build system type... " >&6; }
6551if ${ac_cv_build+:} false; then :
6552  $as_echo_n "(cached) " >&6
6553else
6554  ac_build_alias=$build_alias
6555test "x$ac_build_alias" = x &&
6556  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6557test "x$ac_build_alias" = x &&
6558  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6559ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6560  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6561
6562fi
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6564$as_echo "$ac_cv_build" >&6; }
6565case $ac_cv_build in
6566*-*-*) ;;
6567*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6568esac
6569build=$ac_cv_build
6570ac_save_IFS=$IFS; IFS='-'
6571set x $ac_cv_build
6572shift
6573build_cpu=$1
6574build_vendor=$2
6575shift; shift
6576# Remember, the first character of IFS is used to create $*,
6577# except with old shells:
6578build_os=$*
6579IFS=$ac_save_IFS
6580case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6581
6582
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6584$as_echo_n "checking host system type... " >&6; }
6585if ${ac_cv_host+:} false; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  if test "x$host_alias" = x; then
6589  ac_cv_host=$ac_cv_build
6590else
6591  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6592    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6593fi
6594
6595fi
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6597$as_echo "$ac_cv_host" >&6; }
6598case $ac_cv_host in
6599*-*-*) ;;
6600*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6601esac
6602host=$ac_cv_host
6603ac_save_IFS=$IFS; IFS='-'
6604set x $ac_cv_host
6605shift
6606host_cpu=$1
6607host_vendor=$2
6608shift; shift
6609# Remember, the first character of IFS is used to create $*,
6610# except with old shells:
6611host_os=$*
6612IFS=$ac_save_IFS
6613case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6614
6615
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6617$as_echo_n "checking target system type... " >&6; }
6618if ${ac_cv_target+:} false; then :
6619  $as_echo_n "(cached) " >&6
6620else
6621  if test "x$target_alias" = x; then
6622  ac_cv_target=$ac_cv_host
6623else
6624  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6625    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6626fi
6627
6628fi
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6630$as_echo "$ac_cv_target" >&6; }
6631case $ac_cv_target in
6632*-*-*) ;;
6633*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6634esac
6635target=$ac_cv_target
6636ac_save_IFS=$IFS; IFS='-'
6637set x $ac_cv_target
6638shift
6639target_cpu=$1
6640target_vendor=$2
6641shift; shift
6642# Remember, the first character of IFS is used to create $*,
6643# except with old shells:
6644target_os=$*
6645IFS=$ac_save_IFS
6646case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6647
6648
6649# The aliases save the names the user supplied, while $host etc.
6650# will get canonicalized.
6651test -n "$target_alias" &&
6652  test "$program_prefix$program_suffix$program_transform_name" = \
6653    NONENONEs,x,x, &&
6654  program_prefix=${target_alias}-
6655
6656# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6657# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6658# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6659# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6660# to use the configure naming style.
6661
6662
6663
6664
6665
6666    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6667    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6668    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6669    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6670    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6671    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6672
6673
6674
6675    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6676
6677  case "$build_os" in
6678    *linux*)
6679      VAR_OS=linux
6680      VAR_OS_API=posix
6681      VAR_OS_ENV=linux
6682      ;;
6683    *solaris*)
6684      VAR_OS=solaris
6685      VAR_OS_API=posix
6686      VAR_OS_ENV=solaris
6687      ;;
6688    *darwin*)
6689      VAR_OS=macosx
6690      VAR_OS_API=posix
6691      VAR_OS_ENV=macosx
6692      ;;
6693    *bsd*)
6694      VAR_OS=bsd
6695      VAR_OS_API=posix
6696      VAR_OS_ENV=bsd
6697      ;;
6698    *cygwin*)
6699      VAR_OS=windows
6700      VAR_OS_API=winapi
6701      VAR_OS_ENV=windows.cygwin
6702      ;;
6703    *mingw*)
6704      VAR_OS=windows
6705      VAR_OS_API=winapi
6706      VAR_OS_ENV=windows.msys
6707      ;;
6708    *)
6709      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6710      ;;
6711  esac
6712
6713
6714  # First argument is the cpu name from the trip/quad
6715  case "$build_cpu" in
6716    x86_64)
6717      VAR_CPU=x86_64
6718      VAR_CPU_ARCH=x86
6719      VAR_CPU_BITS=64
6720      VAR_CPU_ENDIAN=little
6721      ;;
6722    i?86)
6723      VAR_CPU=x86
6724      VAR_CPU_ARCH=x86
6725      VAR_CPU_BITS=32
6726      VAR_CPU_ENDIAN=little
6727      ;;
6728    arm*)
6729      VAR_CPU=arm
6730      VAR_CPU_ARCH=arm
6731      VAR_CPU_BITS=32
6732      VAR_CPU_ENDIAN=little
6733      ;;
6734    powerpc)
6735      VAR_CPU=ppc
6736      VAR_CPU_ARCH=ppc
6737      VAR_CPU_BITS=32
6738      VAR_CPU_ENDIAN=big
6739       ;;
6740    powerpc64)
6741      VAR_CPU=ppc64
6742      VAR_CPU_ARCH=ppc
6743      VAR_CPU_BITS=64
6744      VAR_CPU_ENDIAN=big
6745       ;;
6746    sparc)
6747      VAR_CPU=sparc
6748      VAR_CPU_ARCH=sparc
6749      VAR_CPU_BITS=32
6750      VAR_CPU_ENDIAN=big
6751       ;;
6752    sparcv9)
6753      VAR_CPU=sparcv9
6754      VAR_CPU_ARCH=sparc
6755      VAR_CPU_BITS=64
6756      VAR_CPU_ENDIAN=big
6757       ;;
6758    *)
6759      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6760      ;;
6761  esac
6762
6763    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6764    OPENJDK_BUILD_OS="$VAR_OS"
6765    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6766    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6767    OPENJDK_BUILD_CPU="$VAR_CPU"
6768    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6769    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6770    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6771
6772
6773
6774
6775
6776
6777
6778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6779$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6781$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6782
6783    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6784
6785  case "$host_os" in
6786    *linux*)
6787      VAR_OS=linux
6788      VAR_OS_API=posix
6789      VAR_OS_ENV=linux
6790      ;;
6791    *solaris*)
6792      VAR_OS=solaris
6793      VAR_OS_API=posix
6794      VAR_OS_ENV=solaris
6795      ;;
6796    *darwin*)
6797      VAR_OS=macosx
6798      VAR_OS_API=posix
6799      VAR_OS_ENV=macosx
6800      ;;
6801    *bsd*)
6802      VAR_OS=bsd
6803      VAR_OS_API=posix
6804      VAR_OS_ENV=bsd
6805      ;;
6806    *cygwin*)
6807      VAR_OS=windows
6808      VAR_OS_API=winapi
6809      VAR_OS_ENV=windows.cygwin
6810      ;;
6811    *mingw*)
6812      VAR_OS=windows
6813      VAR_OS_API=winapi
6814      VAR_OS_ENV=windows.msys
6815      ;;
6816    *)
6817      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6818      ;;
6819  esac
6820
6821
6822  # First argument is the cpu name from the trip/quad
6823  case "$host_cpu" in
6824    x86_64)
6825      VAR_CPU=x86_64
6826      VAR_CPU_ARCH=x86
6827      VAR_CPU_BITS=64
6828      VAR_CPU_ENDIAN=little
6829      ;;
6830    i?86)
6831      VAR_CPU=x86
6832      VAR_CPU_ARCH=x86
6833      VAR_CPU_BITS=32
6834      VAR_CPU_ENDIAN=little
6835      ;;
6836    arm*)
6837      VAR_CPU=arm
6838      VAR_CPU_ARCH=arm
6839      VAR_CPU_BITS=32
6840      VAR_CPU_ENDIAN=little
6841      ;;
6842    powerpc)
6843      VAR_CPU=ppc
6844      VAR_CPU_ARCH=ppc
6845      VAR_CPU_BITS=32
6846      VAR_CPU_ENDIAN=big
6847       ;;
6848    powerpc64)
6849      VAR_CPU=ppc64
6850      VAR_CPU_ARCH=ppc
6851      VAR_CPU_BITS=64
6852      VAR_CPU_ENDIAN=big
6853       ;;
6854    sparc)
6855      VAR_CPU=sparc
6856      VAR_CPU_ARCH=sparc
6857      VAR_CPU_BITS=32
6858      VAR_CPU_ENDIAN=big
6859       ;;
6860    sparcv9)
6861      VAR_CPU=sparcv9
6862      VAR_CPU_ARCH=sparc
6863      VAR_CPU_BITS=64
6864      VAR_CPU_ENDIAN=big
6865       ;;
6866    *)
6867      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6868      ;;
6869  esac
6870
6871    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6872    OPENJDK_TARGET_OS="$VAR_OS"
6873    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6874    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6875    OPENJDK_TARGET_CPU="$VAR_CPU"
6876    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6877    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6878    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6879
6880
6881
6882
6883
6884
6885
6886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6887$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6889$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6890
6891
6892
6893# Check whether --with-target-bits was given.
6894if test "${with_target_bits+set}" = set; then :
6895  withval=$with_target_bits;
6896fi
6897
6898
6899  # We have three types of compiles:
6900  # native  == normal compilation, target system == build system
6901  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6902  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6903  #
6904  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6905    # We're doing a proper cross-compilation
6906    COMPILE_TYPE="cross"
6907  else
6908    COMPILE_TYPE="native"
6909  fi
6910
6911  if test "x$with_target_bits" != x; then
6912    if test "x$COMPILE_TYPE" = "xcross"; then
6913      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6914    fi
6915
6916    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6917      # A reduced build is requested
6918      COMPILE_TYPE="reduced"
6919      OPENJDK_TARGET_CPU_BITS=32
6920      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6921        OPENJDK_TARGET_CPU=x86
6922      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6923        OPENJDK_TARGET_CPU=sparc
6924      else
6925        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6926      fi
6927    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6928      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
6929    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6930      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6931$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6932    else
6933      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6934    fi
6935  fi
6936
6937
6938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6939$as_echo_n "checking compilation type... " >&6; }
6940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6941$as_echo "$COMPILE_TYPE" >&6; }
6942
6943
6944    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6945       REQUIRED_OS_NAME=SunOS
6946       REQUIRED_OS_VERSION=5.10
6947    fi
6948    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6949       REQUIRED_OS_NAME=Linux
6950       REQUIRED_OS_VERSION=2.6
6951    fi
6952    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6953        REQUIRED_OS_NAME=Windows
6954        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6955            REQUIRED_OS_VERSION=5.2
6956        else
6957            REQUIRED_OS_VERSION=5.1
6958        fi
6959    fi
6960    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6961        REQUIRED_OS_NAME=Darwin
6962        REQUIRED_OS_VERSION=11.2
6963    fi
6964
6965
6966
6967
6968
6969    # Also store the legacy naming of the cpu.
6970    # Ie i586 and amd64 instead of x86 and x86_64
6971    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6972    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6973      OPENJDK_TARGET_CPU_LEGACY="i586"
6974    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6975      # On all platforms except MacOSX replace x86_64 with amd64.
6976      OPENJDK_TARGET_CPU_LEGACY="amd64"
6977    fi
6978
6979
6980    # And the second legacy naming of the cpu.
6981    # Ie i386 and amd64 instead of x86 and x86_64.
6982    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6983    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6984      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6985    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6986      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6987    fi
6988
6989
6990    # This is the name of the cpu (but using i386 and amd64 instead of
6991    # x86 and x86_64, respectively), preceeded by a /, to be used when
6992    # locating libraries. On macosx, it's empty, though.
6993    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6994    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6995        OPENJDK_TARGET_CPU_LIBDIR=""
6996    fi
6997
6998
6999    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7000    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7001    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7002    OPENJDK_TARGET_CPU_ISADIR=""
7003    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7004      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7005          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7006      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7007          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7008      fi
7009    fi
7010
7011
7012    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7013    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7014    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7015      # On linux only, we replace x86 with i386.
7016      OPENJDK_TARGET_CPU_OSARCH="i386"
7017    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7018      # On all platforms except macosx, we replace x86_64 with amd64.
7019      OPENJDK_TARGET_CPU_OSARCH="amd64"
7020    fi
7021
7022
7023    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7024    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7025      OPENJDK_TARGET_CPU_JLI="i386"
7026    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7027      # On all platforms except macosx, we replace x86_64 with amd64.
7028      OPENJDK_TARGET_CPU_JLI="amd64"
7029    fi
7030    # Now setup the -D flags for building libjli.
7031    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7032    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7033      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7034        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7035      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7036        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7037      fi
7038    fi
7039
7040
7041    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7042    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7043        OPENJDK_TARGET_OS_API_DIR="solaris"
7044    fi
7045    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7046        OPENJDK_TARGET_OS_API_DIR="windows"
7047    fi
7048
7049
7050    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7051        A_LP64="LP64:="
7052        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7053        # unpack200.exe
7054        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7055            ADD_LP64="-D_LP64=1"
7056        fi
7057    fi
7058    LP64=$A_LP64
7059
7060
7061    if test "x$COMPILE_TYPE" = "xcross"; then
7062      # FIXME: ... or should this include reduced builds..?
7063      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7064    else
7065      DEFINE_CROSS_COMPILE_ARCH=""
7066    fi
7067
7068
7069
7070
7071# Continue setting up basic stuff. Most remaining code require fundamental tools.
7072
7073# Locate the directory of this script.
7074SCRIPT="$0"
7075
7076    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7077        # Follow a chain of symbolic links. Use readlink
7078        # where it exists, else fall back to horribly
7079        # complicated shell code.
7080        if test "x$READLINK_TESTED" != yes; then
7081            # On MacOSX there is a readlink tool with a different
7082            # purpose than the GNU readlink tool. Check the found readlink.
7083            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7084            if test "x$ISGNU" = x; then
7085                 # A readlink that we do not know how to use.
7086                 # Are there other non-GNU readlinks out there?
7087                 READLINK_TESTED=yes
7088                 READLINK=
7089            fi
7090        fi
7091
7092        if test "x$READLINK" != x; then
7093            SCRIPT=`$READLINK -f $SCRIPT`
7094        else
7095            # Save the current directory for restoring afterwards
7096            STARTDIR=$PWD
7097            COUNTER=0
7098            sym_link_dir=`$DIRNAME $SCRIPT`
7099            sym_link_file=`$BASENAME $SCRIPT`
7100            # Use the system pwd and not the shell builtin to resolve directory symlinks
7101            cd $sym_link_dir
7102            cd `$THEPWDCMD`
7103            sym_link_dir=`$THEPWDCMD`
7104            # Resolve file symlinks
7105            while test $COUNTER -lt 20; do
7106                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7107                if test "x$ISLINK" == x; then
7108                    # This is not a symbolic link! We are done!
7109                    break
7110                fi
7111                # Again resolve directory symlinks since the target of the just found
7112                # link could be in a different directory
7113                cd `$DIRNAME $ISLINK`
7114                sym_link_dir=`$THEPWDCMD`
7115                sym_link_file=`$BASENAME $ISLINK`
7116                let COUNTER=COUNTER+1
7117            done
7118            cd $STARTDIR
7119            SCRIPT=$sym_link_dir/$sym_link_file
7120        fi
7121    fi
7122
7123AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7124
7125# Where is the source? It is located two levels above the configure script.
7126CURDIR="$PWD"
7127cd "$AUTOCONF_DIR/../.."
7128SRC_ROOT="`$THEPWDCMD`"
7129
7130if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7131  PATH_SEP=";"
7132
7133  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7134  if test $SRC_ROOT_LENGTH -gt 100; then
7135      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7136  fi
7137
7138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7140$as_echo_n "checking cygwin release... " >&6; }
7141    CYGWIN_VERSION=`$UNAME -r`
7142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7143$as_echo "$CYGWIN_VERSION" >&6; }
7144    WINDOWS_ENV_VENDOR='cygwin'
7145    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7146
7147    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7148    if test "x$CYGWIN_VERSION_OK" = x; then
7149      { $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
7150$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;}
7151      as_fn_error $? "Cannot continue" "$LINENO" 5
7152    fi
7153    if test "x$CYGPATH" = x; then
7154        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7155    fi
7156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7157$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7158    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7159    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7160    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7161    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7163$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7164    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7165    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7166    if test "x$test_cygdrive_prefix" = x; then
7167        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7168    fi
7169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7171$as_echo_n "checking msys release... " >&6; }
7172    MSYS_VERSION=`$UNAME -r`
7173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7174$as_echo "$MSYS_VERSION" >&6; }
7175
7176    WINDOWS_ENV_VENDOR='msys'
7177    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7178
7179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7180$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7181    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7182    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7183
7184  windows_path="$MSYS_ROOT_PATH"
7185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7186    unix_path=`$CYGPATH -u "$windows_path"`
7187    MSYS_ROOT_PATH="$unix_path"
7188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7190    MSYS_ROOT_PATH="$unix_path"
7191  fi
7192
7193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7194$as_echo "$MSYS_ROOT_PATH" >&6; }
7195    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7196  else
7197    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7198  fi
7199
7200  # Test if windows or unix (cygwin/msys) find is first in path.
7201  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7202$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7203  FIND_BINARY_OUTPUT=`find --version 2>&1`
7204  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7206$as_echo "unix style" >&6; }
7207  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7209$as_echo "Windows" >&6; }
7210    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7211$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7212    { $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
7213$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7214    as_fn_error $? "Cannot continue" "$LINENO" 5
7215  else
7216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7217$as_echo "unknown" >&6; }
7218    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7219$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7220  fi
7221
7222else
7223  PATH_SEP=":"
7224fi
7225
7226
7227
7228cd "$CURDIR"
7229
7230
7231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7232
7233  # Input might be given as Windows format, start by converting to
7234  # unix format.
7235  path="$SRC_ROOT"
7236  new_path=`$CYGPATH -u "$path"`
7237
7238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7241  # "foo.exe" is OK but "foo" is an error.
7242  #
7243  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7244  # It is also a way to make sure we got the proper file name for the real test later on.
7245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7246  if test "x$test_shortpath" = x; then
7247    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7248$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7249    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7250  fi
7251
7252  # Call helper function which possibly converts this using DOS-style short mode.
7253  # If so, the updated path is stored in $new_path.
7254
7255  input_path="$new_path"
7256  # Check if we need to convert this using DOS-style short mode. If the path
7257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7258  # take no chances and rewrite it.
7259  # Note: m4 eats our [], so we need to use [ and ] instead.
7260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7261  if test "x$has_forbidden_chars" != x; then
7262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7266      # Going to short mode and back again did indeed matter. Since short mode is
7267      # case insensitive, let's make it lowercase to improve readability.
7268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7269      # Now convert it back to Unix-stile (cygpath)
7270      input_path=`$CYGPATH -u "$shortmode_path"`
7271      new_path="$input_path"
7272    fi
7273  fi
7274
7275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7276  if test "x$test_cygdrive_prefix" = x; then
7277    # As a simple fix, exclude /usr/bin since it's not a real path.
7278    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7280      # a path prefixed by /cygdrive for fixpath to work.
7281      new_path="$CYGWIN_ROOT_PATH$input_path"
7282    fi
7283  fi
7284
7285
7286  if test "x$path" != "x$new_path"; then
7287    SRC_ROOT="$new_path"
7288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7289$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7290  fi
7291
7292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7293
7294  path="$SRC_ROOT"
7295  has_colon=`$ECHO $path | $GREP ^.:`
7296  new_path="$path"
7297  if test "x$has_colon" = x; then
7298    # Not in mixed or Windows style, start by that.
7299    new_path=`cmd //c echo $path`
7300  fi
7301
7302
7303  input_path="$new_path"
7304  # Check if we need to convert this using DOS-style short mode. If the path
7305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7306  # take no chances and rewrite it.
7307  # Note: m4 eats our [], so we need to use [ and ] instead.
7308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7309  if test "x$has_forbidden_chars" != x; then
7310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7312  fi
7313
7314
7315  windows_path="$new_path"
7316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7317    unix_path=`$CYGPATH -u "$windows_path"`
7318    new_path="$unix_path"
7319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7321    new_path="$unix_path"
7322  fi
7323
7324  if test "x$path" != "x$new_path"; then
7325    SRC_ROOT="$new_path"
7326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7327$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7328  fi
7329
7330  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7331  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7332
7333  else
7334    # We're on a posix platform. Hooray! :)
7335    path="$SRC_ROOT"
7336
7337    if test ! -f "$path" && test ! -d "$path"; then
7338      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7339    fi
7340
7341    has_space=`$ECHO "$path" | $GREP " "`
7342    if test "x$has_space" != x; then
7343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7344$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7345      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7346    fi
7347  fi
7348
7349
7350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7351
7352  # Input might be given as Windows format, start by converting to
7353  # unix format.
7354  path="$CURDIR"
7355  new_path=`$CYGPATH -u "$path"`
7356
7357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7360  # "foo.exe" is OK but "foo" is an error.
7361  #
7362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7363  # It is also a way to make sure we got the proper file name for the real test later on.
7364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7365  if test "x$test_shortpath" = x; then
7366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7367$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7368    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7369  fi
7370
7371  # Call helper function which possibly converts this using DOS-style short mode.
7372  # If so, the updated path is stored in $new_path.
7373
7374  input_path="$new_path"
7375  # Check if we need to convert this using DOS-style short mode. If the path
7376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7377  # take no chances and rewrite it.
7378  # Note: m4 eats our [], so we need to use [ and ] instead.
7379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7380  if test "x$has_forbidden_chars" != x; then
7381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7385      # Going to short mode and back again did indeed matter. Since short mode is
7386      # case insensitive, let's make it lowercase to improve readability.
7387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7388      # Now convert it back to Unix-stile (cygpath)
7389      input_path=`$CYGPATH -u "$shortmode_path"`
7390      new_path="$input_path"
7391    fi
7392  fi
7393
7394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7395  if test "x$test_cygdrive_prefix" = x; then
7396    # As a simple fix, exclude /usr/bin since it's not a real path.
7397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7399      # a path prefixed by /cygdrive for fixpath to work.
7400      new_path="$CYGWIN_ROOT_PATH$input_path"
7401    fi
7402  fi
7403
7404
7405  if test "x$path" != "x$new_path"; then
7406    CURDIR="$new_path"
7407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7408$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7409  fi
7410
7411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7412
7413  path="$CURDIR"
7414  has_colon=`$ECHO $path | $GREP ^.:`
7415  new_path="$path"
7416  if test "x$has_colon" = x; then
7417    # Not in mixed or Windows style, start by that.
7418    new_path=`cmd //c echo $path`
7419  fi
7420
7421
7422  input_path="$new_path"
7423  # Check if we need to convert this using DOS-style short mode. If the path
7424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7425  # take no chances and rewrite it.
7426  # Note: m4 eats our [], so we need to use [ and ] instead.
7427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7428  if test "x$has_forbidden_chars" != x; then
7429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7431  fi
7432
7433
7434  windows_path="$new_path"
7435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7436    unix_path=`$CYGPATH -u "$windows_path"`
7437    new_path="$unix_path"
7438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7440    new_path="$unix_path"
7441  fi
7442
7443  if test "x$path" != "x$new_path"; then
7444    CURDIR="$new_path"
7445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7446$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7447  fi
7448
7449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7451
7452  else
7453    # We're on a posix platform. Hooray! :)
7454    path="$CURDIR"
7455
7456    if test ! -f "$path" && test ! -d "$path"; then
7457      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7458    fi
7459
7460    has_space=`$ECHO "$path" | $GREP " "`
7461    if test "x$has_space" != x; then
7462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7463$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7464      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7465    fi
7466  fi
7467
7468
7469if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7470    # Add extra search paths on solaris for utilities like ar and as etc...
7471    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7472fi
7473
7474# You can force the sys-root if the sys-root encoded into the cross compiler tools
7475# is not correct.
7476
7477# Check whether --with-sys-root was given.
7478if test "${with_sys_root+set}" = set; then :
7479  withval=$with_sys_root;
7480fi
7481
7482
7483if test "x$with_sys_root" != x; then
7484  SYS_ROOT=$with_sys_root
7485else
7486  SYS_ROOT=/
7487fi
7488
7489
7490
7491# Check whether --with-tools-dir was given.
7492if test "${with_tools_dir+set}" = set; then :
7493  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7494fi
7495
7496
7497
7498# Check whether --with-devkit was given.
7499if test "${with_devkit+set}" = set; then :
7500  withval=$with_devkit;
7501    if test "x$with_sys_root" != x; then
7502      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7503    fi
7504    if test "x$with_tools_dir" != x; then
7505      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7506    fi
7507    TOOLS_DIR=$with_devkit/bin
7508    SYS_ROOT=$with_devkit/$host_alias/libc
7509
7510fi
7511
7512
7513
7514
7515# Setup default logging of stdout and stderr to build.log in the output root.
7516BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7517BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7518BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7519
7520
7521
7522
7523
7524# Check if it's a pure open build or if custom sources are to be used.
7525
7526  # Check whether --enable-openjdk-only was given.
7527if test "${enable_openjdk_only+set}" = set; then :
7528  enableval=$enable_openjdk_only;
7529else
7530  enable_openjdk_only="no"
7531fi
7532
7533
7534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7535$as_echo_n "checking for presence of closed sources... " >&6; }
7536  if test -d "$SRC_ROOT/jdk/src/closed"; then
7537    CLOSED_SOURCE_PRESENT=yes
7538  else
7539    CLOSED_SOURCE_PRESENT=no
7540  fi
7541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7542$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7543
7544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7545$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7546  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7548$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7549
7550  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7551    OPENJDK=true
7552    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7553      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7554$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7555    fi
7556  else
7557    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7558      OPENJDK=true
7559    else
7560      OPENJDK=false
7561    fi
7562  fi
7563
7564  if test "x$OPENJDK" = "xtrue"; then
7565    SET_OPENJDK="OPENJDK=true"
7566  fi
7567
7568
7569
7570
7571# These are needed to be able to create a configuration name (and thus the output directory)
7572
7573###############################################################################
7574#
7575# Check which variant of the JDK that we want to build.
7576# Currently we have:
7577#    normal:   standard edition
7578# but the custom make system may add other variants
7579#
7580# Effectively the JDK variant gives a name to a specific set of
7581# modules to compile into the JDK. In the future, these modules
7582# might even be Jigsaw modules.
7583#
7584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7585$as_echo_n "checking which variant of the JDK to build... " >&6; }
7586
7587# Check whether --with-jdk-variant was given.
7588if test "${with_jdk_variant+set}" = set; then :
7589  withval=$with_jdk_variant;
7590fi
7591
7592
7593if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7594    JDK_VARIANT="normal"
7595else
7596    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7597fi
7598
7599
7600
7601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7602$as_echo "$JDK_VARIANT" >&6; }
7603
7604
7605
7606###############################################################################
7607#
7608# Check which variants of the JVM that we want to build.
7609# Currently we have:
7610#    server: normal interpreter and a tiered C1/C2 compiler
7611#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7612#    minimal1: reduced form of client with optional VM services and features stripped out
7613#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7614#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7615#    zero: no machine code interpreter, no compiler
7616#    zeroshark: zero interpreter and shark/llvm compiler backend
7617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7618$as_echo_n "checking which variants of the JVM to build... " >&6; }
7619
7620# Check whether --with-jvm-variants was given.
7621if test "${with_jvm_variants+set}" = set; then :
7622  withval=$with_jvm_variants;
7623fi
7624
7625
7626if test "x$with_jvm_variants" = x; then
7627     with_jvm_variants="server"
7628fi
7629
7630JVM_VARIANTS=",$with_jvm_variants,"
7631TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7632
7633if test "x$TEST_VARIANTS" != "x,"; then
7634   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7635fi
7636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7637$as_echo "$with_jvm_variants" >&6; }
7638
7639JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7640JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7641JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7642JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7643JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7644JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7645
7646if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7647    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7648        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7649    fi
7650fi
7651if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7652    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7653        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7654    fi
7655fi
7656if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7657    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7658        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7659    fi
7660fi
7661
7662# Replace the commas with AND for use in the build directory name.
7663ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7664COUNT_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/'`
7665if test "x$COUNT_VARIANTS" != "x,1"; then
7666    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7667else
7668    BUILDING_MULTIPLE_JVM_VARIANTS=no
7669fi
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7680   MACOSX_UNIVERSAL="true"
7681fi
7682
7683
7684
7685
7686
7687###############################################################################
7688#
7689# Set the debug level
7690#    release: no debug information, all optimizations, no asserts.
7691#    fastdebug: debug information (-g), all optimizations, all asserts
7692#    slowdebug: debug information (-g), no optimizations, all asserts
7693#
7694DEBUG_LEVEL="release"
7695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7696$as_echo_n "checking which debug level to use... " >&6; }
7697# Check whether --enable-debug was given.
7698if test "${enable_debug+set}" = set; then :
7699  enableval=$enable_debug;
7700        ENABLE_DEBUG="${enableval}"
7701        DEBUG_LEVEL="fastdebug"
7702
7703else
7704  ENABLE_DEBUG="no"
7705fi
7706
7707
7708
7709# Check whether --with-debug-level was given.
7710if test "${with_debug_level+set}" = set; then :
7711  withval=$with_debug_level;
7712        DEBUG_LEVEL="${withval}"
7713        if test "x$ENABLE_DEBUG" = xyes; then
7714			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7715        fi
7716
7717fi
7718
7719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7720$as_echo "$DEBUG_LEVEL" >&6; }
7721
7722if test "x$DEBUG_LEVEL" != xrelease && \
7723   test "x$DEBUG_LEVEL" != xfastdebug && \
7724   test "x$DEBUG_LEVEL" != xslowdebug; then
7725   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7726fi
7727
7728
7729###############################################################################
7730#
7731# Setup legacy vars/targets and new vars to deal with different debug levels.
7732#
7733
7734case $DEBUG_LEVEL in
7735      release )
7736          VARIANT="OPT"
7737          FASTDEBUG="false"
7738          DEBUG_CLASSFILES="false"
7739          BUILD_VARIANT_RELEASE=""
7740          HOTSPOT_DEBUG_LEVEL="product"
7741          HOTSPOT_EXPORT="product"
7742           ;;
7743      fastdebug )
7744          VARIANT="DBG"
7745          FASTDEBUG="true"
7746          DEBUG_CLASSFILES="true"
7747          BUILD_VARIANT_RELEASE="-fastdebug"
7748          HOTSPOT_DEBUG_LEVEL="fastdebug"
7749          HOTSPOT_EXPORT="fastdebug"
7750           ;;
7751      slowdebug )
7752          VARIANT="DBG"
7753          FASTDEBUG="false"
7754          DEBUG_CLASSFILES="true"
7755          BUILD_VARIANT_RELEASE="-debug"
7756          HOTSPOT_DEBUG_LEVEL="jvmg"
7757          HOTSPOT_EXPORT="debug"
7758           ;;
7759esac
7760
7761#####
7762# Generate the legacy makefile targets for hotspot.
7763# The hotspot api for selecting the build artifacts, really, needs to be improved.
7764# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7765# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7766# But until then ...
7767HOTSPOT_TARGET=""
7768
7769if test "x$JVM_VARIANT_SERVER" = xtrue; then
7770    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7771fi
7772
7773if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7774    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7775fi
7776
7777if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7778    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7779fi
7780
7781if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7782    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7783fi
7784
7785if test "x$JVM_VARIANT_ZERO" = xtrue; then
7786    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7787fi
7788
7789if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7790    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7791fi
7792
7793HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7794
7795# On Macosx universal binaries are produced, but they only contain
7796# 64 bit intel. This invalidates control of which jvms are built
7797# from configure, but only server is valid anyway. Fix this
7798# when hotspot makefiles are rewritten.
7799if test "x$MACOSX_UNIVERSAL" = xtrue; then
7800    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7801fi
7802
7803#####
7804
7805
7806
7807
7808
7809
7810
7811
7812# With basic setup done, call the custom early hook.
7813
7814
7815# To properly create a configuration name, we need to have the OpenJDK target
7816# and options (variants and debug level) parsed.
7817
7818
7819
7820# Check whether --with-conf-name was given.
7821if test "${with_conf_name+set}" = set; then :
7822  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7823fi
7824
7825
7826# Test from where we are running configure, in or outside of src root.
7827# To enable comparison of directories, CURDIR needs to be symlink free
7828# just like SRC_ROOT already is
7829NOSYM_CURDIR="$CURDIR"
7830
7831    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7832        # Follow a chain of symbolic links. Use readlink
7833        # where it exists, else fall back to horribly
7834        # complicated shell code.
7835        if test "x$READLINK_TESTED" != yes; then
7836            # On MacOSX there is a readlink tool with a different
7837            # purpose than the GNU readlink tool. Check the found readlink.
7838            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7839            if test "x$ISGNU" = x; then
7840                 # A readlink that we do not know how to use.
7841                 # Are there other non-GNU readlinks out there?
7842                 READLINK_TESTED=yes
7843                 READLINK=
7844            fi
7845        fi
7846
7847        if test "x$READLINK" != x; then
7848            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7849        else
7850            # Save the current directory for restoring afterwards
7851            STARTDIR=$PWD
7852            COUNTER=0
7853            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7854            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7855            # Use the system pwd and not the shell builtin to resolve directory symlinks
7856            cd $sym_link_dir
7857            cd `$THEPWDCMD`
7858            sym_link_dir=`$THEPWDCMD`
7859            # Resolve file symlinks
7860            while test $COUNTER -lt 20; do
7861                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7862                if test "x$ISLINK" == x; then
7863                    # This is not a symbolic link! We are done!
7864                    break
7865                fi
7866                # Again resolve directory symlinks since the target of the just found
7867                # link could be in a different directory
7868                cd `$DIRNAME $ISLINK`
7869                sym_link_dir=`$THEPWDCMD`
7870                sym_link_file=`$BASENAME $ISLINK`
7871                let COUNTER=COUNTER+1
7872            done
7873            cd $STARTDIR
7874            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7875        fi
7876    fi
7877
7878if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7879        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7880        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7881    # We are running configure from the src root.
7882    # Create a default ./build/target-variant-debuglevel output root.
7883    if test "x${CONF_NAME}" = x; then
7884        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7885    fi
7886    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7887    $MKDIR -p "$OUTPUT_ROOT"
7888    if test ! -d "$OUTPUT_ROOT"; then
7889        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7890    fi
7891else
7892    # We are running configure from outside of the src dir.
7893    # Then use the current directory as output dir!
7894    # If configuration is situated in normal build directory, just use the build
7895    # directory name as configuration name, otherwise use the complete path.
7896    if test "x${CONF_NAME}" = x; then
7897        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7898    fi
7899    OUTPUT_ROOT="$CURDIR"
7900
7901    # WARNING: This might be a bad thing to do. You need to be sure you want to
7902    # have a configuration in this directory. Do some sanity checks!
7903
7904    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7905      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7906      # other files
7907      files_present=`$LS $OUTPUT_ROOT`
7908      # Configure has already touched config.log and confdefs.h in the current dir when this check
7909      # is performed.
7910      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7911                                             | $TR -d '\n'`
7912      if test "x$filtered_files" != x; then
7913        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7914$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7915        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7916$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7917        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7918$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7919        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7920$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7921        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7922$as_echo "$as_me: seriously mess up just about everything." >&6;}
7923        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7924$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7925        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7926$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7927        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7928      fi
7929    fi
7930fi
7931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7932$as_echo_n "checking what configuration name to use... " >&6; }
7933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7934$as_echo "$CONF_NAME" >&6; }
7935
7936
7937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7938
7939  # Input might be given as Windows format, start by converting to
7940  # unix format.
7941  path="$OUTPUT_ROOT"
7942  new_path=`$CYGPATH -u "$path"`
7943
7944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7947  # "foo.exe" is OK but "foo" is an error.
7948  #
7949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7950  # It is also a way to make sure we got the proper file name for the real test later on.
7951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7952  if test "x$test_shortpath" = x; then
7953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7954$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7955    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7956  fi
7957
7958  # Call helper function which possibly converts this using DOS-style short mode.
7959  # If so, the updated path is stored in $new_path.
7960
7961  input_path="$new_path"
7962  # Check if we need to convert this using DOS-style short mode. If the path
7963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7964  # take no chances and rewrite it.
7965  # Note: m4 eats our [], so we need to use [ and ] instead.
7966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7967  if test "x$has_forbidden_chars" != x; then
7968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7972      # Going to short mode and back again did indeed matter. Since short mode is
7973      # case insensitive, let's make it lowercase to improve readability.
7974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7975      # Now convert it back to Unix-stile (cygpath)
7976      input_path=`$CYGPATH -u "$shortmode_path"`
7977      new_path="$input_path"
7978    fi
7979  fi
7980
7981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7982  if test "x$test_cygdrive_prefix" = x; then
7983    # As a simple fix, exclude /usr/bin since it's not a real path.
7984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7986      # a path prefixed by /cygdrive for fixpath to work.
7987      new_path="$CYGWIN_ROOT_PATH$input_path"
7988    fi
7989  fi
7990
7991
7992  if test "x$path" != "x$new_path"; then
7993    OUTPUT_ROOT="$new_path"
7994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7995$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7996  fi
7997
7998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7999
8000  path="$OUTPUT_ROOT"
8001  has_colon=`$ECHO $path | $GREP ^.:`
8002  new_path="$path"
8003  if test "x$has_colon" = x; then
8004    # Not in mixed or Windows style, start by that.
8005    new_path=`cmd //c echo $path`
8006  fi
8007
8008
8009  input_path="$new_path"
8010  # Check if we need to convert this using DOS-style short mode. If the path
8011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8012  # take no chances and rewrite it.
8013  # Note: m4 eats our [], so we need to use [ and ] instead.
8014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8015  if test "x$has_forbidden_chars" != x; then
8016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8018  fi
8019
8020
8021  windows_path="$new_path"
8022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8023    unix_path=`$CYGPATH -u "$windows_path"`
8024    new_path="$unix_path"
8025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8027    new_path="$unix_path"
8028  fi
8029
8030  if test "x$path" != "x$new_path"; then
8031    OUTPUT_ROOT="$new_path"
8032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8033$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8034  fi
8035
8036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8038
8039  else
8040    # We're on a posix platform. Hooray! :)
8041    path="$OUTPUT_ROOT"
8042
8043    if test ! -f "$path" && test ! -d "$path"; then
8044      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8045    fi
8046
8047    has_space=`$ECHO "$path" | $GREP " "`
8048    if test "x$has_space" != x; then
8049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8050$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8051      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8052    fi
8053  fi
8054
8055
8056SPEC=$OUTPUT_ROOT/spec.gmk
8057
8058CONF_NAME=$CONF_NAME
8059
8060OUTPUT_ROOT=$OUTPUT_ROOT
8061
8062
8063# Most of the probed defines are put into config.h
8064ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8065
8066# The spec.gmk file contains all variables for the make system.
8067ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8068
8069# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8070ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8071
8072# The bootcycle-spec.gmk file contains support for boot cycle builds.
8073ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8074
8075# The compare.sh is used to compare the build output to other builds.
8076ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8077
8078# Spec.sh is currently used by compare-objects.sh
8079ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8080
8081# The generated Makefile knows where the spec.gmk is and where the source is.
8082# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8083# which will look for generated configurations
8084ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8085
8086
8087# Save the arguments given to us
8088echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8089
8090
8091# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8092
8093    for ac_prog in apt-get yum port pkgutil pkgadd
8094do
8095  # Extract the first word of "$ac_prog", so it can be a program name with args.
8096set dummy $ac_prog; ac_word=$2
8097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8098$as_echo_n "checking for $ac_word... " >&6; }
8099if ${ac_cv_prog_PKGHANDLER+:} false; then :
8100  $as_echo_n "(cached) " >&6
8101else
8102  if test -n "$PKGHANDLER"; then
8103  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8104else
8105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8106for as_dir in $PATH
8107do
8108  IFS=$as_save_IFS
8109  test -z "$as_dir" && as_dir=.
8110    for ac_exec_ext in '' $ac_executable_extensions; do
8111  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8112    ac_cv_prog_PKGHANDLER="$ac_prog"
8113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8114    break 2
8115  fi
8116done
8117  done
8118IFS=$as_save_IFS
8119
8120fi
8121fi
8122PKGHANDLER=$ac_cv_prog_PKGHANDLER
8123if test -n "$PKGHANDLER"; then
8124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8125$as_echo "$PKGHANDLER" >&6; }
8126else
8127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8128$as_echo "no" >&6; }
8129fi
8130
8131
8132  test -n "$PKGHANDLER" && break
8133done
8134
8135
8136
8137# Setup tools that requires more complex handling, or that is not needed by the configure script.
8138
8139
8140  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8141  if test "x$MAKE" != x; then
8142    # User has supplied a make, test it.
8143    if test ! -f "$MAKE"; then
8144      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8145    fi
8146
8147  MAKE_CANDIDATE=""$MAKE""
8148  DESCRIPTION="user supplied MAKE=$MAKE"
8149  if test "x$MAKE_CANDIDATE" != x; then
8150    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8151$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8152    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8153    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8154    if test "x$IS_GNU_MAKE" = x; then
8155      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8156$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8157    else
8158      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8159      if test "x$IS_MODERN_MAKE" = x; then
8160        { $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
8161$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;}
8162      else
8163        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8164          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8165            MAKE_EXPECTED_ENV='cygwin'
8166          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8167            MAKE_EXPECTED_ENV='msys'
8168          else
8169            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8170          fi
8171          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8172          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8173        else
8174          # Not relevant for non-Windows
8175          IS_MAKE_CORRECT_ENV=true
8176        fi
8177        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8178          { $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
8179$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;}
8180        else
8181          FOUND_MAKE=$MAKE_CANDIDATE
8182
8183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8184
8185  # First separate the path from the arguments. This will split at the first
8186  # space.
8187  complete="$FOUND_MAKE"
8188  path="${complete%% *}"
8189  tmp="$complete EOL"
8190  arguments="${tmp#* }"
8191
8192  # Input might be given as Windows format, start by converting to
8193  # unix format.
8194  new_path=`$CYGPATH -u "$path"`
8195
8196  # Now try to locate executable using which
8197  new_path=`$WHICH "$new_path" 2> /dev/null`
8198  # bat and cmd files are not always considered executable in cygwin causing which
8199  # to not find them
8200  if test "x$new_path" = x \
8201           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8202           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8203    new_path=`$CYGPATH -u "$path"`
8204  fi
8205  if test "x$new_path" = x; then
8206    # Oops. Which didn't find the executable.
8207    # The splitting of arguments from the executable at a space might have been incorrect,
8208    # since paths with space are more likely in Windows. Give it another try with the whole
8209    # argument.
8210    path="$complete"
8211    arguments="EOL"
8212    new_path=`$CYGPATH -u "$path"`
8213    new_path=`$WHICH "$new_path" 2> /dev/null`
8214    # bat and cmd files are not always considered executable in cygwin causing which
8215    # to not find them
8216    if test "x$new_path" = x \
8217             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8218             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8219      new_path=`$CYGPATH -u "$path"`
8220    fi
8221    if test "x$new_path" = x; then
8222      # It's still not found. Now this is an unrecoverable error.
8223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8224$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8225      has_space=`$ECHO "$complete" | $GREP " "`
8226      if test "x$has_space" != x; then
8227        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8228$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8229      fi
8230      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8231    fi
8232  fi
8233
8234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8237  # "foo.exe" is OK but "foo" is an error.
8238  #
8239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8240  # It is also a way to make sure we got the proper file name for the real test later on.
8241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8242  if test "x$test_shortpath" = x; then
8243    # Short path failed, file does not exist as specified.
8244    # Try adding .exe or .cmd
8245    if test -f "${new_path}.exe"; then
8246       input_to_shortpath="${new_path}.exe"
8247    elif test -f "${new_path}.cmd"; then
8248       input_to_shortpath="${new_path}.cmd"
8249    else
8250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8251$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8252      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8253$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8254      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8255    fi
8256  else
8257    input_to_shortpath="$new_path"
8258  fi
8259
8260  # Call helper function which possibly converts this using DOS-style short mode.
8261  # If so, the updated path is stored in $new_path.
8262  new_path="$input_to_shortpath"
8263
8264  input_path="$input_to_shortpath"
8265  # Check if we need to convert this using DOS-style short mode. If the path
8266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8267  # take no chances and rewrite it.
8268  # Note: m4 eats our [], so we need to use [ and ] instead.
8269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8270  if test "x$has_forbidden_chars" != x; then
8271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8275      # Going to short mode and back again did indeed matter. Since short mode is
8276      # case insensitive, let's make it lowercase to improve readability.
8277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8278      # Now convert it back to Unix-stile (cygpath)
8279      input_path=`$CYGPATH -u "$shortmode_path"`
8280      new_path="$input_path"
8281    fi
8282  fi
8283
8284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8285  if test "x$test_cygdrive_prefix" = x; then
8286    # As a simple fix, exclude /usr/bin since it's not a real path.
8287    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8289      # a path prefixed by /cygdrive for fixpath to work.
8290      new_path="$CYGWIN_ROOT_PATH$input_path"
8291    fi
8292  fi
8293
8294  # remove trailing .exe if any
8295  new_path="${new_path/%.exe/}"
8296
8297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8298
8299  # First separate the path from the arguments. This will split at the first
8300  # space.
8301  complete="$FOUND_MAKE"
8302  path="${complete%% *}"
8303  tmp="$complete EOL"
8304  arguments="${tmp#* }"
8305
8306  # Input might be given as Windows format, start by converting to
8307  # unix format.
8308  new_path="$path"
8309
8310  windows_path="$new_path"
8311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8312    unix_path=`$CYGPATH -u "$windows_path"`
8313    new_path="$unix_path"
8314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8316    new_path="$unix_path"
8317  fi
8318
8319
8320  # Now try to locate executable using which
8321  new_path=`$WHICH "$new_path" 2> /dev/null`
8322
8323  if test "x$new_path" = x; then
8324    # Oops. Which didn't find the executable.
8325    # The splitting of arguments from the executable at a space might have been incorrect,
8326    # since paths with space are more likely in Windows. Give it another try with the whole
8327    # argument.
8328    path="$complete"
8329    arguments="EOL"
8330    new_path="$path"
8331
8332  windows_path="$new_path"
8333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8334    unix_path=`$CYGPATH -u "$windows_path"`
8335    new_path="$unix_path"
8336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8338    new_path="$unix_path"
8339  fi
8340
8341
8342    new_path=`$WHICH "$new_path" 2> /dev/null`
8343
8344    if test "x$new_path" = x; then
8345      # It's still not found. Now this is an unrecoverable error.
8346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8347$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8348      has_space=`$ECHO "$complete" | $GREP " "`
8349      if test "x$has_space" != x; then
8350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8352      fi
8353      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8354    fi
8355  fi
8356
8357  # Now new_path has a complete unix path to the binary
8358  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8359    # Keep paths in /bin as-is, but remove trailing .exe if any
8360    new_path="${new_path/%.exe/}"
8361    # Do not save /bin paths to all_fixpath_prefixes!
8362  else
8363    # Not in mixed or Windows style, start by that.
8364    new_path=`cmd //c echo $new_path`
8365
8366  input_path="$new_path"
8367  # Check if we need to convert this using DOS-style short mode. If the path
8368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8369  # take no chances and rewrite it.
8370  # Note: m4 eats our [], so we need to use [ and ] instead.
8371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8372  if test "x$has_forbidden_chars" != x; then
8373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8375  fi
8376
8377    # Output is in $new_path
8378
8379  windows_path="$new_path"
8380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8381    unix_path=`$CYGPATH -u "$windows_path"`
8382    new_path="$unix_path"
8383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8385    new_path="$unix_path"
8386  fi
8387
8388    # remove trailing .exe if any
8389    new_path="${new_path/%.exe/}"
8390
8391    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8392    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8393  fi
8394
8395  else
8396    # We're on a posix platform. Hooray! :)
8397    # First separate the path from the arguments. This will split at the first
8398    # space.
8399    complete="$FOUND_MAKE"
8400    path="${complete%% *}"
8401    tmp="$complete EOL"
8402    arguments="${tmp#* }"
8403
8404    # Cannot rely on the command "which" here since it doesn't always work.
8405    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8406    if test -z "$is_absolute_path"; then
8407      # Path to executable is not absolute. Find it.
8408      IFS_save="$IFS"
8409      IFS=:
8410      for p in $PATH; do
8411        if test -f "$p/$path" && test -x "$p/$path"; then
8412          new_path="$p/$path"
8413          break
8414        fi
8415      done
8416      IFS="$IFS_save"
8417    else
8418      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8419$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8420      new_path="$path"
8421    fi
8422
8423    if test "x$new_path" = x; then
8424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8425$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8426        has_space=`$ECHO "$complete" | $GREP " "`
8427        if test "x$has_space" != x; then
8428          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8429$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8430        fi
8431        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8432      fi
8433  fi
8434
8435      # Now join together the path and the arguments once again
8436      if test "x$arguments" != xEOL; then
8437        new_complete="$new_path ${arguments% *}"
8438      else
8439        new_complete="$new_path"
8440      fi
8441
8442  if test "x$complete" != "x$new_complete"; then
8443      FOUND_MAKE="$new_complete"
8444      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8445$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8446    fi
8447
8448        fi
8449      fi
8450    fi
8451  fi
8452
8453    if test "x$FOUND_MAKE" = x; then
8454      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8455    fi
8456  else
8457    # Try our hardest to locate a correct version of GNU make
8458    for ac_prog in gmake
8459do
8460  # Extract the first word of "$ac_prog", so it can be a program name with args.
8461set dummy $ac_prog; ac_word=$2
8462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8463$as_echo_n "checking for $ac_word... " >&6; }
8464if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8465  $as_echo_n "(cached) " >&6
8466else
8467  case $CHECK_GMAKE in
8468  [\\/]* | ?:[\\/]*)
8469  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8470  ;;
8471  *)
8472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8473for as_dir in $PATH
8474do
8475  IFS=$as_save_IFS
8476  test -z "$as_dir" && as_dir=.
8477    for ac_exec_ext in '' $ac_executable_extensions; do
8478  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8479    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8481    break 2
8482  fi
8483done
8484  done
8485IFS=$as_save_IFS
8486
8487  ;;
8488esac
8489fi
8490CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8491if test -n "$CHECK_GMAKE"; then
8492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8493$as_echo "$CHECK_GMAKE" >&6; }
8494else
8495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8496$as_echo "no" >&6; }
8497fi
8498
8499
8500  test -n "$CHECK_GMAKE" && break
8501done
8502
8503
8504  MAKE_CANDIDATE=""$CHECK_GMAKE""
8505  DESCRIPTION="gmake in PATH"
8506  if test "x$MAKE_CANDIDATE" != x; then
8507    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8508$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8509    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8510    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8511    if test "x$IS_GNU_MAKE" = x; then
8512      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8513$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8514    else
8515      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8516      if test "x$IS_MODERN_MAKE" = x; then
8517        { $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
8518$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;}
8519      else
8520        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8521          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8522            MAKE_EXPECTED_ENV='cygwin'
8523          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8524            MAKE_EXPECTED_ENV='msys'
8525          else
8526            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8527          fi
8528          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8529          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8530        else
8531          # Not relevant for non-Windows
8532          IS_MAKE_CORRECT_ENV=true
8533        fi
8534        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8535          { $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
8536$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;}
8537        else
8538          FOUND_MAKE=$MAKE_CANDIDATE
8539
8540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8541
8542  # First separate the path from the arguments. This will split at the first
8543  # space.
8544  complete="$FOUND_MAKE"
8545  path="${complete%% *}"
8546  tmp="$complete EOL"
8547  arguments="${tmp#* }"
8548
8549  # Input might be given as Windows format, start by converting to
8550  # unix format.
8551  new_path=`$CYGPATH -u "$path"`
8552
8553  # Now try to locate executable using which
8554  new_path=`$WHICH "$new_path" 2> /dev/null`
8555  # bat and cmd files are not always considered executable in cygwin causing which
8556  # to not find them
8557  if test "x$new_path" = x \
8558           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8559           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8560    new_path=`$CYGPATH -u "$path"`
8561  fi
8562  if test "x$new_path" = x; then
8563    # Oops. Which didn't find the executable.
8564    # The splitting of arguments from the executable at a space might have been incorrect,
8565    # since paths with space are more likely in Windows. Give it another try with the whole
8566    # argument.
8567    path="$complete"
8568    arguments="EOL"
8569    new_path=`$CYGPATH -u "$path"`
8570    new_path=`$WHICH "$new_path" 2> /dev/null`
8571    # bat and cmd files are not always considered executable in cygwin causing which
8572    # to not find them
8573    if test "x$new_path" = x \
8574             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8575             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8576      new_path=`$CYGPATH -u "$path"`
8577    fi
8578    if test "x$new_path" = x; then
8579      # It's still not found. Now this is an unrecoverable error.
8580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8581$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8582      has_space=`$ECHO "$complete" | $GREP " "`
8583      if test "x$has_space" != x; then
8584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8586      fi
8587      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8588    fi
8589  fi
8590
8591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8594  # "foo.exe" is OK but "foo" is an error.
8595  #
8596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8597  # It is also a way to make sure we got the proper file name for the real test later on.
8598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8599  if test "x$test_shortpath" = x; then
8600    # Short path failed, file does not exist as specified.
8601    # Try adding .exe or .cmd
8602    if test -f "${new_path}.exe"; then
8603       input_to_shortpath="${new_path}.exe"
8604    elif test -f "${new_path}.cmd"; then
8605       input_to_shortpath="${new_path}.cmd"
8606    else
8607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8608$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8609      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8610$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8611      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8612    fi
8613  else
8614    input_to_shortpath="$new_path"
8615  fi
8616
8617  # Call helper function which possibly converts this using DOS-style short mode.
8618  # If so, the updated path is stored in $new_path.
8619  new_path="$input_to_shortpath"
8620
8621  input_path="$input_to_shortpath"
8622  # Check if we need to convert this using DOS-style short mode. If the path
8623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8624  # take no chances and rewrite it.
8625  # Note: m4 eats our [], so we need to use [ and ] instead.
8626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8627  if test "x$has_forbidden_chars" != x; then
8628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8632      # Going to short mode and back again did indeed matter. Since short mode is
8633      # case insensitive, let's make it lowercase to improve readability.
8634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8635      # Now convert it back to Unix-stile (cygpath)
8636      input_path=`$CYGPATH -u "$shortmode_path"`
8637      new_path="$input_path"
8638    fi
8639  fi
8640
8641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8642  if test "x$test_cygdrive_prefix" = x; then
8643    # As a simple fix, exclude /usr/bin since it's not a real path.
8644    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8646      # a path prefixed by /cygdrive for fixpath to work.
8647      new_path="$CYGWIN_ROOT_PATH$input_path"
8648    fi
8649  fi
8650
8651  # remove trailing .exe if any
8652  new_path="${new_path/%.exe/}"
8653
8654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8655
8656  # First separate the path from the arguments. This will split at the first
8657  # space.
8658  complete="$FOUND_MAKE"
8659  path="${complete%% *}"
8660  tmp="$complete EOL"
8661  arguments="${tmp#* }"
8662
8663  # Input might be given as Windows format, start by converting to
8664  # unix format.
8665  new_path="$path"
8666
8667  windows_path="$new_path"
8668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8669    unix_path=`$CYGPATH -u "$windows_path"`
8670    new_path="$unix_path"
8671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8673    new_path="$unix_path"
8674  fi
8675
8676
8677  # Now try to locate executable using which
8678  new_path=`$WHICH "$new_path" 2> /dev/null`
8679
8680  if test "x$new_path" = x; then
8681    # Oops. Which didn't find the executable.
8682    # The splitting of arguments from the executable at a space might have been incorrect,
8683    # since paths with space are more likely in Windows. Give it another try with the whole
8684    # argument.
8685    path="$complete"
8686    arguments="EOL"
8687    new_path="$path"
8688
8689  windows_path="$new_path"
8690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8691    unix_path=`$CYGPATH -u "$windows_path"`
8692    new_path="$unix_path"
8693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8695    new_path="$unix_path"
8696  fi
8697
8698
8699    new_path=`$WHICH "$new_path" 2> /dev/null`
8700
8701    if test "x$new_path" = x; then
8702      # It's still not found. Now this is an unrecoverable error.
8703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8704$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8705      has_space=`$ECHO "$complete" | $GREP " "`
8706      if test "x$has_space" != x; then
8707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8709      fi
8710      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8711    fi
8712  fi
8713
8714  # Now new_path has a complete unix path to the binary
8715  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8716    # Keep paths in /bin as-is, but remove trailing .exe if any
8717    new_path="${new_path/%.exe/}"
8718    # Do not save /bin paths to all_fixpath_prefixes!
8719  else
8720    # Not in mixed or Windows style, start by that.
8721    new_path=`cmd //c echo $new_path`
8722
8723  input_path="$new_path"
8724  # Check if we need to convert this using DOS-style short mode. If the path
8725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8726  # take no chances and rewrite it.
8727  # Note: m4 eats our [], so we need to use [ and ] instead.
8728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8729  if test "x$has_forbidden_chars" != x; then
8730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8732  fi
8733
8734    # Output is in $new_path
8735
8736  windows_path="$new_path"
8737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8738    unix_path=`$CYGPATH -u "$windows_path"`
8739    new_path="$unix_path"
8740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8742    new_path="$unix_path"
8743  fi
8744
8745    # remove trailing .exe if any
8746    new_path="${new_path/%.exe/}"
8747
8748    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8749    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8750  fi
8751
8752  else
8753    # We're on a posix platform. Hooray! :)
8754    # First separate the path from the arguments. This will split at the first
8755    # space.
8756    complete="$FOUND_MAKE"
8757    path="${complete%% *}"
8758    tmp="$complete EOL"
8759    arguments="${tmp#* }"
8760
8761    # Cannot rely on the command "which" here since it doesn't always work.
8762    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8763    if test -z "$is_absolute_path"; then
8764      # Path to executable is not absolute. Find it.
8765      IFS_save="$IFS"
8766      IFS=:
8767      for p in $PATH; do
8768        if test -f "$p/$path" && test -x "$p/$path"; then
8769          new_path="$p/$path"
8770          break
8771        fi
8772      done
8773      IFS="$IFS_save"
8774    else
8775      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8776$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8777      new_path="$path"
8778    fi
8779
8780    if test "x$new_path" = x; then
8781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8782$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8783        has_space=`$ECHO "$complete" | $GREP " "`
8784        if test "x$has_space" != x; then
8785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8787        fi
8788        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8789      fi
8790  fi
8791
8792      # Now join together the path and the arguments once again
8793      if test "x$arguments" != xEOL; then
8794        new_complete="$new_path ${arguments% *}"
8795      else
8796        new_complete="$new_path"
8797      fi
8798
8799  if test "x$complete" != "x$new_complete"; then
8800      FOUND_MAKE="$new_complete"
8801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8802$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8803    fi
8804
8805        fi
8806      fi
8807    fi
8808  fi
8809
8810
8811    if test "x$FOUND_MAKE" = x; then
8812      for ac_prog in make
8813do
8814  # Extract the first word of "$ac_prog", so it can be a program name with args.
8815set dummy $ac_prog; ac_word=$2
8816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8817$as_echo_n "checking for $ac_word... " >&6; }
8818if ${ac_cv_path_CHECK_MAKE+:} false; then :
8819  $as_echo_n "(cached) " >&6
8820else
8821  case $CHECK_MAKE in
8822  [\\/]* | ?:[\\/]*)
8823  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8824  ;;
8825  *)
8826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8827for as_dir in $PATH
8828do
8829  IFS=$as_save_IFS
8830  test -z "$as_dir" && as_dir=.
8831    for ac_exec_ext in '' $ac_executable_extensions; do
8832  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8833    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8835    break 2
8836  fi
8837done
8838  done
8839IFS=$as_save_IFS
8840
8841  ;;
8842esac
8843fi
8844CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8845if test -n "$CHECK_MAKE"; then
8846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8847$as_echo "$CHECK_MAKE" >&6; }
8848else
8849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8850$as_echo "no" >&6; }
8851fi
8852
8853
8854  test -n "$CHECK_MAKE" && break
8855done
8856
8857
8858  MAKE_CANDIDATE=""$CHECK_MAKE""
8859  DESCRIPTION="make in PATH"
8860  if test "x$MAKE_CANDIDATE" != x; then
8861    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8862$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8863    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8864    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8865    if test "x$IS_GNU_MAKE" = x; then
8866      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8867$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8868    else
8869      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8870      if test "x$IS_MODERN_MAKE" = x; then
8871        { $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
8872$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;}
8873      else
8874        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8875          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8876            MAKE_EXPECTED_ENV='cygwin'
8877          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8878            MAKE_EXPECTED_ENV='msys'
8879          else
8880            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8881          fi
8882          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8883          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8884        else
8885          # Not relevant for non-Windows
8886          IS_MAKE_CORRECT_ENV=true
8887        fi
8888        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8889          { $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
8890$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;}
8891        else
8892          FOUND_MAKE=$MAKE_CANDIDATE
8893
8894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8895
8896  # First separate the path from the arguments. This will split at the first
8897  # space.
8898  complete="$FOUND_MAKE"
8899  path="${complete%% *}"
8900  tmp="$complete EOL"
8901  arguments="${tmp#* }"
8902
8903  # Input might be given as Windows format, start by converting to
8904  # unix format.
8905  new_path=`$CYGPATH -u "$path"`
8906
8907  # Now try to locate executable using which
8908  new_path=`$WHICH "$new_path" 2> /dev/null`
8909  # bat and cmd files are not always considered executable in cygwin causing which
8910  # to not find them
8911  if test "x$new_path" = x \
8912           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8913           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8914    new_path=`$CYGPATH -u "$path"`
8915  fi
8916  if test "x$new_path" = x; then
8917    # Oops. Which didn't find the executable.
8918    # The splitting of arguments from the executable at a space might have been incorrect,
8919    # since paths with space are more likely in Windows. Give it another try with the whole
8920    # argument.
8921    path="$complete"
8922    arguments="EOL"
8923    new_path=`$CYGPATH -u "$path"`
8924    new_path=`$WHICH "$new_path" 2> /dev/null`
8925    # bat and cmd files are not always considered executable in cygwin causing which
8926    # to not find them
8927    if test "x$new_path" = x \
8928             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8929             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8930      new_path=`$CYGPATH -u "$path"`
8931    fi
8932    if test "x$new_path" = x; then
8933      # It's still not found. Now this is an unrecoverable error.
8934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8935$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8936      has_space=`$ECHO "$complete" | $GREP " "`
8937      if test "x$has_space" != x; then
8938        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8939$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8940      fi
8941      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8942    fi
8943  fi
8944
8945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8948  # "foo.exe" is OK but "foo" is an error.
8949  #
8950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8951  # It is also a way to make sure we got the proper file name for the real test later on.
8952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8953  if test "x$test_shortpath" = x; then
8954    # Short path failed, file does not exist as specified.
8955    # Try adding .exe or .cmd
8956    if test -f "${new_path}.exe"; then
8957       input_to_shortpath="${new_path}.exe"
8958    elif test -f "${new_path}.cmd"; then
8959       input_to_shortpath="${new_path}.cmd"
8960    else
8961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8962$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8963      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8964$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8965      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8966    fi
8967  else
8968    input_to_shortpath="$new_path"
8969  fi
8970
8971  # Call helper function which possibly converts this using DOS-style short mode.
8972  # If so, the updated path is stored in $new_path.
8973  new_path="$input_to_shortpath"
8974
8975  input_path="$input_to_shortpath"
8976  # Check if we need to convert this using DOS-style short mode. If the path
8977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8978  # take no chances and rewrite it.
8979  # Note: m4 eats our [], so we need to use [ and ] instead.
8980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8981  if test "x$has_forbidden_chars" != x; then
8982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8986      # Going to short mode and back again did indeed matter. Since short mode is
8987      # case insensitive, let's make it lowercase to improve readability.
8988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8989      # Now convert it back to Unix-stile (cygpath)
8990      input_path=`$CYGPATH -u "$shortmode_path"`
8991      new_path="$input_path"
8992    fi
8993  fi
8994
8995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8996  if test "x$test_cygdrive_prefix" = x; then
8997    # As a simple fix, exclude /usr/bin since it's not a real path.
8998    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9000      # a path prefixed by /cygdrive for fixpath to work.
9001      new_path="$CYGWIN_ROOT_PATH$input_path"
9002    fi
9003  fi
9004
9005  # remove trailing .exe if any
9006  new_path="${new_path/%.exe/}"
9007
9008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9009
9010  # First separate the path from the arguments. This will split at the first
9011  # space.
9012  complete="$FOUND_MAKE"
9013  path="${complete%% *}"
9014  tmp="$complete EOL"
9015  arguments="${tmp#* }"
9016
9017  # Input might be given as Windows format, start by converting to
9018  # unix format.
9019  new_path="$path"
9020
9021  windows_path="$new_path"
9022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9023    unix_path=`$CYGPATH -u "$windows_path"`
9024    new_path="$unix_path"
9025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9027    new_path="$unix_path"
9028  fi
9029
9030
9031  # Now try to locate executable using which
9032  new_path=`$WHICH "$new_path" 2> /dev/null`
9033
9034  if test "x$new_path" = x; then
9035    # Oops. Which didn't find the executable.
9036    # The splitting of arguments from the executable at a space might have been incorrect,
9037    # since paths with space are more likely in Windows. Give it another try with the whole
9038    # argument.
9039    path="$complete"
9040    arguments="EOL"
9041    new_path="$path"
9042
9043  windows_path="$new_path"
9044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9045    unix_path=`$CYGPATH -u "$windows_path"`
9046    new_path="$unix_path"
9047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9049    new_path="$unix_path"
9050  fi
9051
9052
9053    new_path=`$WHICH "$new_path" 2> /dev/null`
9054
9055    if test "x$new_path" = x; then
9056      # It's still not found. Now this is an unrecoverable error.
9057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9058$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9059      has_space=`$ECHO "$complete" | $GREP " "`
9060      if test "x$has_space" != x; then
9061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9063      fi
9064      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9065    fi
9066  fi
9067
9068  # Now new_path has a complete unix path to the binary
9069  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9070    # Keep paths in /bin as-is, but remove trailing .exe if any
9071    new_path="${new_path/%.exe/}"
9072    # Do not save /bin paths to all_fixpath_prefixes!
9073  else
9074    # Not in mixed or Windows style, start by that.
9075    new_path=`cmd //c echo $new_path`
9076
9077  input_path="$new_path"
9078  # Check if we need to convert this using DOS-style short mode. If the path
9079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9080  # take no chances and rewrite it.
9081  # Note: m4 eats our [], so we need to use [ and ] instead.
9082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9083  if test "x$has_forbidden_chars" != x; then
9084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9086  fi
9087
9088    # Output is in $new_path
9089
9090  windows_path="$new_path"
9091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9092    unix_path=`$CYGPATH -u "$windows_path"`
9093    new_path="$unix_path"
9094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9096    new_path="$unix_path"
9097  fi
9098
9099    # remove trailing .exe if any
9100    new_path="${new_path/%.exe/}"
9101
9102    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9103    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9104  fi
9105
9106  else
9107    # We're on a posix platform. Hooray! :)
9108    # First separate the path from the arguments. This will split at the first
9109    # space.
9110    complete="$FOUND_MAKE"
9111    path="${complete%% *}"
9112    tmp="$complete EOL"
9113    arguments="${tmp#* }"
9114
9115    # Cannot rely on the command "which" here since it doesn't always work.
9116    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9117    if test -z "$is_absolute_path"; then
9118      # Path to executable is not absolute. Find it.
9119      IFS_save="$IFS"
9120      IFS=:
9121      for p in $PATH; do
9122        if test -f "$p/$path" && test -x "$p/$path"; then
9123          new_path="$p/$path"
9124          break
9125        fi
9126      done
9127      IFS="$IFS_save"
9128    else
9129      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9130$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9131      new_path="$path"
9132    fi
9133
9134    if test "x$new_path" = x; then
9135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9136$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9137        has_space=`$ECHO "$complete" | $GREP " "`
9138        if test "x$has_space" != x; then
9139          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9140$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9141        fi
9142        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9143      fi
9144  fi
9145
9146      # Now join together the path and the arguments once again
9147      if test "x$arguments" != xEOL; then
9148        new_complete="$new_path ${arguments% *}"
9149      else
9150        new_complete="$new_path"
9151      fi
9152
9153  if test "x$complete" != "x$new_complete"; then
9154      FOUND_MAKE="$new_complete"
9155      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9156$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9157    fi
9158
9159        fi
9160      fi
9161    fi
9162  fi
9163
9164    fi
9165
9166    if test "x$FOUND_MAKE" = x; then
9167      if test "x$TOOLS_DIR" != x; then
9168        # We have a tools-dir, check that as well before giving up.
9169        OLD_PATH=$PATH
9170        PATH=$TOOLS_DIR:$PATH
9171        for ac_prog in gmake
9172do
9173  # Extract the first word of "$ac_prog", so it can be a program name with args.
9174set dummy $ac_prog; ac_word=$2
9175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9176$as_echo_n "checking for $ac_word... " >&6; }
9177if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9178  $as_echo_n "(cached) " >&6
9179else
9180  case $CHECK_TOOLSDIR_GMAKE in
9181  [\\/]* | ?:[\\/]*)
9182  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9183  ;;
9184  *)
9185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9186for as_dir in $PATH
9187do
9188  IFS=$as_save_IFS
9189  test -z "$as_dir" && as_dir=.
9190    for ac_exec_ext in '' $ac_executable_extensions; do
9191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9192    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9194    break 2
9195  fi
9196done
9197  done
9198IFS=$as_save_IFS
9199
9200  ;;
9201esac
9202fi
9203CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9204if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9206$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9207else
9208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9209$as_echo "no" >&6; }
9210fi
9211
9212
9213  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9214done
9215
9216
9217  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9218  DESCRIPTION="gmake in tools-dir"
9219  if test "x$MAKE_CANDIDATE" != x; then
9220    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9221$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9222    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9223    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9224    if test "x$IS_GNU_MAKE" = x; then
9225      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9226$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9227    else
9228      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9229      if test "x$IS_MODERN_MAKE" = x; then
9230        { $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
9231$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;}
9232      else
9233        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9234          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9235            MAKE_EXPECTED_ENV='cygwin'
9236          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9237            MAKE_EXPECTED_ENV='msys'
9238          else
9239            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9240          fi
9241          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9242          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9243        else
9244          # Not relevant for non-Windows
9245          IS_MAKE_CORRECT_ENV=true
9246        fi
9247        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9248          { $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
9249$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;}
9250        else
9251          FOUND_MAKE=$MAKE_CANDIDATE
9252
9253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9254
9255  # First separate the path from the arguments. This will split at the first
9256  # space.
9257  complete="$FOUND_MAKE"
9258  path="${complete%% *}"
9259  tmp="$complete EOL"
9260  arguments="${tmp#* }"
9261
9262  # Input might be given as Windows format, start by converting to
9263  # unix format.
9264  new_path=`$CYGPATH -u "$path"`
9265
9266  # Now try to locate executable using which
9267  new_path=`$WHICH "$new_path" 2> /dev/null`
9268  # bat and cmd files are not always considered executable in cygwin causing which
9269  # to not find them
9270  if test "x$new_path" = x \
9271           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9272           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9273    new_path=`$CYGPATH -u "$path"`
9274  fi
9275  if test "x$new_path" = x; then
9276    # Oops. Which didn't find the executable.
9277    # The splitting of arguments from the executable at a space might have been incorrect,
9278    # since paths with space are more likely in Windows. Give it another try with the whole
9279    # argument.
9280    path="$complete"
9281    arguments="EOL"
9282    new_path=`$CYGPATH -u "$path"`
9283    new_path=`$WHICH "$new_path" 2> /dev/null`
9284    # bat and cmd files are not always considered executable in cygwin causing which
9285    # to not find them
9286    if test "x$new_path" = x \
9287             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9288             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9289      new_path=`$CYGPATH -u "$path"`
9290    fi
9291    if test "x$new_path" = x; then
9292      # It's still not found. Now this is an unrecoverable error.
9293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9294$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9295      has_space=`$ECHO "$complete" | $GREP " "`
9296      if test "x$has_space" != x; then
9297        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9298$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9299      fi
9300      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9301    fi
9302  fi
9303
9304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9307  # "foo.exe" is OK but "foo" is an error.
9308  #
9309  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9310  # It is also a way to make sure we got the proper file name for the real test later on.
9311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9312  if test "x$test_shortpath" = x; then
9313    # Short path failed, file does not exist as specified.
9314    # Try adding .exe or .cmd
9315    if test -f "${new_path}.exe"; then
9316       input_to_shortpath="${new_path}.exe"
9317    elif test -f "${new_path}.cmd"; then
9318       input_to_shortpath="${new_path}.cmd"
9319    else
9320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9321$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9322      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9323$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9324      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9325    fi
9326  else
9327    input_to_shortpath="$new_path"
9328  fi
9329
9330  # Call helper function which possibly converts this using DOS-style short mode.
9331  # If so, the updated path is stored in $new_path.
9332  new_path="$input_to_shortpath"
9333
9334  input_path="$input_to_shortpath"
9335  # Check if we need to convert this using DOS-style short mode. If the path
9336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9337  # take no chances and rewrite it.
9338  # Note: m4 eats our [], so we need to use [ and ] instead.
9339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9340  if test "x$has_forbidden_chars" != x; then
9341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9345      # Going to short mode and back again did indeed matter. Since short mode is
9346      # case insensitive, let's make it lowercase to improve readability.
9347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9348      # Now convert it back to Unix-stile (cygpath)
9349      input_path=`$CYGPATH -u "$shortmode_path"`
9350      new_path="$input_path"
9351    fi
9352  fi
9353
9354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9355  if test "x$test_cygdrive_prefix" = x; then
9356    # As a simple fix, exclude /usr/bin since it's not a real path.
9357    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9359      # a path prefixed by /cygdrive for fixpath to work.
9360      new_path="$CYGWIN_ROOT_PATH$input_path"
9361    fi
9362  fi
9363
9364  # remove trailing .exe if any
9365  new_path="${new_path/%.exe/}"
9366
9367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9368
9369  # First separate the path from the arguments. This will split at the first
9370  # space.
9371  complete="$FOUND_MAKE"
9372  path="${complete%% *}"
9373  tmp="$complete EOL"
9374  arguments="${tmp#* }"
9375
9376  # Input might be given as Windows format, start by converting to
9377  # unix format.
9378  new_path="$path"
9379
9380  windows_path="$new_path"
9381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9382    unix_path=`$CYGPATH -u "$windows_path"`
9383    new_path="$unix_path"
9384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9386    new_path="$unix_path"
9387  fi
9388
9389
9390  # Now try to locate executable using which
9391  new_path=`$WHICH "$new_path" 2> /dev/null`
9392
9393  if test "x$new_path" = x; then
9394    # Oops. Which didn't find the executable.
9395    # The splitting of arguments from the executable at a space might have been incorrect,
9396    # since paths with space are more likely in Windows. Give it another try with the whole
9397    # argument.
9398    path="$complete"
9399    arguments="EOL"
9400    new_path="$path"
9401
9402  windows_path="$new_path"
9403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9404    unix_path=`$CYGPATH -u "$windows_path"`
9405    new_path="$unix_path"
9406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9408    new_path="$unix_path"
9409  fi
9410
9411
9412    new_path=`$WHICH "$new_path" 2> /dev/null`
9413
9414    if test "x$new_path" = x; then
9415      # It's still not found. Now this is an unrecoverable error.
9416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9417$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9418      has_space=`$ECHO "$complete" | $GREP " "`
9419      if test "x$has_space" != x; then
9420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9422      fi
9423      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9424    fi
9425  fi
9426
9427  # Now new_path has a complete unix path to the binary
9428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9429    # Keep paths in /bin as-is, but remove trailing .exe if any
9430    new_path="${new_path/%.exe/}"
9431    # Do not save /bin paths to all_fixpath_prefixes!
9432  else
9433    # Not in mixed or Windows style, start by that.
9434    new_path=`cmd //c echo $new_path`
9435
9436  input_path="$new_path"
9437  # Check if we need to convert this using DOS-style short mode. If the path
9438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9439  # take no chances and rewrite it.
9440  # Note: m4 eats our [], so we need to use [ and ] instead.
9441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9442  if test "x$has_forbidden_chars" != x; then
9443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9445  fi
9446
9447    # Output is in $new_path
9448
9449  windows_path="$new_path"
9450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9451    unix_path=`$CYGPATH -u "$windows_path"`
9452    new_path="$unix_path"
9453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9455    new_path="$unix_path"
9456  fi
9457
9458    # remove trailing .exe if any
9459    new_path="${new_path/%.exe/}"
9460
9461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9463  fi
9464
9465  else
9466    # We're on a posix platform. Hooray! :)
9467    # First separate the path from the arguments. This will split at the first
9468    # space.
9469    complete="$FOUND_MAKE"
9470    path="${complete%% *}"
9471    tmp="$complete EOL"
9472    arguments="${tmp#* }"
9473
9474    # Cannot rely on the command "which" here since it doesn't always work.
9475    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9476    if test -z "$is_absolute_path"; then
9477      # Path to executable is not absolute. Find it.
9478      IFS_save="$IFS"
9479      IFS=:
9480      for p in $PATH; do
9481        if test -f "$p/$path" && test -x "$p/$path"; then
9482          new_path="$p/$path"
9483          break
9484        fi
9485      done
9486      IFS="$IFS_save"
9487    else
9488      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9489$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9490      new_path="$path"
9491    fi
9492
9493    if test "x$new_path" = x; then
9494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9495$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9496        has_space=`$ECHO "$complete" | $GREP " "`
9497        if test "x$has_space" != x; then
9498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9500        fi
9501        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9502      fi
9503  fi
9504
9505      # Now join together the path and the arguments once again
9506      if test "x$arguments" != xEOL; then
9507        new_complete="$new_path ${arguments% *}"
9508      else
9509        new_complete="$new_path"
9510      fi
9511
9512  if test "x$complete" != "x$new_complete"; then
9513      FOUND_MAKE="$new_complete"
9514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9515$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9516    fi
9517
9518        fi
9519      fi
9520    fi
9521  fi
9522
9523        if test "x$FOUND_MAKE" = x; then
9524          for ac_prog in make
9525do
9526  # Extract the first word of "$ac_prog", so it can be a program name with args.
9527set dummy $ac_prog; ac_word=$2
9528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9529$as_echo_n "checking for $ac_word... " >&6; }
9530if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9531  $as_echo_n "(cached) " >&6
9532else
9533  case $CHECK_TOOLSDIR_MAKE in
9534  [\\/]* | ?:[\\/]*)
9535  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9536  ;;
9537  *)
9538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9539for as_dir in $PATH
9540do
9541  IFS=$as_save_IFS
9542  test -z "$as_dir" && as_dir=.
9543    for ac_exec_ext in '' $ac_executable_extensions; do
9544  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9545    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9547    break 2
9548  fi
9549done
9550  done
9551IFS=$as_save_IFS
9552
9553  ;;
9554esac
9555fi
9556CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9557if test -n "$CHECK_TOOLSDIR_MAKE"; then
9558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9559$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9560else
9561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9562$as_echo "no" >&6; }
9563fi
9564
9565
9566  test -n "$CHECK_TOOLSDIR_MAKE" && break
9567done
9568
9569
9570  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9571  DESCRIPTION="make in tools-dir"
9572  if test "x$MAKE_CANDIDATE" != x; then
9573    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9574$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9575    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9576    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9577    if test "x$IS_GNU_MAKE" = x; then
9578      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9579$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9580    else
9581      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9582      if test "x$IS_MODERN_MAKE" = x; then
9583        { $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
9584$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;}
9585      else
9586        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9587          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9588            MAKE_EXPECTED_ENV='cygwin'
9589          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9590            MAKE_EXPECTED_ENV='msys'
9591          else
9592            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9593          fi
9594          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9595          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9596        else
9597          # Not relevant for non-Windows
9598          IS_MAKE_CORRECT_ENV=true
9599        fi
9600        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9601          { $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
9602$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;}
9603        else
9604          FOUND_MAKE=$MAKE_CANDIDATE
9605
9606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9607
9608  # First separate the path from the arguments. This will split at the first
9609  # space.
9610  complete="$FOUND_MAKE"
9611  path="${complete%% *}"
9612  tmp="$complete EOL"
9613  arguments="${tmp#* }"
9614
9615  # Input might be given as Windows format, start by converting to
9616  # unix format.
9617  new_path=`$CYGPATH -u "$path"`
9618
9619  # Now try to locate executable using which
9620  new_path=`$WHICH "$new_path" 2> /dev/null`
9621  # bat and cmd files are not always considered executable in cygwin causing which
9622  # to not find them
9623  if test "x$new_path" = x \
9624           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9625           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9626    new_path=`$CYGPATH -u "$path"`
9627  fi
9628  if test "x$new_path" = x; then
9629    # Oops. Which didn't find the executable.
9630    # The splitting of arguments from the executable at a space might have been incorrect,
9631    # since paths with space are more likely in Windows. Give it another try with the whole
9632    # argument.
9633    path="$complete"
9634    arguments="EOL"
9635    new_path=`$CYGPATH -u "$path"`
9636    new_path=`$WHICH "$new_path" 2> /dev/null`
9637    # bat and cmd files are not always considered executable in cygwin causing which
9638    # to not find them
9639    if test "x$new_path" = x \
9640             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9641             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9642      new_path=`$CYGPATH -u "$path"`
9643    fi
9644    if test "x$new_path" = x; then
9645      # It's still not found. Now this is an unrecoverable error.
9646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9647$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9648      has_space=`$ECHO "$complete" | $GREP " "`
9649      if test "x$has_space" != x; then
9650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9652      fi
9653      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9654    fi
9655  fi
9656
9657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9660  # "foo.exe" is OK but "foo" is an error.
9661  #
9662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9663  # It is also a way to make sure we got the proper file name for the real test later on.
9664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9665  if test "x$test_shortpath" = x; then
9666    # Short path failed, file does not exist as specified.
9667    # Try adding .exe or .cmd
9668    if test -f "${new_path}.exe"; then
9669       input_to_shortpath="${new_path}.exe"
9670    elif test -f "${new_path}.cmd"; then
9671       input_to_shortpath="${new_path}.cmd"
9672    else
9673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9674$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9675      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9676$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9677      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9678    fi
9679  else
9680    input_to_shortpath="$new_path"
9681  fi
9682
9683  # Call helper function which possibly converts this using DOS-style short mode.
9684  # If so, the updated path is stored in $new_path.
9685  new_path="$input_to_shortpath"
9686
9687  input_path="$input_to_shortpath"
9688  # Check if we need to convert this using DOS-style short mode. If the path
9689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9690  # take no chances and rewrite it.
9691  # Note: m4 eats our [], so we need to use [ and ] instead.
9692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9693  if test "x$has_forbidden_chars" != x; then
9694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9698      # Going to short mode and back again did indeed matter. Since short mode is
9699      # case insensitive, let's make it lowercase to improve readability.
9700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9701      # Now convert it back to Unix-stile (cygpath)
9702      input_path=`$CYGPATH -u "$shortmode_path"`
9703      new_path="$input_path"
9704    fi
9705  fi
9706
9707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9708  if test "x$test_cygdrive_prefix" = x; then
9709    # As a simple fix, exclude /usr/bin since it's not a real path.
9710    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9712      # a path prefixed by /cygdrive for fixpath to work.
9713      new_path="$CYGWIN_ROOT_PATH$input_path"
9714    fi
9715  fi
9716
9717  # remove trailing .exe if any
9718  new_path="${new_path/%.exe/}"
9719
9720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9721
9722  # First separate the path from the arguments. This will split at the first
9723  # space.
9724  complete="$FOUND_MAKE"
9725  path="${complete%% *}"
9726  tmp="$complete EOL"
9727  arguments="${tmp#* }"
9728
9729  # Input might be given as Windows format, start by converting to
9730  # unix format.
9731  new_path="$path"
9732
9733  windows_path="$new_path"
9734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9735    unix_path=`$CYGPATH -u "$windows_path"`
9736    new_path="$unix_path"
9737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9739    new_path="$unix_path"
9740  fi
9741
9742
9743  # Now try to locate executable using which
9744  new_path=`$WHICH "$new_path" 2> /dev/null`
9745
9746  if test "x$new_path" = x; then
9747    # Oops. Which didn't find the executable.
9748    # The splitting of arguments from the executable at a space might have been incorrect,
9749    # since paths with space are more likely in Windows. Give it another try with the whole
9750    # argument.
9751    path="$complete"
9752    arguments="EOL"
9753    new_path="$path"
9754
9755  windows_path="$new_path"
9756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9757    unix_path=`$CYGPATH -u "$windows_path"`
9758    new_path="$unix_path"
9759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9761    new_path="$unix_path"
9762  fi
9763
9764
9765    new_path=`$WHICH "$new_path" 2> /dev/null`
9766
9767    if test "x$new_path" = x; then
9768      # It's still not found. Now this is an unrecoverable error.
9769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9770$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9771      has_space=`$ECHO "$complete" | $GREP " "`
9772      if test "x$has_space" != x; then
9773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9775      fi
9776      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9777    fi
9778  fi
9779
9780  # Now new_path has a complete unix path to the binary
9781  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9782    # Keep paths in /bin as-is, but remove trailing .exe if any
9783    new_path="${new_path/%.exe/}"
9784    # Do not save /bin paths to all_fixpath_prefixes!
9785  else
9786    # Not in mixed or Windows style, start by that.
9787    new_path=`cmd //c echo $new_path`
9788
9789  input_path="$new_path"
9790  # Check if we need to convert this using DOS-style short mode. If the path
9791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9792  # take no chances and rewrite it.
9793  # Note: m4 eats our [], so we need to use [ and ] instead.
9794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9795  if test "x$has_forbidden_chars" != x; then
9796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9798  fi
9799
9800    # Output is in $new_path
9801
9802  windows_path="$new_path"
9803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9804    unix_path=`$CYGPATH -u "$windows_path"`
9805    new_path="$unix_path"
9806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9808    new_path="$unix_path"
9809  fi
9810
9811    # remove trailing .exe if any
9812    new_path="${new_path/%.exe/}"
9813
9814    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9815    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9816  fi
9817
9818  else
9819    # We're on a posix platform. Hooray! :)
9820    # First separate the path from the arguments. This will split at the first
9821    # space.
9822    complete="$FOUND_MAKE"
9823    path="${complete%% *}"
9824    tmp="$complete EOL"
9825    arguments="${tmp#* }"
9826
9827    # Cannot rely on the command "which" here since it doesn't always work.
9828    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9829    if test -z "$is_absolute_path"; then
9830      # Path to executable is not absolute. Find it.
9831      IFS_save="$IFS"
9832      IFS=:
9833      for p in $PATH; do
9834        if test -f "$p/$path" && test -x "$p/$path"; then
9835          new_path="$p/$path"
9836          break
9837        fi
9838      done
9839      IFS="$IFS_save"
9840    else
9841      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9842$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9843      new_path="$path"
9844    fi
9845
9846    if test "x$new_path" = x; then
9847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9848$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9849        has_space=`$ECHO "$complete" | $GREP " "`
9850        if test "x$has_space" != x; then
9851          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9852$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9853        fi
9854        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9855      fi
9856  fi
9857
9858      # Now join together the path and the arguments once again
9859      if test "x$arguments" != xEOL; then
9860        new_complete="$new_path ${arguments% *}"
9861      else
9862        new_complete="$new_path"
9863      fi
9864
9865  if test "x$complete" != "x$new_complete"; then
9866      FOUND_MAKE="$new_complete"
9867      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9868$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9869    fi
9870
9871        fi
9872      fi
9873    fi
9874  fi
9875
9876        fi
9877        PATH=$OLD_PATH
9878      fi
9879    fi
9880
9881    if test "x$FOUND_MAKE" = x; then
9882      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
9883    fi
9884  fi
9885
9886  MAKE=$FOUND_MAKE
9887
9888  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9889$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9890
9891
9892
9893    # Test if find supports -delete
9894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9895$as_echo_n "checking if find supports -delete... " >&6; }
9896    FIND_DELETE="-delete"
9897
9898    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9899
9900    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9901
9902    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9903    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9904        # No, it does not.
9905        rm $DELETEDIR/TestIfFindSupportsDelete
9906        FIND_DELETE="-exec rm \{\} \+"
9907        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9908$as_echo "no" >&6; }
9909    else
9910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9911$as_echo "yes" >&6; }
9912    fi
9913    rmdir $DELETEDIR
9914
9915
9916
9917# These tools might not be installed by default,
9918# need hint on how to install them.
9919
9920    for ac_prog in unzip
9921do
9922  # Extract the first word of "$ac_prog", so it can be a program name with args.
9923set dummy $ac_prog; ac_word=$2
9924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9925$as_echo_n "checking for $ac_word... " >&6; }
9926if ${ac_cv_path_UNZIP+:} false; then :
9927  $as_echo_n "(cached) " >&6
9928else
9929  case $UNZIP in
9930  [\\/]* | ?:[\\/]*)
9931  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9932  ;;
9933  *)
9934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9935for as_dir in $PATH
9936do
9937  IFS=$as_save_IFS
9938  test -z "$as_dir" && as_dir=.
9939    for ac_exec_ext in '' $ac_executable_extensions; do
9940  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9941    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9943    break 2
9944  fi
9945done
9946  done
9947IFS=$as_save_IFS
9948
9949  ;;
9950esac
9951fi
9952UNZIP=$ac_cv_path_UNZIP
9953if test -n "$UNZIP"; then
9954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9955$as_echo "$UNZIP" >&6; }
9956else
9957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9958$as_echo "no" >&6; }
9959fi
9960
9961
9962  test -n "$UNZIP" && break
9963done
9964
9965
9966    if test "x$UNZIP" = x; then
9967        if test "xunzip" = x; then
9968          PROG_NAME=unzip
9969        else
9970          PROG_NAME=unzip
9971        fi
9972        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9973$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9974        as_fn_error $? "Cannot continue" "$LINENO" 5
9975    fi
9976
9977
9978
9979    for ac_prog in zip
9980do
9981  # Extract the first word of "$ac_prog", so it can be a program name with args.
9982set dummy $ac_prog; ac_word=$2
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9984$as_echo_n "checking for $ac_word... " >&6; }
9985if ${ac_cv_path_ZIP+:} false; then :
9986  $as_echo_n "(cached) " >&6
9987else
9988  case $ZIP in
9989  [\\/]* | ?:[\\/]*)
9990  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9991  ;;
9992  *)
9993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9994for as_dir in $PATH
9995do
9996  IFS=$as_save_IFS
9997  test -z "$as_dir" && as_dir=.
9998    for ac_exec_ext in '' $ac_executable_extensions; do
9999  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10000    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10002    break 2
10003  fi
10004done
10005  done
10006IFS=$as_save_IFS
10007
10008  ;;
10009esac
10010fi
10011ZIP=$ac_cv_path_ZIP
10012if test -n "$ZIP"; then
10013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10014$as_echo "$ZIP" >&6; }
10015else
10016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017$as_echo "no" >&6; }
10018fi
10019
10020
10021  test -n "$ZIP" && break
10022done
10023
10024
10025    if test "x$ZIP" = x; then
10026        if test "xzip" = x; then
10027          PROG_NAME=zip
10028        else
10029          PROG_NAME=zip
10030        fi
10031        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10032$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10033        as_fn_error $? "Cannot continue" "$LINENO" 5
10034    fi
10035
10036
10037
10038# Non-required basic tools
10039
10040# Extract the first word of "ldd", so it can be a program name with args.
10041set dummy ldd; ac_word=$2
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10043$as_echo_n "checking for $ac_word... " >&6; }
10044if ${ac_cv_path_LDD+:} false; then :
10045  $as_echo_n "(cached) " >&6
10046else
10047  case $LDD in
10048  [\\/]* | ?:[\\/]*)
10049  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10050  ;;
10051  *)
10052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10053for as_dir in $PATH
10054do
10055  IFS=$as_save_IFS
10056  test -z "$as_dir" && as_dir=.
10057    for ac_exec_ext in '' $ac_executable_extensions; do
10058  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10059    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10061    break 2
10062  fi
10063done
10064  done
10065IFS=$as_save_IFS
10066
10067  ;;
10068esac
10069fi
10070LDD=$ac_cv_path_LDD
10071if test -n "$LDD"; then
10072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10073$as_echo "$LDD" >&6; }
10074else
10075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10076$as_echo "no" >&6; }
10077fi
10078
10079
10080if test "x$LDD" = "x"; then
10081    # List shared lib dependencies is used for
10082    # debug output and checking for forbidden dependencies.
10083    # We can build without it.
10084    LDD="true"
10085fi
10086# Extract the first word of "otool", so it can be a program name with args.
10087set dummy otool; ac_word=$2
10088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10089$as_echo_n "checking for $ac_word... " >&6; }
10090if ${ac_cv_path_OTOOL+:} false; then :
10091  $as_echo_n "(cached) " >&6
10092else
10093  case $OTOOL in
10094  [\\/]* | ?:[\\/]*)
10095  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10096  ;;
10097  *)
10098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10099for as_dir in $PATH
10100do
10101  IFS=$as_save_IFS
10102  test -z "$as_dir" && as_dir=.
10103    for ac_exec_ext in '' $ac_executable_extensions; do
10104  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10105    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10107    break 2
10108  fi
10109done
10110  done
10111IFS=$as_save_IFS
10112
10113  ;;
10114esac
10115fi
10116OTOOL=$ac_cv_path_OTOOL
10117if test -n "$OTOOL"; then
10118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10119$as_echo "$OTOOL" >&6; }
10120else
10121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10122$as_echo "no" >&6; }
10123fi
10124
10125
10126if test "x$OTOOL" = "x"; then
10127   OTOOL="true"
10128fi
10129for ac_prog in readelf greadelf
10130do
10131  # Extract the first word of "$ac_prog", so it can be a program name with args.
10132set dummy $ac_prog; ac_word=$2
10133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10134$as_echo_n "checking for $ac_word... " >&6; }
10135if ${ac_cv_path_READELF+:} false; then :
10136  $as_echo_n "(cached) " >&6
10137else
10138  case $READELF in
10139  [\\/]* | ?:[\\/]*)
10140  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10141  ;;
10142  *)
10143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10144for as_dir in $PATH
10145do
10146  IFS=$as_save_IFS
10147  test -z "$as_dir" && as_dir=.
10148    for ac_exec_ext in '' $ac_executable_extensions; do
10149  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10150    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10152    break 2
10153  fi
10154done
10155  done
10156IFS=$as_save_IFS
10157
10158  ;;
10159esac
10160fi
10161READELF=$ac_cv_path_READELF
10162if test -n "$READELF"; then
10163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10164$as_echo "$READELF" >&6; }
10165else
10166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10167$as_echo "no" >&6; }
10168fi
10169
10170
10171  test -n "$READELF" && break
10172done
10173
10174# Extract the first word of "hg", so it can be a program name with args.
10175set dummy hg; 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_HG+:} false; then :
10179  $as_echo_n "(cached) " >&6
10180else
10181  case $HG in
10182  [\\/]* | ?:[\\/]*)
10183  ac_cv_path_HG="$HG" # 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_HG="$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
10204HG=$ac_cv_path_HG
10205if test -n "$HG"; then
10206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10207$as_echo "$HG" >&6; }
10208else
10209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210$as_echo "no" >&6; }
10211fi
10212
10213
10214# Extract the first word of "stat", so it can be a program name with args.
10215set dummy stat; ac_word=$2
10216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10217$as_echo_n "checking for $ac_word... " >&6; }
10218if ${ac_cv_path_STAT+:} false; then :
10219  $as_echo_n "(cached) " >&6
10220else
10221  case $STAT in
10222  [\\/]* | ?:[\\/]*)
10223  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10224  ;;
10225  *)
10226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10227for as_dir in $PATH
10228do
10229  IFS=$as_save_IFS
10230  test -z "$as_dir" && as_dir=.
10231    for ac_exec_ext in '' $ac_executable_extensions; do
10232  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10233    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10235    break 2
10236  fi
10237done
10238  done
10239IFS=$as_save_IFS
10240
10241  ;;
10242esac
10243fi
10244STAT=$ac_cv_path_STAT
10245if test -n "$STAT"; then
10246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10247$as_echo "$STAT" >&6; }
10248else
10249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10250$as_echo "no" >&6; }
10251fi
10252
10253
10254# Extract the first word of "time", so it can be a program name with args.
10255set dummy time; ac_word=$2
10256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10257$as_echo_n "checking for $ac_word... " >&6; }
10258if ${ac_cv_path_TIME+:} false; then :
10259  $as_echo_n "(cached) " >&6
10260else
10261  case $TIME in
10262  [\\/]* | ?:[\\/]*)
10263  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10264  ;;
10265  *)
10266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10267for as_dir in $PATH
10268do
10269  IFS=$as_save_IFS
10270  test -z "$as_dir" && as_dir=.
10271    for ac_exec_ext in '' $ac_executable_extensions; do
10272  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10273    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10275    break 2
10276  fi
10277done
10278  done
10279IFS=$as_save_IFS
10280
10281  ;;
10282esac
10283fi
10284TIME=$ac_cv_path_TIME
10285if test -n "$TIME"; then
10286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10287$as_echo "$TIME" >&6; }
10288else
10289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10290$as_echo "no" >&6; }
10291fi
10292
10293
10294
10295if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10296
10297    for ac_prog in comm
10298do
10299  # Extract the first word of "$ac_prog", so it can be a program name with args.
10300set dummy $ac_prog; ac_word=$2
10301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10302$as_echo_n "checking for $ac_word... " >&6; }
10303if ${ac_cv_path_COMM+:} false; then :
10304  $as_echo_n "(cached) " >&6
10305else
10306  case $COMM in
10307  [\\/]* | ?:[\\/]*)
10308  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10309  ;;
10310  *)
10311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10312for as_dir in $PATH
10313do
10314  IFS=$as_save_IFS
10315  test -z "$as_dir" && as_dir=.
10316    for ac_exec_ext in '' $ac_executable_extensions; do
10317  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10318    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10320    break 2
10321  fi
10322done
10323  done
10324IFS=$as_save_IFS
10325
10326  ;;
10327esac
10328fi
10329COMM=$ac_cv_path_COMM
10330if test -n "$COMM"; then
10331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10332$as_echo "$COMM" >&6; }
10333else
10334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10335$as_echo "no" >&6; }
10336fi
10337
10338
10339  test -n "$COMM" && break
10340done
10341
10342
10343    if test "x$COMM" = x; then
10344        if test "xcomm" = x; then
10345          PROG_NAME=comm
10346        else
10347          PROG_NAME=comm
10348        fi
10349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10350$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10351        as_fn_error $? "Cannot continue" "$LINENO" 5
10352    fi
10353
10354
10355fi
10356
10357
10358# Check if pkg-config is available.
10359
10360
10361if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10362	if test -n "$ac_tool_prefix"; then
10363  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10364set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10366$as_echo_n "checking for $ac_word... " >&6; }
10367if ${ac_cv_path_PKG_CONFIG+:} false; then :
10368  $as_echo_n "(cached) " >&6
10369else
10370  case $PKG_CONFIG in
10371  [\\/]* | ?:[\\/]*)
10372  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10373  ;;
10374  *)
10375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10376for as_dir in $PATH
10377do
10378  IFS=$as_save_IFS
10379  test -z "$as_dir" && as_dir=.
10380    for ac_exec_ext in '' $ac_executable_extensions; do
10381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10382    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10384    break 2
10385  fi
10386done
10387  done
10388IFS=$as_save_IFS
10389
10390  ;;
10391esac
10392fi
10393PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10394if test -n "$PKG_CONFIG"; then
10395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10396$as_echo "$PKG_CONFIG" >&6; }
10397else
10398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399$as_echo "no" >&6; }
10400fi
10401
10402
10403fi
10404if test -z "$ac_cv_path_PKG_CONFIG"; then
10405  ac_pt_PKG_CONFIG=$PKG_CONFIG
10406  # Extract the first word of "pkg-config", so it can be a program name with args.
10407set dummy pkg-config; ac_word=$2
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10409$as_echo_n "checking for $ac_word... " >&6; }
10410if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10411  $as_echo_n "(cached) " >&6
10412else
10413  case $ac_pt_PKG_CONFIG in
10414  [\\/]* | ?:[\\/]*)
10415  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10416  ;;
10417  *)
10418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10419for as_dir in $PATH
10420do
10421  IFS=$as_save_IFS
10422  test -z "$as_dir" && as_dir=.
10423    for ac_exec_ext in '' $ac_executable_extensions; do
10424  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10425    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10427    break 2
10428  fi
10429done
10430  done
10431IFS=$as_save_IFS
10432
10433  ;;
10434esac
10435fi
10436ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10437if test -n "$ac_pt_PKG_CONFIG"; then
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10439$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10440else
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
10443fi
10444
10445  if test "x$ac_pt_PKG_CONFIG" = x; then
10446    PKG_CONFIG=""
10447  else
10448    case $cross_compiling:$ac_tool_warned in
10449yes:)
10450{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10451$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10452ac_tool_warned=yes ;;
10453esac
10454    PKG_CONFIG=$ac_pt_PKG_CONFIG
10455  fi
10456else
10457  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10458fi
10459
10460fi
10461if test -n "$PKG_CONFIG"; then
10462	_pkg_min_version=0.9.0
10463	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10464$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10465	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10466		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10467$as_echo "yes" >&6; }
10468	else
10469		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10470$as_echo "no" >&6; }
10471		PKG_CONFIG=""
10472	fi
10473
10474fi
10475
10476# After basic tools have been setup, we can check build os specific details.
10477
10478###############################################################################
10479
10480# Note that this is the build platform OS version!
10481
10482OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10483OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10484OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10485OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10486
10487
10488
10489
10490
10491# Setup builddeps, for automatic downloading of tools we need.
10492# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10493# boot-jdk setup, but we need to have basic tools setup first.
10494
10495
10496# Check whether --with-builddeps-conf was given.
10497if test "${with_builddeps_conf+set}" = set; then :
10498  withval=$with_builddeps_conf;
10499fi
10500
10501
10502
10503# Check whether --with-builddeps-server was given.
10504if test "${with_builddeps_server+set}" = set; then :
10505  withval=$with_builddeps_server;
10506fi
10507
10508
10509
10510# Check whether --with-builddeps-dir was given.
10511if test "${with_builddeps_dir+set}" = set; then :
10512  withval=$with_builddeps_dir;
10513else
10514  with_builddeps_dir=/localhome/builddeps
10515fi
10516
10517
10518
10519# Check whether --with-builddeps-group was given.
10520if test "${with_builddeps_group+set}" = set; then :
10521  withval=$with_builddeps_group;
10522fi
10523
10524
10525
10526
10527    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10528        if test "x$with_builddeps_conf" != x; then
10529            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10530$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10531            builddepsfile=$with_builddeps_conf
10532            if test -s $builddepsfile; then
10533                . $builddepsfile
10534                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10535$as_echo "loaded!" >&6; }
10536            else
10537               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10538           fi
10539        else
10540            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10541$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10542            builddepsfile=`mktemp`
10543            touch $builddepsfile
10544            # Put all found confs into a single file.
10545            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10546            # Source the file to acquire the variables
10547            if test -s $builddepsfile; then
10548                . $builddepsfile
10549                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10550$as_echo "found at least one!" >&6; }
10551            else
10552               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10553           fi
10554        fi
10555        # Create build and target names that use _ instead of "-" and ".".
10556        # This is necessary to use them in variable names.
10557        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10558        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10559        # Extract rewrite information for build and target
10560        eval rewritten_build=\${REWRITE_${build_var}}
10561        if test "x$rewritten_build" = x; then
10562            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10563            echo Build stays the same $rewritten_build
10564        else
10565            echo Rewriting build for builddeps into $rewritten_build
10566        fi
10567        eval rewritten_target=\${REWRITE_${target_var}}
10568        if test "x$rewritten_target" = x; then
10569            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10570            echo Target stays the same $rewritten_target
10571        else
10572            echo Rewriting target for builddeps into $rewritten_target
10573        fi
10574        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10575        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10576    fi
10577    for ac_prog in 7z unzip
10578do
10579  # Extract the first word of "$ac_prog", so it can be a program name with args.
10580set dummy $ac_prog; ac_word=$2
10581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10582$as_echo_n "checking for $ac_word... " >&6; }
10583if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10584  $as_echo_n "(cached) " >&6
10585else
10586  if test -n "$BDEPS_UNZIP"; then
10587  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10588else
10589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10590for as_dir in $PATH
10591do
10592  IFS=$as_save_IFS
10593  test -z "$as_dir" && as_dir=.
10594    for ac_exec_ext in '' $ac_executable_extensions; do
10595  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10596    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10598    break 2
10599  fi
10600done
10601  done
10602IFS=$as_save_IFS
10603
10604fi
10605fi
10606BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10607if test -n "$BDEPS_UNZIP"; then
10608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10609$as_echo "$BDEPS_UNZIP" >&6; }
10610else
10611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10612$as_echo "no" >&6; }
10613fi
10614
10615
10616  test -n "$BDEPS_UNZIP" && break
10617done
10618
10619    if test "x$BDEPS_UNZIP" = x7z; then
10620        BDEPS_UNZIP="7z x"
10621    fi
10622
10623    for ac_prog in wget lftp ftp
10624do
10625  # Extract the first word of "$ac_prog", so it can be a program name with args.
10626set dummy $ac_prog; ac_word=$2
10627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10628$as_echo_n "checking for $ac_word... " >&6; }
10629if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10630  $as_echo_n "(cached) " >&6
10631else
10632  if test -n "$BDEPS_FTP"; then
10633  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10634else
10635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10636for as_dir in $PATH
10637do
10638  IFS=$as_save_IFS
10639  test -z "$as_dir" && as_dir=.
10640    for ac_exec_ext in '' $ac_executable_extensions; do
10641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10642    ac_cv_prog_BDEPS_FTP="$ac_prog"
10643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10644    break 2
10645  fi
10646done
10647  done
10648IFS=$as_save_IFS
10649
10650fi
10651fi
10652BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10653if test -n "$BDEPS_FTP"; then
10654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10655$as_echo "$BDEPS_FTP" >&6; }
10656else
10657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10658$as_echo "no" >&6; }
10659fi
10660
10661
10662  test -n "$BDEPS_FTP" && break
10663done
10664
10665
10666
10667###############################################################################
10668#
10669# Determine OpenJDK variants, options and version numbers.
10670#
10671###############################################################################
10672
10673# We need build & target for this.
10674
10675
10676###############################################################################
10677#
10678# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10679# We always build headless support.
10680#
10681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10682$as_echo_n "checking headful support... " >&6; }
10683# Check whether --enable-headful was given.
10684if test "${enable_headful+set}" = set; then :
10685  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10686else
10687  SUPPORT_HEADFUL=yes
10688fi
10689
10690
10691SUPPORT_HEADLESS=yes
10692BUILD_HEADLESS="BUILD_HEADLESS:=true"
10693
10694if test "x$SUPPORT_HEADFUL" = xyes; then
10695    # We are building both headful and headless.
10696    headful_msg="inlude support for both headful and headless"
10697fi
10698
10699if test "x$SUPPORT_HEADFUL" = xno; then
10700    # Thus we are building headless only.
10701    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10702    headful_msg="headless only"
10703fi
10704
10705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10706$as_echo "$headful_msg" >&6; }
10707
10708
10709
10710
10711
10712# Control wether Hotspot runs Queens test after build.
10713# Check whether --enable-hotspot-test-in-build was given.
10714if test "${enable_hotspot_test_in_build+set}" = set; then :
10715  enableval=$enable_hotspot_test_in_build;
10716else
10717  enable_hotspot_test_in_build=no
10718fi
10719
10720if test "x$enable_hotspot_test_in_build" = "xyes"; then
10721    TEST_IN_BUILD=true
10722else
10723    TEST_IN_BUILD=false
10724fi
10725
10726
10727###############################################################################
10728#
10729# Choose cacerts source file
10730#
10731
10732# Check whether --with-cacerts-file was given.
10733if test "${with_cacerts_file+set}" = set; then :
10734  withval=$with_cacerts_file;
10735fi
10736
10737if test "x$with_cacerts_file" != x; then
10738    CACERTS_FILE=$with_cacerts_file
10739else
10740    if test "x$OPENJDK" = "xtrue"; then
10741        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10742    else
10743        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10744    fi
10745fi
10746
10747
10748###############################################################################
10749#
10750# Enable or disable unlimited crypto
10751#
10752# Check whether --enable-unlimited-crypto was given.
10753if test "${enable_unlimited_crypto+set}" = set; then :
10754  enableval=$enable_unlimited_crypto;
10755else
10756  enable_unlimited_crypto=no
10757fi
10758
10759if test "x$enable_unlimited_crypto" = "xyes"; then
10760    UNLIMITED_CRYPTO=true
10761else
10762    UNLIMITED_CRYPTO=false
10763fi
10764
10765
10766###############################################################################
10767#
10768# Compress jars
10769#
10770COMPRESS_JARS=false
10771
10772
10773
10774
10775# Source the version numbers
10776. $AUTOCONF_DIR/version-numbers
10777
10778# Get the settings from parameters
10779
10780# Check whether --with-milestone was given.
10781if test "${with_milestone+set}" = set; then :
10782  withval=$with_milestone;
10783fi
10784
10785if test "x$with_milestone" = xyes; then
10786  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10787elif test "x$with_milestone" != x; then
10788    MILESTONE="$with_milestone"
10789fi
10790if test "x$MILESTONE" = x; then
10791  MILESTONE=internal
10792fi
10793
10794
10795# Check whether --with-build-number was given.
10796if test "${with_build_number+set}" = set; then :
10797  withval=$with_build_number;
10798fi
10799
10800if test "x$with_build_number" = xyes; then
10801  as_fn_error $? "Build number must have a value" "$LINENO" 5
10802elif test "x$with_build_number" != x; then
10803  JDK_BUILD_NUMBER="$with_build_number"
10804fi
10805if test "x$JDK_BUILD_NUMBER" = x; then
10806  JDK_BUILD_NUMBER=b00
10807fi
10808
10809
10810# Check whether --with-user-release-suffix was given.
10811if test "${with_user_release_suffix+set}" = set; then :
10812  withval=$with_user_release_suffix;
10813fi
10814
10815if test "x$with_user_release_suffix" = xyes; then
10816  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10817elif test "x$with_user_release_suffix" != x; then
10818  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10819else
10820  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10821  # Avoid [:alnum:] since it depends on the locale.
10822  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10823  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10824fi
10825
10826
10827# Now set the JDK version, milestone, build number etc.
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842COPYRIGHT_YEAR=`date +'%Y'`
10843
10844
10845if test "x$JDK_UPDATE_VERSION" != x; then
10846  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10847else
10848  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10849fi
10850
10851
10852COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10853
10854
10855
10856###############################################################################
10857#
10858# Setup BootJDK, used to bootstrap the build.
10859#
10860###############################################################################
10861
10862
10863BOOT_JDK_FOUND=no
10864
10865# Check whether --with-boot-jdk was given.
10866if test "${with_boot_jdk+set}" = set; then :
10867  withval=$with_boot_jdk;
10868fi
10869
10870
10871# We look for the Boot JDK through various means, going from more certain to
10872# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10873# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10874# must check if this is indeed valid; otherwise we'll continue looking.
10875
10876# Test: Is bootjdk explicitely set by command line arguments?
10877
10878  if test "x$BOOT_JDK_FOUND" = xno; then
10879    # Now execute the test
10880
10881if test "x$with_boot_jdk" != x; then
10882    BOOT_JDK=$with_boot_jdk
10883    BOOT_JDK_FOUND=maybe
10884    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10885$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10886fi
10887
10888
10889    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10890    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10891      # Do we have a bin/java?
10892      if test ! -x "$BOOT_JDK/bin/java"; then
10893        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10895        BOOT_JDK_FOUND=no
10896      else
10897        # Do we have a bin/javac?
10898        if test ! -x "$BOOT_JDK/bin/javac"; then
10899          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10901          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10902$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10903          BOOT_JDK_FOUND=no
10904        else
10905          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10906          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10907            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10909            BOOT_JDK_FOUND=no
10910          else
10911            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10912            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10913
10914            # Extra M4 quote needed to protect [] in grep expression.
10915            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10916            if test "x$FOUND_VERSION_78" = x; then
10917              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10919              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10920$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10921              BOOT_JDK_FOUND=no
10922            else
10923              # We're done! :-)
10924              BOOT_JDK_FOUND=yes
10925
10926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10927
10928  # Input might be given as Windows format, start by converting to
10929  # unix format.
10930  path="$BOOT_JDK"
10931  new_path=`$CYGPATH -u "$path"`
10932
10933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10936  # "foo.exe" is OK but "foo" is an error.
10937  #
10938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10939  # It is also a way to make sure we got the proper file name for the real test later on.
10940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10941  if test "x$test_shortpath" = x; then
10942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10944    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10945  fi
10946
10947  # Call helper function which possibly converts this using DOS-style short mode.
10948  # If so, the updated path is stored in $new_path.
10949
10950  input_path="$new_path"
10951  # Check if we need to convert this using DOS-style short mode. If the path
10952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10953  # take no chances and rewrite it.
10954  # Note: m4 eats our [], so we need to use [ and ] instead.
10955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10956  if test "x$has_forbidden_chars" != x; then
10957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10961      # Going to short mode and back again did indeed matter. Since short mode is
10962      # case insensitive, let's make it lowercase to improve readability.
10963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10964      # Now convert it back to Unix-stile (cygpath)
10965      input_path=`$CYGPATH -u "$shortmode_path"`
10966      new_path="$input_path"
10967    fi
10968  fi
10969
10970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10971  if test "x$test_cygdrive_prefix" = x; then
10972    # As a simple fix, exclude /usr/bin since it's not a real path.
10973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10975      # a path prefixed by /cygdrive for fixpath to work.
10976      new_path="$CYGWIN_ROOT_PATH$input_path"
10977    fi
10978  fi
10979
10980
10981  if test "x$path" != "x$new_path"; then
10982    BOOT_JDK="$new_path"
10983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10984$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10985  fi
10986
10987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10988
10989  path="$BOOT_JDK"
10990  has_colon=`$ECHO $path | $GREP ^.:`
10991  new_path="$path"
10992  if test "x$has_colon" = x; then
10993    # Not in mixed or Windows style, start by that.
10994    new_path=`cmd //c echo $path`
10995  fi
10996
10997
10998  input_path="$new_path"
10999  # Check if we need to convert this using DOS-style short mode. If the path
11000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11001  # take no chances and rewrite it.
11002  # Note: m4 eats our [], so we need to use [ and ] instead.
11003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11004  if test "x$has_forbidden_chars" != x; then
11005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11007  fi
11008
11009
11010  windows_path="$new_path"
11011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11012    unix_path=`$CYGPATH -u "$windows_path"`
11013    new_path="$unix_path"
11014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11016    new_path="$unix_path"
11017  fi
11018
11019  if test "x$path" != "x$new_path"; then
11020    BOOT_JDK="$new_path"
11021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11023  fi
11024
11025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11027
11028  else
11029    # We're on a posix platform. Hooray! :)
11030    path="$BOOT_JDK"
11031
11032    if test ! -f "$path" && test ! -d "$path"; then
11033      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11034    fi
11035
11036    has_space=`$ECHO "$path" | $GREP " "`
11037    if test "x$has_space" != x; then
11038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11040      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11041    fi
11042  fi
11043
11044              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11045$as_echo_n "checking for Boot JDK... " >&6; }
11046              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11047$as_echo "$BOOT_JDK" >&6; }
11048              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11049$as_echo_n "checking Boot JDK version... " >&6; }
11050              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11051              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11052$as_echo "$BOOT_JDK_VERSION" >&6; }
11053            fi # end check jdk version
11054          fi # end check rt.jar
11055        fi # end check javac
11056      fi # end check java
11057    fi # end check boot jdk found
11058  fi
11059
11060if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11061  # Having specified an argument which is incorrect will produce an instant failure;
11062  # we should not go on looking
11063  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11064fi
11065
11066# Test: Is bootjdk available from builddeps?
11067
11068  if test "x$BOOT_JDK_FOUND" = xno; then
11069    # Now execute the test
11070
11071
11072
11073    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11074        # Source the builddeps file again, to make sure it uses the latest variables!
11075        . $builddepsfile
11076        # Look for a target and build machine specific resource!
11077        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11078        if test "x$resource" = x; then
11079            # Ok, lets instead look for a target specific resource
11080            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11081        fi
11082        if test "x$resource" = x; then
11083            # Ok, lets instead look for a build specific resource
11084            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11085        fi
11086        if test "x$resource" = x; then
11087            # Ok, lets instead look for a generic resource
11088            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11089            resource=${builddep_bootjdk}
11090        fi
11091        if test "x$resource" != x; then
11092            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11093$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11094	    # If the resource in the builddeps.conf file is an existing directory,
11095	    # for example /java/linux/cups
11096	    if test -d ${resource}; then
11097	       depdir=${resource}
11098	    else
11099
11100# bootjdk is for example mymodule
11101# $resource is for example libs/general/libmymod_1_2_3.zip
11102# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11103# $with_builddeps_dir is for example /localhome/builddeps
11104# depdir is the name of the variable into which we store the depdir, eg MYMOD
11105# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11106# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11107    filename=`basename $resource`
11108    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11109    filebase=${filename%%.*}
11110    extension=${filename#*.}
11111    installdir=$with_builddeps_dir/$filebase
11112    if test ! -f $installdir/$filename.unpacked; then
11113        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11114$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11115        if test ! -d $installdir; then
11116            mkdir -p $installdir
11117        fi
11118        if test ! -d $installdir; then
11119            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11120        fi
11121        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11122        touch $tmpfile
11123        if test ! -f $tmpfile; then
11124            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11125        fi
11126
11127    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11128    # $tmpfile is the local file name for the downloaded file.
11129    VALID_TOOL=no
11130    if test "x$BDEPS_FTP" = xwget; then
11131       VALID_TOOL=yes
11132       wget -O $tmpfile $with_builddeps_server/$resource
11133    fi
11134    if test "x$BDEPS_FTP" = xlftp; then
11135       VALID_TOOL=yes
11136       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11137    fi
11138    if test "x$BDEPS_FTP" = xftp; then
11139        VALID_TOOL=yes
11140        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11141        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11142        FTPUSERPWD=${FTPSERVER%%@*}
11143        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11144            FTPUSER=${userpwd%%:*}
11145            FTPPWD=${userpwd#*@}
11146            FTPSERVER=${FTPSERVER#*@}
11147        else
11148            FTPUSER=ftp
11149            FTPPWD=ftp
11150        fi
11151        # the "pass" command does not work on some
11152        # ftp clients (read ftp.exe) but if it works,
11153        # passive mode is better!
11154        (\
11155            echo "user $FTPUSER $FTPPWD"        ;\
11156            echo "pass"                         ;\
11157            echo "bin"                          ;\
11158            echo "get $FTPPATH $tmpfile"              ;\
11159        ) | ftp -in $FTPSERVER
11160    fi
11161    if test "x$VALID_TOOL" != xyes; then
11162       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11163    fi
11164
11165        mv $tmpfile $installdir/$filename
11166        if test ! -s $installdir/$filename; then
11167            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11168        fi
11169        case "$extension" in
11170            zip)  echo "Unzipping $installdir/$filename..."
11171               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11172            ;;
11173            tar.gz) echo "Untaring $installdir/$filename..."
11174               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11175            ;;
11176            tgz) echo "Untaring $installdir/$filename..."
11177               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11178            ;;
11179            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11180            ;;
11181        esac
11182    fi
11183    if test -f $installdir/$filename.unpacked; then
11184        depdir=$installdir
11185    fi
11186
11187	    fi
11188            # Source the builddeps file again, because in the previous command, the depdir
11189            # was updated to point at the current build dependency install directory.
11190            . $builddepsfile
11191            # Now extract variables from the builddeps.conf files.
11192            theroot=${builddep_bootjdk_ROOT}
11193            thecflags=${builddep_bootjdk_CFLAGS}
11194            thelibs=${builddep_bootjdk_LIBS}
11195            if test "x$depdir" = x; then
11196                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11197            fi
11198            BOOT_JDK=$depdir
11199            if test "x$theroot" != x; then
11200               BOOT_JDK="$theroot"
11201            fi
11202            if test "x$thecflags" != x; then
11203               BOOT_JDK_CFLAGS="$thecflags"
11204            fi
11205            if test "x$thelibs" != x; then
11206               BOOT_JDK_LIBS="$thelibs"
11207            fi
11208            BOOT_JDK_FOUND=maybe
11209            else BOOT_JDK_FOUND=no
11210
11211        fi
11212        else BOOT_JDK_FOUND=no
11213
11214    fi
11215
11216
11217
11218    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11219    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11220      # Do we have a bin/java?
11221      if test ! -x "$BOOT_JDK/bin/java"; then
11222        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11224        BOOT_JDK_FOUND=no
11225      else
11226        # Do we have a bin/javac?
11227        if test ! -x "$BOOT_JDK/bin/javac"; then
11228          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11230          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11231$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11232          BOOT_JDK_FOUND=no
11233        else
11234          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11235          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11236            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11238            BOOT_JDK_FOUND=no
11239          else
11240            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11242
11243            # Extra M4 quote needed to protect [] in grep expression.
11244            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11245            if test "x$FOUND_VERSION_78" = x; then
11246              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11248              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11249$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11250              BOOT_JDK_FOUND=no
11251            else
11252              # We're done! :-)
11253              BOOT_JDK_FOUND=yes
11254
11255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11256
11257  # Input might be given as Windows format, start by converting to
11258  # unix format.
11259  path="$BOOT_JDK"
11260  new_path=`$CYGPATH -u "$path"`
11261
11262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11265  # "foo.exe" is OK but "foo" is an error.
11266  #
11267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11268  # It is also a way to make sure we got the proper file name for the real test later on.
11269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11270  if test "x$test_shortpath" = x; then
11271    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11273    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11274  fi
11275
11276  # Call helper function which possibly converts this using DOS-style short mode.
11277  # If so, the updated path is stored in $new_path.
11278
11279  input_path="$new_path"
11280  # Check if we need to convert this using DOS-style short mode. If the path
11281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11282  # take no chances and rewrite it.
11283  # Note: m4 eats our [], so we need to use [ and ] instead.
11284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11285  if test "x$has_forbidden_chars" != x; then
11286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11290      # Going to short mode and back again did indeed matter. Since short mode is
11291      # case insensitive, let's make it lowercase to improve readability.
11292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11293      # Now convert it back to Unix-stile (cygpath)
11294      input_path=`$CYGPATH -u "$shortmode_path"`
11295      new_path="$input_path"
11296    fi
11297  fi
11298
11299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11300  if test "x$test_cygdrive_prefix" = x; then
11301    # As a simple fix, exclude /usr/bin since it's not a real path.
11302    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11304      # a path prefixed by /cygdrive for fixpath to work.
11305      new_path="$CYGWIN_ROOT_PATH$input_path"
11306    fi
11307  fi
11308
11309
11310  if test "x$path" != "x$new_path"; then
11311    BOOT_JDK="$new_path"
11312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11314  fi
11315
11316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11317
11318  path="$BOOT_JDK"
11319  has_colon=`$ECHO $path | $GREP ^.:`
11320  new_path="$path"
11321  if test "x$has_colon" = x; then
11322    # Not in mixed or Windows style, start by that.
11323    new_path=`cmd //c echo $path`
11324  fi
11325
11326
11327  input_path="$new_path"
11328  # Check if we need to convert this using DOS-style short mode. If the path
11329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11330  # take no chances and rewrite it.
11331  # Note: m4 eats our [], so we need to use [ and ] instead.
11332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11333  if test "x$has_forbidden_chars" != x; then
11334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11336  fi
11337
11338
11339  windows_path="$new_path"
11340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11341    unix_path=`$CYGPATH -u "$windows_path"`
11342    new_path="$unix_path"
11343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11345    new_path="$unix_path"
11346  fi
11347
11348  if test "x$path" != "x$new_path"; then
11349    BOOT_JDK="$new_path"
11350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11352  fi
11353
11354  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11355  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11356
11357  else
11358    # We're on a posix platform. Hooray! :)
11359    path="$BOOT_JDK"
11360
11361    if test ! -f "$path" && test ! -d "$path"; then
11362      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11363    fi
11364
11365    has_space=`$ECHO "$path" | $GREP " "`
11366    if test "x$has_space" != x; then
11367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11369      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11370    fi
11371  fi
11372
11373              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11374$as_echo_n "checking for Boot JDK... " >&6; }
11375              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11376$as_echo "$BOOT_JDK" >&6; }
11377              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11378$as_echo_n "checking Boot JDK version... " >&6; }
11379              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11380              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11381$as_echo "$BOOT_JDK_VERSION" >&6; }
11382            fi # end check jdk version
11383          fi # end check rt.jar
11384        fi # end check javac
11385      fi # end check java
11386    fi # end check boot jdk found
11387  fi
11388
11389
11390# Test: Is $JAVA_HOME set?
11391
11392  if test "x$BOOT_JDK_FOUND" = xno; then
11393    # Now execute the test
11394
11395    if test "x$JAVA_HOME" != x; then
11396        JAVA_HOME_PROCESSED="$JAVA_HOME"
11397
11398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11399
11400  # Input might be given as Windows format, start by converting to
11401  # unix format.
11402  path="$JAVA_HOME_PROCESSED"
11403  new_path=`$CYGPATH -u "$path"`
11404
11405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11408  # "foo.exe" is OK but "foo" is an error.
11409  #
11410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11411  # It is also a way to make sure we got the proper file name for the real test later on.
11412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11413  if test "x$test_shortpath" = x; then
11414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11415$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11416    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11417  fi
11418
11419  # Call helper function which possibly converts this using DOS-style short mode.
11420  # If so, the updated path is stored in $new_path.
11421
11422  input_path="$new_path"
11423  # Check if we need to convert this using DOS-style short mode. If the path
11424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11425  # take no chances and rewrite it.
11426  # Note: m4 eats our [], so we need to use [ and ] instead.
11427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11428  if test "x$has_forbidden_chars" != x; then
11429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11433      # Going to short mode and back again did indeed matter. Since short mode is
11434      # case insensitive, let's make it lowercase to improve readability.
11435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11436      # Now convert it back to Unix-stile (cygpath)
11437      input_path=`$CYGPATH -u "$shortmode_path"`
11438      new_path="$input_path"
11439    fi
11440  fi
11441
11442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11443  if test "x$test_cygdrive_prefix" = x; then
11444    # As a simple fix, exclude /usr/bin since it's not a real path.
11445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11447      # a path prefixed by /cygdrive for fixpath to work.
11448      new_path="$CYGWIN_ROOT_PATH$input_path"
11449    fi
11450  fi
11451
11452
11453  if test "x$path" != "x$new_path"; then
11454    JAVA_HOME_PROCESSED="$new_path"
11455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11456$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11457  fi
11458
11459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11460
11461  path="$JAVA_HOME_PROCESSED"
11462  has_colon=`$ECHO $path | $GREP ^.:`
11463  new_path="$path"
11464  if test "x$has_colon" = x; then
11465    # Not in mixed or Windows style, start by that.
11466    new_path=`cmd //c echo $path`
11467  fi
11468
11469
11470  input_path="$new_path"
11471  # Check if we need to convert this using DOS-style short mode. If the path
11472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11473  # take no chances and rewrite it.
11474  # Note: m4 eats our [], so we need to use [ and ] instead.
11475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11476  if test "x$has_forbidden_chars" != x; then
11477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11479  fi
11480
11481
11482  windows_path="$new_path"
11483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11484    unix_path=`$CYGPATH -u "$windows_path"`
11485    new_path="$unix_path"
11486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11488    new_path="$unix_path"
11489  fi
11490
11491  if test "x$path" != "x$new_path"; then
11492    JAVA_HOME_PROCESSED="$new_path"
11493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11494$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11495  fi
11496
11497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11499
11500  else
11501    # We're on a posix platform. Hooray! :)
11502    path="$JAVA_HOME_PROCESSED"
11503
11504    if test ! -f "$path" && test ! -d "$path"; then
11505      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11506    fi
11507
11508    has_space=`$ECHO "$path" | $GREP " "`
11509    if test "x$has_space" != x; then
11510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11511$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11512      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11513    fi
11514  fi
11515
11516        if test ! -d "$JAVA_HOME_PROCESSED"; then
11517            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11518$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11519        else
11520          # Aha, the user has set a JAVA_HOME
11521          # let us use that as the Boot JDK.
11522          BOOT_JDK="$JAVA_HOME_PROCESSED"
11523          BOOT_JDK_FOUND=maybe
11524          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11525$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11526        fi
11527    fi
11528
11529
11530    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11531    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11532      # Do we have a bin/java?
11533      if test ! -x "$BOOT_JDK/bin/java"; then
11534        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11536        BOOT_JDK_FOUND=no
11537      else
11538        # Do we have a bin/javac?
11539        if test ! -x "$BOOT_JDK/bin/javac"; then
11540          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11542          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11543$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11544          BOOT_JDK_FOUND=no
11545        else
11546          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11547          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11548            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11550            BOOT_JDK_FOUND=no
11551          else
11552            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11553            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11554
11555            # Extra M4 quote needed to protect [] in grep expression.
11556            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11557            if test "x$FOUND_VERSION_78" = x; then
11558              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11560              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11561$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11562              BOOT_JDK_FOUND=no
11563            else
11564              # We're done! :-)
11565              BOOT_JDK_FOUND=yes
11566
11567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11568
11569  # Input might be given as Windows format, start by converting to
11570  # unix format.
11571  path="$BOOT_JDK"
11572  new_path=`$CYGPATH -u "$path"`
11573
11574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11577  # "foo.exe" is OK but "foo" is an error.
11578  #
11579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11580  # It is also a way to make sure we got the proper file name for the real test later on.
11581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11582  if test "x$test_shortpath" = x; then
11583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11585    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11586  fi
11587
11588  # Call helper function which possibly converts this using DOS-style short mode.
11589  # If so, the updated path is stored in $new_path.
11590
11591  input_path="$new_path"
11592  # Check if we need to convert this using DOS-style short mode. If the path
11593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11594  # take no chances and rewrite it.
11595  # Note: m4 eats our [], so we need to use [ and ] instead.
11596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11597  if test "x$has_forbidden_chars" != x; then
11598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11602      # Going to short mode and back again did indeed matter. Since short mode is
11603      # case insensitive, let's make it lowercase to improve readability.
11604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11605      # Now convert it back to Unix-stile (cygpath)
11606      input_path=`$CYGPATH -u "$shortmode_path"`
11607      new_path="$input_path"
11608    fi
11609  fi
11610
11611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11612  if test "x$test_cygdrive_prefix" = x; then
11613    # As a simple fix, exclude /usr/bin since it's not a real path.
11614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11616      # a path prefixed by /cygdrive for fixpath to work.
11617      new_path="$CYGWIN_ROOT_PATH$input_path"
11618    fi
11619  fi
11620
11621
11622  if test "x$path" != "x$new_path"; then
11623    BOOT_JDK="$new_path"
11624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11625$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11626  fi
11627
11628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11629
11630  path="$BOOT_JDK"
11631  has_colon=`$ECHO $path | $GREP ^.:`
11632  new_path="$path"
11633  if test "x$has_colon" = x; then
11634    # Not in mixed or Windows style, start by that.
11635    new_path=`cmd //c echo $path`
11636  fi
11637
11638
11639  input_path="$new_path"
11640  # Check if we need to convert this using DOS-style short mode. If the path
11641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11642  # take no chances and rewrite it.
11643  # Note: m4 eats our [], so we need to use [ and ] instead.
11644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11645  if test "x$has_forbidden_chars" != x; then
11646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11648  fi
11649
11650
11651  windows_path="$new_path"
11652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11653    unix_path=`$CYGPATH -u "$windows_path"`
11654    new_path="$unix_path"
11655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11657    new_path="$unix_path"
11658  fi
11659
11660  if test "x$path" != "x$new_path"; then
11661    BOOT_JDK="$new_path"
11662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11663$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11664  fi
11665
11666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11668
11669  else
11670    # We're on a posix platform. Hooray! :)
11671    path="$BOOT_JDK"
11672
11673    if test ! -f "$path" && test ! -d "$path"; then
11674      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11675    fi
11676
11677    has_space=`$ECHO "$path" | $GREP " "`
11678    if test "x$has_space" != x; then
11679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11681      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11682    fi
11683  fi
11684
11685              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11686$as_echo_n "checking for Boot JDK... " >&6; }
11687              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11688$as_echo "$BOOT_JDK" >&6; }
11689              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11690$as_echo_n "checking Boot JDK version... " >&6; }
11691              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11692              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11693$as_echo "$BOOT_JDK_VERSION" >&6; }
11694            fi # end check jdk version
11695          fi # end check rt.jar
11696        fi # end check javac
11697      fi # end check java
11698    fi # end check boot jdk found
11699  fi
11700
11701
11702# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11703
11704  if test "x$BOOT_JDK_FOUND" = xno; then
11705    # Now execute the test
11706
11707    if test -x /usr/libexec/java_home; then
11708        BOOT_JDK=`/usr/libexec/java_home`
11709        BOOT_JDK_FOUND=maybe
11710        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11711$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11712    fi
11713
11714
11715    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11716    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11717      # Do we have a bin/java?
11718      if test ! -x "$BOOT_JDK/bin/java"; then
11719        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11721        BOOT_JDK_FOUND=no
11722      else
11723        # Do we have a bin/javac?
11724        if test ! -x "$BOOT_JDK/bin/javac"; then
11725          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11727          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11728$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11729          BOOT_JDK_FOUND=no
11730        else
11731          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11732          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11733            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11735            BOOT_JDK_FOUND=no
11736          else
11737            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11738            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11739
11740            # Extra M4 quote needed to protect [] in grep expression.
11741            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11742            if test "x$FOUND_VERSION_78" = x; then
11743              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11745              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11746$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11747              BOOT_JDK_FOUND=no
11748            else
11749              # We're done! :-)
11750              BOOT_JDK_FOUND=yes
11751
11752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11753
11754  # Input might be given as Windows format, start by converting to
11755  # unix format.
11756  path="$BOOT_JDK"
11757  new_path=`$CYGPATH -u "$path"`
11758
11759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11762  # "foo.exe" is OK but "foo" is an error.
11763  #
11764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11765  # It is also a way to make sure we got the proper file name for the real test later on.
11766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11767  if test "x$test_shortpath" = x; then
11768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11769$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11770    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11771  fi
11772
11773  # Call helper function which possibly converts this using DOS-style short mode.
11774  # If so, the updated path is stored in $new_path.
11775
11776  input_path="$new_path"
11777  # Check if we need to convert this using DOS-style short mode. If the path
11778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11779  # take no chances and rewrite it.
11780  # Note: m4 eats our [], so we need to use [ and ] instead.
11781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11782  if test "x$has_forbidden_chars" != x; then
11783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11787      # Going to short mode and back again did indeed matter. Since short mode is
11788      # case insensitive, let's make it lowercase to improve readability.
11789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11790      # Now convert it back to Unix-stile (cygpath)
11791      input_path=`$CYGPATH -u "$shortmode_path"`
11792      new_path="$input_path"
11793    fi
11794  fi
11795
11796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11797  if test "x$test_cygdrive_prefix" = x; then
11798    # As a simple fix, exclude /usr/bin since it's not a real path.
11799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11801      # a path prefixed by /cygdrive for fixpath to work.
11802      new_path="$CYGWIN_ROOT_PATH$input_path"
11803    fi
11804  fi
11805
11806
11807  if test "x$path" != "x$new_path"; then
11808    BOOT_JDK="$new_path"
11809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11811  fi
11812
11813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11814
11815  path="$BOOT_JDK"
11816  has_colon=`$ECHO $path | $GREP ^.:`
11817  new_path="$path"
11818  if test "x$has_colon" = x; then
11819    # Not in mixed or Windows style, start by that.
11820    new_path=`cmd //c echo $path`
11821  fi
11822
11823
11824  input_path="$new_path"
11825  # Check if we need to convert this using DOS-style short mode. If the path
11826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11827  # take no chances and rewrite it.
11828  # Note: m4 eats our [], so we need to use [ and ] instead.
11829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11830  if test "x$has_forbidden_chars" != x; then
11831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11833  fi
11834
11835
11836  windows_path="$new_path"
11837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11838    unix_path=`$CYGPATH -u "$windows_path"`
11839    new_path="$unix_path"
11840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11842    new_path="$unix_path"
11843  fi
11844
11845  if test "x$path" != "x$new_path"; then
11846    BOOT_JDK="$new_path"
11847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11848$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11849  fi
11850
11851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11853
11854  else
11855    # We're on a posix platform. Hooray! :)
11856    path="$BOOT_JDK"
11857
11858    if test ! -f "$path" && test ! -d "$path"; then
11859      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11860    fi
11861
11862    has_space=`$ECHO "$path" | $GREP " "`
11863    if test "x$has_space" != x; then
11864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11866      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11867    fi
11868  fi
11869
11870              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11871$as_echo_n "checking for Boot JDK... " >&6; }
11872              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11873$as_echo "$BOOT_JDK" >&6; }
11874              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11875$as_echo_n "checking Boot JDK version... " >&6; }
11876              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11877              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11878$as_echo "$BOOT_JDK_VERSION" >&6; }
11879            fi # end check jdk version
11880          fi # end check rt.jar
11881        fi # end check javac
11882      fi # end check java
11883    fi # end check boot jdk found
11884  fi
11885
11886
11887# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11888
11889  if test "x$BOOT_JDK_FOUND" = xno; then
11890    # Now execute the test
11891
11892    # Extract the first word of "javac", so it can be a program name with args.
11893set dummy javac; ac_word=$2
11894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11895$as_echo_n "checking for $ac_word... " >&6; }
11896if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11897  $as_echo_n "(cached) " >&6
11898else
11899  case $JAVAC_CHECK in
11900  [\\/]* | ?:[\\/]*)
11901  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11902  ;;
11903  *)
11904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11905for as_dir in $PATH
11906do
11907  IFS=$as_save_IFS
11908  test -z "$as_dir" && as_dir=.
11909    for ac_exec_ext in '' $ac_executable_extensions; do
11910  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11911    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11913    break 2
11914  fi
11915done
11916  done
11917IFS=$as_save_IFS
11918
11919  ;;
11920esac
11921fi
11922JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11923if test -n "$JAVAC_CHECK"; then
11924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11925$as_echo "$JAVAC_CHECK" >&6; }
11926else
11927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11928$as_echo "no" >&6; }
11929fi
11930
11931
11932    # Extract the first word of "java", so it can be a program name with args.
11933set dummy java; ac_word=$2
11934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11935$as_echo_n "checking for $ac_word... " >&6; }
11936if ${ac_cv_path_JAVA_CHECK+:} false; then :
11937  $as_echo_n "(cached) " >&6
11938else
11939  case $JAVA_CHECK in
11940  [\\/]* | ?:[\\/]*)
11941  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11942  ;;
11943  *)
11944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11945for as_dir in $PATH
11946do
11947  IFS=$as_save_IFS
11948  test -z "$as_dir" && as_dir=.
11949    for ac_exec_ext in '' $ac_executable_extensions; do
11950  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11951    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11953    break 2
11954  fi
11955done
11956  done
11957IFS=$as_save_IFS
11958
11959  ;;
11960esac
11961fi
11962JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11963if test -n "$JAVA_CHECK"; then
11964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11965$as_echo "$JAVA_CHECK" >&6; }
11966else
11967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11968$as_echo "no" >&6; }
11969fi
11970
11971
11972    BINARY="$JAVAC_CHECK"
11973    if test "x$JAVAC_CHECK" = x; then
11974        BINARY="$JAVA_CHECK"
11975    fi
11976    if test "x$BINARY" != x; then
11977        # So there is a java(c) binary, it might be part of a JDK.
11978        # Lets find the JDK/JRE directory by following symbolic links.
11979        # Linux/GNU systems often have links from /usr/bin/java to
11980        # /etc/alternatives/java to the real JDK binary.
11981
11982    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11983        # Follow a chain of symbolic links. Use readlink
11984        # where it exists, else fall back to horribly
11985        # complicated shell code.
11986        if test "x$READLINK_TESTED" != yes; then
11987            # On MacOSX there is a readlink tool with a different
11988            # purpose than the GNU readlink tool. Check the found readlink.
11989            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11990            if test "x$ISGNU" = x; then
11991                 # A readlink that we do not know how to use.
11992                 # Are there other non-GNU readlinks out there?
11993                 READLINK_TESTED=yes
11994                 READLINK=
11995            fi
11996        fi
11997
11998        if test "x$READLINK" != x; then
11999            BINARY=`$READLINK -f $BINARY`
12000        else
12001            # Save the current directory for restoring afterwards
12002            STARTDIR=$PWD
12003            COUNTER=0
12004            sym_link_dir=`$DIRNAME $BINARY`
12005            sym_link_file=`$BASENAME $BINARY`
12006            # Use the system pwd and not the shell builtin to resolve directory symlinks
12007            cd $sym_link_dir
12008            cd `$THEPWDCMD`
12009            sym_link_dir=`$THEPWDCMD`
12010            # Resolve file symlinks
12011            while test $COUNTER -lt 20; do
12012                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12013                if test "x$ISLINK" == x; then
12014                    # This is not a symbolic link! We are done!
12015                    break
12016                fi
12017                # Again resolve directory symlinks since the target of the just found
12018                # link could be in a different directory
12019                cd `$DIRNAME $ISLINK`
12020                sym_link_dir=`$THEPWDCMD`
12021                sym_link_file=`$BASENAME $ISLINK`
12022                let COUNTER=COUNTER+1
12023            done
12024            cd $STARTDIR
12025            BINARY=$sym_link_dir/$sym_link_file
12026        fi
12027    fi
12028
12029        BOOT_JDK=`dirname "$BINARY"`
12030        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12031        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12032            # Looks like we found ourselves an JDK
12033            BOOT_JDK_FOUND=maybe
12034            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12035$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12036        fi
12037    fi
12038
12039
12040    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12041    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12042      # Do we have a bin/java?
12043      if test ! -x "$BOOT_JDK/bin/java"; then
12044        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12045$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12046        BOOT_JDK_FOUND=no
12047      else
12048        # Do we have a bin/javac?
12049        if test ! -x "$BOOT_JDK/bin/javac"; then
12050          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12052          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12053$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12054          BOOT_JDK_FOUND=no
12055        else
12056          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12057          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12058            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12060            BOOT_JDK_FOUND=no
12061          else
12062            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12063            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12064
12065            # Extra M4 quote needed to protect [] in grep expression.
12066            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12067            if test "x$FOUND_VERSION_78" = x; then
12068              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12070              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12071$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12072              BOOT_JDK_FOUND=no
12073            else
12074              # We're done! :-)
12075              BOOT_JDK_FOUND=yes
12076
12077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12078
12079  # Input might be given as Windows format, start by converting to
12080  # unix format.
12081  path="$BOOT_JDK"
12082  new_path=`$CYGPATH -u "$path"`
12083
12084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12087  # "foo.exe" is OK but "foo" is an error.
12088  #
12089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12090  # It is also a way to make sure we got the proper file name for the real test later on.
12091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12092  if test "x$test_shortpath" = x; then
12093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12095    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12096  fi
12097
12098  # Call helper function which possibly converts this using DOS-style short mode.
12099  # If so, the updated path is stored in $new_path.
12100
12101  input_path="$new_path"
12102  # Check if we need to convert this using DOS-style short mode. If the path
12103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12104  # take no chances and rewrite it.
12105  # Note: m4 eats our [], so we need to use [ and ] instead.
12106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12107  if test "x$has_forbidden_chars" != x; then
12108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12112      # Going to short mode and back again did indeed matter. Since short mode is
12113      # case insensitive, let's make it lowercase to improve readability.
12114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12115      # Now convert it back to Unix-stile (cygpath)
12116      input_path=`$CYGPATH -u "$shortmode_path"`
12117      new_path="$input_path"
12118    fi
12119  fi
12120
12121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12122  if test "x$test_cygdrive_prefix" = x; then
12123    # As a simple fix, exclude /usr/bin since it's not a real path.
12124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12126      # a path prefixed by /cygdrive for fixpath to work.
12127      new_path="$CYGWIN_ROOT_PATH$input_path"
12128    fi
12129  fi
12130
12131
12132  if test "x$path" != "x$new_path"; then
12133    BOOT_JDK="$new_path"
12134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12135$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12136  fi
12137
12138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12139
12140  path="$BOOT_JDK"
12141  has_colon=`$ECHO $path | $GREP ^.:`
12142  new_path="$path"
12143  if test "x$has_colon" = x; then
12144    # Not in mixed or Windows style, start by that.
12145    new_path=`cmd //c echo $path`
12146  fi
12147
12148
12149  input_path="$new_path"
12150  # Check if we need to convert this using DOS-style short mode. If the path
12151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12152  # take no chances and rewrite it.
12153  # Note: m4 eats our [], so we need to use [ and ] instead.
12154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12155  if test "x$has_forbidden_chars" != x; then
12156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12158  fi
12159
12160
12161  windows_path="$new_path"
12162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12163    unix_path=`$CYGPATH -u "$windows_path"`
12164    new_path="$unix_path"
12165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12167    new_path="$unix_path"
12168  fi
12169
12170  if test "x$path" != "x$new_path"; then
12171    BOOT_JDK="$new_path"
12172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12173$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12174  fi
12175
12176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12178
12179  else
12180    # We're on a posix platform. Hooray! :)
12181    path="$BOOT_JDK"
12182
12183    if test ! -f "$path" && test ! -d "$path"; then
12184      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12185    fi
12186
12187    has_space=`$ECHO "$path" | $GREP " "`
12188    if test "x$has_space" != x; then
12189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12191      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12192    fi
12193  fi
12194
12195              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12196$as_echo_n "checking for Boot JDK... " >&6; }
12197              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12198$as_echo "$BOOT_JDK" >&6; }
12199              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12200$as_echo_n "checking Boot JDK version... " >&6; }
12201              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12202              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12203$as_echo "$BOOT_JDK_VERSION" >&6; }
12204            fi # end check jdk version
12205          fi # end check rt.jar
12206        fi # end check javac
12207      fi # end check java
12208    fi # end check boot jdk found
12209  fi
12210
12211
12212# Test: Is there a JDK installed in default, well-known locations?
12213
12214  if test "x$BOOT_JDK_FOUND" = xno; then
12215    # Now execute the test
12216
12217  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12218
12219  if test "x$BOOT_JDK_FOUND" = xno; then
12220    # Now execute the test
12221
12222  if test "x$ProgramW6432" != x; then
12223    VIRTUAL_DIR="$ProgramW6432/Java"
12224
12225  windows_path="$VIRTUAL_DIR"
12226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12227    unix_path=`$CYGPATH -u "$windows_path"`
12228    VIRTUAL_DIR="$unix_path"
12229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12231    VIRTUAL_DIR="$unix_path"
12232  fi
12233
12234
12235  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12236  BOOT_JDK_SUFFIX=""
12237  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12238  if test "x$ALL_JDKS_FOUND" != x; then
12239    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12240
12241  if test "x$BOOT_JDK_FOUND" = xno; then
12242    # Now execute the test
12243
12244        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12245        if test -d "$BOOT_JDK"; then
12246          BOOT_JDK_FOUND=maybe
12247          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12248$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12249        fi
12250
12251
12252    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12253    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12254      # Do we have a bin/java?
12255      if test ! -x "$BOOT_JDK/bin/java"; then
12256        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12258        BOOT_JDK_FOUND=no
12259      else
12260        # Do we have a bin/javac?
12261        if test ! -x "$BOOT_JDK/bin/javac"; then
12262          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12264          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12265$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12266          BOOT_JDK_FOUND=no
12267        else
12268          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12269          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12270            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12272            BOOT_JDK_FOUND=no
12273          else
12274            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12275            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12276
12277            # Extra M4 quote needed to protect [] in grep expression.
12278            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12279            if test "x$FOUND_VERSION_78" = x; then
12280              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12282              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12283$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12284              BOOT_JDK_FOUND=no
12285            else
12286              # We're done! :-)
12287              BOOT_JDK_FOUND=yes
12288
12289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12290
12291  # Input might be given as Windows format, start by converting to
12292  # unix format.
12293  path="$BOOT_JDK"
12294  new_path=`$CYGPATH -u "$path"`
12295
12296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12299  # "foo.exe" is OK but "foo" is an error.
12300  #
12301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12302  # It is also a way to make sure we got the proper file name for the real test later on.
12303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12304  if test "x$test_shortpath" = x; then
12305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12307    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12308  fi
12309
12310  # Call helper function which possibly converts this using DOS-style short mode.
12311  # If so, the updated path is stored in $new_path.
12312
12313  input_path="$new_path"
12314  # Check if we need to convert this using DOS-style short mode. If the path
12315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12316  # take no chances and rewrite it.
12317  # Note: m4 eats our [], so we need to use [ and ] instead.
12318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12319  if test "x$has_forbidden_chars" != x; then
12320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12324      # Going to short mode and back again did indeed matter. Since short mode is
12325      # case insensitive, let's make it lowercase to improve readability.
12326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12327      # Now convert it back to Unix-stile (cygpath)
12328      input_path=`$CYGPATH -u "$shortmode_path"`
12329      new_path="$input_path"
12330    fi
12331  fi
12332
12333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12334  if test "x$test_cygdrive_prefix" = x; then
12335    # As a simple fix, exclude /usr/bin since it's not a real path.
12336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12338      # a path prefixed by /cygdrive for fixpath to work.
12339      new_path="$CYGWIN_ROOT_PATH$input_path"
12340    fi
12341  fi
12342
12343
12344  if test "x$path" != "x$new_path"; then
12345    BOOT_JDK="$new_path"
12346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12347$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12348  fi
12349
12350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12351
12352  path="$BOOT_JDK"
12353  has_colon=`$ECHO $path | $GREP ^.:`
12354  new_path="$path"
12355  if test "x$has_colon" = x; then
12356    # Not in mixed or Windows style, start by that.
12357    new_path=`cmd //c echo $path`
12358  fi
12359
12360
12361  input_path="$new_path"
12362  # Check if we need to convert this using DOS-style short mode. If the path
12363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12364  # take no chances and rewrite it.
12365  # Note: m4 eats our [], so we need to use [ and ] instead.
12366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12367  if test "x$has_forbidden_chars" != x; then
12368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12370  fi
12371
12372
12373  windows_path="$new_path"
12374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12375    unix_path=`$CYGPATH -u "$windows_path"`
12376    new_path="$unix_path"
12377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12379    new_path="$unix_path"
12380  fi
12381
12382  if test "x$path" != "x$new_path"; then
12383    BOOT_JDK="$new_path"
12384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12385$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12386  fi
12387
12388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12390
12391  else
12392    # We're on a posix platform. Hooray! :)
12393    path="$BOOT_JDK"
12394
12395    if test ! -f "$path" && test ! -d "$path"; then
12396      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12397    fi
12398
12399    has_space=`$ECHO "$path" | $GREP " "`
12400    if test "x$has_space" != x; then
12401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12403      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12404    fi
12405  fi
12406
12407              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12408$as_echo_n "checking for Boot JDK... " >&6; }
12409              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12410$as_echo "$BOOT_JDK" >&6; }
12411              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12412$as_echo_n "checking Boot JDK version... " >&6; }
12413              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12414              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12415$as_echo "$BOOT_JDK_VERSION" >&6; }
12416            fi # end check jdk version
12417          fi # end check rt.jar
12418        fi # end check javac
12419      fi # end check java
12420    fi # end check boot jdk found
12421  fi
12422
12423    done
12424  fi
12425
12426  fi
12427
12428
12429    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12430    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12431      # Do we have a bin/java?
12432      if test ! -x "$BOOT_JDK/bin/java"; then
12433        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12435        BOOT_JDK_FOUND=no
12436      else
12437        # Do we have a bin/javac?
12438        if test ! -x "$BOOT_JDK/bin/javac"; then
12439          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12441          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12442$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12443          BOOT_JDK_FOUND=no
12444        else
12445          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12446          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12447            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12449            BOOT_JDK_FOUND=no
12450          else
12451            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12452            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12453
12454            # Extra M4 quote needed to protect [] in grep expression.
12455            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12456            if test "x$FOUND_VERSION_78" = x; then
12457              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12459              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12460$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12461              BOOT_JDK_FOUND=no
12462            else
12463              # We're done! :-)
12464              BOOT_JDK_FOUND=yes
12465
12466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12467
12468  # Input might be given as Windows format, start by converting to
12469  # unix format.
12470  path="$BOOT_JDK"
12471  new_path=`$CYGPATH -u "$path"`
12472
12473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12476  # "foo.exe" is OK but "foo" is an error.
12477  #
12478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12479  # It is also a way to make sure we got the proper file name for the real test later on.
12480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12481  if test "x$test_shortpath" = x; then
12482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12483$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12484    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12485  fi
12486
12487  # Call helper function which possibly converts this using DOS-style short mode.
12488  # If so, the updated path is stored in $new_path.
12489
12490  input_path="$new_path"
12491  # Check if we need to convert this using DOS-style short mode. If the path
12492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12493  # take no chances and rewrite it.
12494  # Note: m4 eats our [], so we need to use [ and ] instead.
12495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12496  if test "x$has_forbidden_chars" != x; then
12497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12501      # Going to short mode and back again did indeed matter. Since short mode is
12502      # case insensitive, let's make it lowercase to improve readability.
12503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12504      # Now convert it back to Unix-stile (cygpath)
12505      input_path=`$CYGPATH -u "$shortmode_path"`
12506      new_path="$input_path"
12507    fi
12508  fi
12509
12510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12511  if test "x$test_cygdrive_prefix" = x; then
12512    # As a simple fix, exclude /usr/bin since it's not a real path.
12513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12515      # a path prefixed by /cygdrive for fixpath to work.
12516      new_path="$CYGWIN_ROOT_PATH$input_path"
12517    fi
12518  fi
12519
12520
12521  if test "x$path" != "x$new_path"; then
12522    BOOT_JDK="$new_path"
12523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12525  fi
12526
12527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12528
12529  path="$BOOT_JDK"
12530  has_colon=`$ECHO $path | $GREP ^.:`
12531  new_path="$path"
12532  if test "x$has_colon" = x; then
12533    # Not in mixed or Windows style, start by that.
12534    new_path=`cmd //c echo $path`
12535  fi
12536
12537
12538  input_path="$new_path"
12539  # Check if we need to convert this using DOS-style short mode. If the path
12540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12541  # take no chances and rewrite it.
12542  # Note: m4 eats our [], so we need to use [ and ] instead.
12543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12544  if test "x$has_forbidden_chars" != x; then
12545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12547  fi
12548
12549
12550  windows_path="$new_path"
12551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12552    unix_path=`$CYGPATH -u "$windows_path"`
12553    new_path="$unix_path"
12554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12556    new_path="$unix_path"
12557  fi
12558
12559  if test "x$path" != "x$new_path"; then
12560    BOOT_JDK="$new_path"
12561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12563  fi
12564
12565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12567
12568  else
12569    # We're on a posix platform. Hooray! :)
12570    path="$BOOT_JDK"
12571
12572    if test ! -f "$path" && test ! -d "$path"; then
12573      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12574    fi
12575
12576    has_space=`$ECHO "$path" | $GREP " "`
12577    if test "x$has_space" != x; then
12578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12579$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12580      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12581    fi
12582  fi
12583
12584              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12585$as_echo_n "checking for Boot JDK... " >&6; }
12586              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12587$as_echo "$BOOT_JDK" >&6; }
12588              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12589$as_echo_n "checking Boot JDK version... " >&6; }
12590              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12591              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12592$as_echo "$BOOT_JDK_VERSION" >&6; }
12593            fi # end check jdk version
12594          fi # end check rt.jar
12595        fi # end check javac
12596      fi # end check java
12597    fi # end check boot jdk found
12598  fi
12599
12600
12601  if test "x$BOOT_JDK_FOUND" = xno; then
12602    # Now execute the test
12603
12604  if test "x$PROGRAMW6432" != x; then
12605    VIRTUAL_DIR="$PROGRAMW6432/Java"
12606
12607  windows_path="$VIRTUAL_DIR"
12608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12609    unix_path=`$CYGPATH -u "$windows_path"`
12610    VIRTUAL_DIR="$unix_path"
12611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12613    VIRTUAL_DIR="$unix_path"
12614  fi
12615
12616
12617  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12618  BOOT_JDK_SUFFIX=""
12619  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12620  if test "x$ALL_JDKS_FOUND" != x; then
12621    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12622
12623  if test "x$BOOT_JDK_FOUND" = xno; then
12624    # Now execute the test
12625
12626        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12627        if test -d "$BOOT_JDK"; then
12628          BOOT_JDK_FOUND=maybe
12629          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12630$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12631        fi
12632
12633
12634    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12635    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12636      # Do we have a bin/java?
12637      if test ! -x "$BOOT_JDK/bin/java"; then
12638        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12640        BOOT_JDK_FOUND=no
12641      else
12642        # Do we have a bin/javac?
12643        if test ! -x "$BOOT_JDK/bin/javac"; then
12644          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12646          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12647$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12648          BOOT_JDK_FOUND=no
12649        else
12650          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12651          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12652            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12654            BOOT_JDK_FOUND=no
12655          else
12656            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12657            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12658
12659            # Extra M4 quote needed to protect [] in grep expression.
12660            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12661            if test "x$FOUND_VERSION_78" = x; then
12662              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12664              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12665$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12666              BOOT_JDK_FOUND=no
12667            else
12668              # We're done! :-)
12669              BOOT_JDK_FOUND=yes
12670
12671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12672
12673  # Input might be given as Windows format, start by converting to
12674  # unix format.
12675  path="$BOOT_JDK"
12676  new_path=`$CYGPATH -u "$path"`
12677
12678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12681  # "foo.exe" is OK but "foo" is an error.
12682  #
12683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12684  # It is also a way to make sure we got the proper file name for the real test later on.
12685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12686  if test "x$test_shortpath" = x; then
12687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12689    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12690  fi
12691
12692  # Call helper function which possibly converts this using DOS-style short mode.
12693  # If so, the updated path is stored in $new_path.
12694
12695  input_path="$new_path"
12696  # Check if we need to convert this using DOS-style short mode. If the path
12697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12698  # take no chances and rewrite it.
12699  # Note: m4 eats our [], so we need to use [ and ] instead.
12700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12701  if test "x$has_forbidden_chars" != x; then
12702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12706      # Going to short mode and back again did indeed matter. Since short mode is
12707      # case insensitive, let's make it lowercase to improve readability.
12708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12709      # Now convert it back to Unix-stile (cygpath)
12710      input_path=`$CYGPATH -u "$shortmode_path"`
12711      new_path="$input_path"
12712    fi
12713  fi
12714
12715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12716  if test "x$test_cygdrive_prefix" = x; then
12717    # As a simple fix, exclude /usr/bin since it's not a real path.
12718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12720      # a path prefixed by /cygdrive for fixpath to work.
12721      new_path="$CYGWIN_ROOT_PATH$input_path"
12722    fi
12723  fi
12724
12725
12726  if test "x$path" != "x$new_path"; then
12727    BOOT_JDK="$new_path"
12728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12730  fi
12731
12732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12733
12734  path="$BOOT_JDK"
12735  has_colon=`$ECHO $path | $GREP ^.:`
12736  new_path="$path"
12737  if test "x$has_colon" = x; then
12738    # Not in mixed or Windows style, start by that.
12739    new_path=`cmd //c echo $path`
12740  fi
12741
12742
12743  input_path="$new_path"
12744  # Check if we need to convert this using DOS-style short mode. If the path
12745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12746  # take no chances and rewrite it.
12747  # Note: m4 eats our [], so we need to use [ and ] instead.
12748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12749  if test "x$has_forbidden_chars" != x; then
12750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12752  fi
12753
12754
12755  windows_path="$new_path"
12756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12757    unix_path=`$CYGPATH -u "$windows_path"`
12758    new_path="$unix_path"
12759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12761    new_path="$unix_path"
12762  fi
12763
12764  if test "x$path" != "x$new_path"; then
12765    BOOT_JDK="$new_path"
12766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12768  fi
12769
12770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12772
12773  else
12774    # We're on a posix platform. Hooray! :)
12775    path="$BOOT_JDK"
12776
12777    if test ! -f "$path" && test ! -d "$path"; then
12778      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12779    fi
12780
12781    has_space=`$ECHO "$path" | $GREP " "`
12782    if test "x$has_space" != x; then
12783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12785      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12786    fi
12787  fi
12788
12789              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12790$as_echo_n "checking for Boot JDK... " >&6; }
12791              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12792$as_echo "$BOOT_JDK" >&6; }
12793              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12794$as_echo_n "checking Boot JDK version... " >&6; }
12795              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12796              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12797$as_echo "$BOOT_JDK_VERSION" >&6; }
12798            fi # end check jdk version
12799          fi # end check rt.jar
12800        fi # end check javac
12801      fi # end check java
12802    fi # end check boot jdk found
12803  fi
12804
12805    done
12806  fi
12807
12808  fi
12809
12810
12811    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12812    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12813      # Do we have a bin/java?
12814      if test ! -x "$BOOT_JDK/bin/java"; then
12815        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12817        BOOT_JDK_FOUND=no
12818      else
12819        # Do we have a bin/javac?
12820        if test ! -x "$BOOT_JDK/bin/javac"; then
12821          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12823          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12824$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12825          BOOT_JDK_FOUND=no
12826        else
12827          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12828          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12829            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12831            BOOT_JDK_FOUND=no
12832          else
12833            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12834            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12835
12836            # Extra M4 quote needed to protect [] in grep expression.
12837            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12838            if test "x$FOUND_VERSION_78" = x; then
12839              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12841              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12842$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12843              BOOT_JDK_FOUND=no
12844            else
12845              # We're done! :-)
12846              BOOT_JDK_FOUND=yes
12847
12848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12849
12850  # Input might be given as Windows format, start by converting to
12851  # unix format.
12852  path="$BOOT_JDK"
12853  new_path=`$CYGPATH -u "$path"`
12854
12855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12858  # "foo.exe" is OK but "foo" is an error.
12859  #
12860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12861  # It is also a way to make sure we got the proper file name for the real test later on.
12862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12863  if test "x$test_shortpath" = x; then
12864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12866    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12867  fi
12868
12869  # Call helper function which possibly converts this using DOS-style short mode.
12870  # If so, the updated path is stored in $new_path.
12871
12872  input_path="$new_path"
12873  # Check if we need to convert this using DOS-style short mode. If the path
12874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12875  # take no chances and rewrite it.
12876  # Note: m4 eats our [], so we need to use [ and ] instead.
12877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12878  if test "x$has_forbidden_chars" != x; then
12879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12883      # Going to short mode and back again did indeed matter. Since short mode is
12884      # case insensitive, let's make it lowercase to improve readability.
12885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12886      # Now convert it back to Unix-stile (cygpath)
12887      input_path=`$CYGPATH -u "$shortmode_path"`
12888      new_path="$input_path"
12889    fi
12890  fi
12891
12892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12893  if test "x$test_cygdrive_prefix" = x; then
12894    # As a simple fix, exclude /usr/bin since it's not a real path.
12895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12897      # a path prefixed by /cygdrive for fixpath to work.
12898      new_path="$CYGWIN_ROOT_PATH$input_path"
12899    fi
12900  fi
12901
12902
12903  if test "x$path" != "x$new_path"; then
12904    BOOT_JDK="$new_path"
12905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12907  fi
12908
12909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12910
12911  path="$BOOT_JDK"
12912  has_colon=`$ECHO $path | $GREP ^.:`
12913  new_path="$path"
12914  if test "x$has_colon" = x; then
12915    # Not in mixed or Windows style, start by that.
12916    new_path=`cmd //c echo $path`
12917  fi
12918
12919
12920  input_path="$new_path"
12921  # Check if we need to convert this using DOS-style short mode. If the path
12922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12923  # take no chances and rewrite it.
12924  # Note: m4 eats our [], so we need to use [ and ] instead.
12925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12926  if test "x$has_forbidden_chars" != x; then
12927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12929  fi
12930
12931
12932  windows_path="$new_path"
12933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12934    unix_path=`$CYGPATH -u "$windows_path"`
12935    new_path="$unix_path"
12936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12938    new_path="$unix_path"
12939  fi
12940
12941  if test "x$path" != "x$new_path"; then
12942    BOOT_JDK="$new_path"
12943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12945  fi
12946
12947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12949
12950  else
12951    # We're on a posix platform. Hooray! :)
12952    path="$BOOT_JDK"
12953
12954    if test ! -f "$path" && test ! -d "$path"; then
12955      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12956    fi
12957
12958    has_space=`$ECHO "$path" | $GREP " "`
12959    if test "x$has_space" != x; then
12960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12961$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12962      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12963    fi
12964  fi
12965
12966              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12967$as_echo_n "checking for Boot JDK... " >&6; }
12968              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12969$as_echo "$BOOT_JDK" >&6; }
12970              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12971$as_echo_n "checking Boot JDK version... " >&6; }
12972              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12973              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12974$as_echo "$BOOT_JDK_VERSION" >&6; }
12975            fi # end check jdk version
12976          fi # end check rt.jar
12977        fi # end check javac
12978      fi # end check java
12979    fi # end check boot jdk found
12980  fi
12981
12982
12983  if test "x$BOOT_JDK_FOUND" = xno; then
12984    # Now execute the test
12985
12986  if test "x$PROGRAMFILES" != x; then
12987    VIRTUAL_DIR="$PROGRAMFILES/Java"
12988
12989  windows_path="$VIRTUAL_DIR"
12990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12991    unix_path=`$CYGPATH -u "$windows_path"`
12992    VIRTUAL_DIR="$unix_path"
12993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12995    VIRTUAL_DIR="$unix_path"
12996  fi
12997
12998
12999  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13000  BOOT_JDK_SUFFIX=""
13001  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13002  if test "x$ALL_JDKS_FOUND" != x; then
13003    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13004
13005  if test "x$BOOT_JDK_FOUND" = xno; then
13006    # Now execute the test
13007
13008        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13009        if test -d "$BOOT_JDK"; then
13010          BOOT_JDK_FOUND=maybe
13011          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13012$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13013        fi
13014
13015
13016    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13017    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13018      # Do we have a bin/java?
13019      if test ! -x "$BOOT_JDK/bin/java"; then
13020        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13022        BOOT_JDK_FOUND=no
13023      else
13024        # Do we have a bin/javac?
13025        if test ! -x "$BOOT_JDK/bin/javac"; then
13026          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13028          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13029$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13030          BOOT_JDK_FOUND=no
13031        else
13032          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13033          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13034            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13036            BOOT_JDK_FOUND=no
13037          else
13038            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13039            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13040
13041            # Extra M4 quote needed to protect [] in grep expression.
13042            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13043            if test "x$FOUND_VERSION_78" = x; then
13044              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13045$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13046              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13047$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13048              BOOT_JDK_FOUND=no
13049            else
13050              # We're done! :-)
13051              BOOT_JDK_FOUND=yes
13052
13053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13054
13055  # Input might be given as Windows format, start by converting to
13056  # unix format.
13057  path="$BOOT_JDK"
13058  new_path=`$CYGPATH -u "$path"`
13059
13060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13063  # "foo.exe" is OK but "foo" is an error.
13064  #
13065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13066  # It is also a way to make sure we got the proper file name for the real test later on.
13067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13068  if test "x$test_shortpath" = x; then
13069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13070$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13071    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13072  fi
13073
13074  # Call helper function which possibly converts this using DOS-style short mode.
13075  # If so, the updated path is stored in $new_path.
13076
13077  input_path="$new_path"
13078  # Check if we need to convert this using DOS-style short mode. If the path
13079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13080  # take no chances and rewrite it.
13081  # Note: m4 eats our [], so we need to use [ and ] instead.
13082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13083  if test "x$has_forbidden_chars" != x; then
13084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13088      # Going to short mode and back again did indeed matter. Since short mode is
13089      # case insensitive, let's make it lowercase to improve readability.
13090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13091      # Now convert it back to Unix-stile (cygpath)
13092      input_path=`$CYGPATH -u "$shortmode_path"`
13093      new_path="$input_path"
13094    fi
13095  fi
13096
13097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13098  if test "x$test_cygdrive_prefix" = x; then
13099    # As a simple fix, exclude /usr/bin since it's not a real path.
13100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13102      # a path prefixed by /cygdrive for fixpath to work.
13103      new_path="$CYGWIN_ROOT_PATH$input_path"
13104    fi
13105  fi
13106
13107
13108  if test "x$path" != "x$new_path"; then
13109    BOOT_JDK="$new_path"
13110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13112  fi
13113
13114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13115
13116  path="$BOOT_JDK"
13117  has_colon=`$ECHO $path | $GREP ^.:`
13118  new_path="$path"
13119  if test "x$has_colon" = x; then
13120    # Not in mixed or Windows style, start by that.
13121    new_path=`cmd //c echo $path`
13122  fi
13123
13124
13125  input_path="$new_path"
13126  # Check if we need to convert this using DOS-style short mode. If the path
13127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13128  # take no chances and rewrite it.
13129  # Note: m4 eats our [], so we need to use [ and ] instead.
13130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13131  if test "x$has_forbidden_chars" != x; then
13132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13134  fi
13135
13136
13137  windows_path="$new_path"
13138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13139    unix_path=`$CYGPATH -u "$windows_path"`
13140    new_path="$unix_path"
13141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13143    new_path="$unix_path"
13144  fi
13145
13146  if test "x$path" != "x$new_path"; then
13147    BOOT_JDK="$new_path"
13148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13149$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13150  fi
13151
13152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13154
13155  else
13156    # We're on a posix platform. Hooray! :)
13157    path="$BOOT_JDK"
13158
13159    if test ! -f "$path" && test ! -d "$path"; then
13160      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13161    fi
13162
13163    has_space=`$ECHO "$path" | $GREP " "`
13164    if test "x$has_space" != x; then
13165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13166$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13167      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13168    fi
13169  fi
13170
13171              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13172$as_echo_n "checking for Boot JDK... " >&6; }
13173              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13174$as_echo "$BOOT_JDK" >&6; }
13175              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13176$as_echo_n "checking Boot JDK version... " >&6; }
13177              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13178              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13179$as_echo "$BOOT_JDK_VERSION" >&6; }
13180            fi # end check jdk version
13181          fi # end check rt.jar
13182        fi # end check javac
13183      fi # end check java
13184    fi # end check boot jdk found
13185  fi
13186
13187    done
13188  fi
13189
13190  fi
13191
13192
13193    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13194    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13195      # Do we have a bin/java?
13196      if test ! -x "$BOOT_JDK/bin/java"; then
13197        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13199        BOOT_JDK_FOUND=no
13200      else
13201        # Do we have a bin/javac?
13202        if test ! -x "$BOOT_JDK/bin/javac"; then
13203          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13205          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13206$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13207          BOOT_JDK_FOUND=no
13208        else
13209          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13210          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13211            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13213            BOOT_JDK_FOUND=no
13214          else
13215            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13216            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13217
13218            # Extra M4 quote needed to protect [] in grep expression.
13219            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13220            if test "x$FOUND_VERSION_78" = x; then
13221              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13223              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13224$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13225              BOOT_JDK_FOUND=no
13226            else
13227              # We're done! :-)
13228              BOOT_JDK_FOUND=yes
13229
13230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13231
13232  # Input might be given as Windows format, start by converting to
13233  # unix format.
13234  path="$BOOT_JDK"
13235  new_path=`$CYGPATH -u "$path"`
13236
13237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13240  # "foo.exe" is OK but "foo" is an error.
13241  #
13242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13243  # It is also a way to make sure we got the proper file name for the real test later on.
13244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13245  if test "x$test_shortpath" = x; then
13246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13248    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13249  fi
13250
13251  # Call helper function which possibly converts this using DOS-style short mode.
13252  # If so, the updated path is stored in $new_path.
13253
13254  input_path="$new_path"
13255  # Check if we need to convert this using DOS-style short mode. If the path
13256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13257  # take no chances and rewrite it.
13258  # Note: m4 eats our [], so we need to use [ and ] instead.
13259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13260  if test "x$has_forbidden_chars" != x; then
13261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13265      # Going to short mode and back again did indeed matter. Since short mode is
13266      # case insensitive, let's make it lowercase to improve readability.
13267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13268      # Now convert it back to Unix-stile (cygpath)
13269      input_path=`$CYGPATH -u "$shortmode_path"`
13270      new_path="$input_path"
13271    fi
13272  fi
13273
13274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13275  if test "x$test_cygdrive_prefix" = x; then
13276    # As a simple fix, exclude /usr/bin since it's not a real path.
13277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13279      # a path prefixed by /cygdrive for fixpath to work.
13280      new_path="$CYGWIN_ROOT_PATH$input_path"
13281    fi
13282  fi
13283
13284
13285  if test "x$path" != "x$new_path"; then
13286    BOOT_JDK="$new_path"
13287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13289  fi
13290
13291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13292
13293  path="$BOOT_JDK"
13294  has_colon=`$ECHO $path | $GREP ^.:`
13295  new_path="$path"
13296  if test "x$has_colon" = x; then
13297    # Not in mixed or Windows style, start by that.
13298    new_path=`cmd //c echo $path`
13299  fi
13300
13301
13302  input_path="$new_path"
13303  # Check if we need to convert this using DOS-style short mode. If the path
13304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13305  # take no chances and rewrite it.
13306  # Note: m4 eats our [], so we need to use [ and ] instead.
13307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13308  if test "x$has_forbidden_chars" != x; then
13309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13311  fi
13312
13313
13314  windows_path="$new_path"
13315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13316    unix_path=`$CYGPATH -u "$windows_path"`
13317    new_path="$unix_path"
13318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13320    new_path="$unix_path"
13321  fi
13322
13323  if test "x$path" != "x$new_path"; then
13324    BOOT_JDK="$new_path"
13325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13327  fi
13328
13329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13331
13332  else
13333    # We're on a posix platform. Hooray! :)
13334    path="$BOOT_JDK"
13335
13336    if test ! -f "$path" && test ! -d "$path"; then
13337      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13338    fi
13339
13340    has_space=`$ECHO "$path" | $GREP " "`
13341    if test "x$has_space" != x; then
13342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13344      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13345    fi
13346  fi
13347
13348              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13349$as_echo_n "checking for Boot JDK... " >&6; }
13350              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13351$as_echo "$BOOT_JDK" >&6; }
13352              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13353$as_echo_n "checking Boot JDK version... " >&6; }
13354              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13355              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13356$as_echo "$BOOT_JDK_VERSION" >&6; }
13357            fi # end check jdk version
13358          fi # end check rt.jar
13359        fi # end check javac
13360      fi # end check java
13361    fi # end check boot jdk found
13362  fi
13363
13364
13365  if test "x$BOOT_JDK_FOUND" = xno; then
13366    # Now execute the test
13367
13368  if test "x$ProgramFiles" != x; then
13369    VIRTUAL_DIR="$ProgramFiles/Java"
13370
13371  windows_path="$VIRTUAL_DIR"
13372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13373    unix_path=`$CYGPATH -u "$windows_path"`
13374    VIRTUAL_DIR="$unix_path"
13375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13377    VIRTUAL_DIR="$unix_path"
13378  fi
13379
13380
13381  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13382  BOOT_JDK_SUFFIX=""
13383  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13384  if test "x$ALL_JDKS_FOUND" != x; then
13385    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13386
13387  if test "x$BOOT_JDK_FOUND" = xno; then
13388    # Now execute the test
13389
13390        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13391        if test -d "$BOOT_JDK"; then
13392          BOOT_JDK_FOUND=maybe
13393          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13394$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13395        fi
13396
13397
13398    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13399    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13400      # Do we have a bin/java?
13401      if test ! -x "$BOOT_JDK/bin/java"; then
13402        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13404        BOOT_JDK_FOUND=no
13405      else
13406        # Do we have a bin/javac?
13407        if test ! -x "$BOOT_JDK/bin/javac"; then
13408          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13410          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13411$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13412          BOOT_JDK_FOUND=no
13413        else
13414          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13415          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13416            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13418            BOOT_JDK_FOUND=no
13419          else
13420            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13421            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13422
13423            # Extra M4 quote needed to protect [] in grep expression.
13424            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13425            if test "x$FOUND_VERSION_78" = x; then
13426              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13428              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13429$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13430              BOOT_JDK_FOUND=no
13431            else
13432              # We're done! :-)
13433              BOOT_JDK_FOUND=yes
13434
13435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13436
13437  # Input might be given as Windows format, start by converting to
13438  # unix format.
13439  path="$BOOT_JDK"
13440  new_path=`$CYGPATH -u "$path"`
13441
13442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13445  # "foo.exe" is OK but "foo" is an error.
13446  #
13447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13448  # It is also a way to make sure we got the proper file name for the real test later on.
13449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13450  if test "x$test_shortpath" = x; then
13451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13452$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13453    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13454  fi
13455
13456  # Call helper function which possibly converts this using DOS-style short mode.
13457  # If so, the updated path is stored in $new_path.
13458
13459  input_path="$new_path"
13460  # Check if we need to convert this using DOS-style short mode. If the path
13461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13462  # take no chances and rewrite it.
13463  # Note: m4 eats our [], so we need to use [ and ] instead.
13464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13465  if test "x$has_forbidden_chars" != x; then
13466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13470      # Going to short mode and back again did indeed matter. Since short mode is
13471      # case insensitive, let's make it lowercase to improve readability.
13472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13473      # Now convert it back to Unix-stile (cygpath)
13474      input_path=`$CYGPATH -u "$shortmode_path"`
13475      new_path="$input_path"
13476    fi
13477  fi
13478
13479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13480  if test "x$test_cygdrive_prefix" = x; then
13481    # As a simple fix, exclude /usr/bin since it's not a real path.
13482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13484      # a path prefixed by /cygdrive for fixpath to work.
13485      new_path="$CYGWIN_ROOT_PATH$input_path"
13486    fi
13487  fi
13488
13489
13490  if test "x$path" != "x$new_path"; then
13491    BOOT_JDK="$new_path"
13492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13494  fi
13495
13496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13497
13498  path="$BOOT_JDK"
13499  has_colon=`$ECHO $path | $GREP ^.:`
13500  new_path="$path"
13501  if test "x$has_colon" = x; then
13502    # Not in mixed or Windows style, start by that.
13503    new_path=`cmd //c echo $path`
13504  fi
13505
13506
13507  input_path="$new_path"
13508  # Check if we need to convert this using DOS-style short mode. If the path
13509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13510  # take no chances and rewrite it.
13511  # Note: m4 eats our [], so we need to use [ and ] instead.
13512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13513  if test "x$has_forbidden_chars" != x; then
13514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13516  fi
13517
13518
13519  windows_path="$new_path"
13520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13521    unix_path=`$CYGPATH -u "$windows_path"`
13522    new_path="$unix_path"
13523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13525    new_path="$unix_path"
13526  fi
13527
13528  if test "x$path" != "x$new_path"; then
13529    BOOT_JDK="$new_path"
13530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13532  fi
13533
13534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13536
13537  else
13538    # We're on a posix platform. Hooray! :)
13539    path="$BOOT_JDK"
13540
13541    if test ! -f "$path" && test ! -d "$path"; then
13542      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13543    fi
13544
13545    has_space=`$ECHO "$path" | $GREP " "`
13546    if test "x$has_space" != x; then
13547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13549      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13550    fi
13551  fi
13552
13553              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13554$as_echo_n "checking for Boot JDK... " >&6; }
13555              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13556$as_echo "$BOOT_JDK" >&6; }
13557              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13558$as_echo_n "checking Boot JDK version... " >&6; }
13559              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13560              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13561$as_echo "$BOOT_JDK_VERSION" >&6; }
13562            fi # end check jdk version
13563          fi # end check rt.jar
13564        fi # end check javac
13565      fi # end check java
13566    fi # end check boot jdk found
13567  fi
13568
13569    done
13570  fi
13571
13572  fi
13573
13574
13575    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13576    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13577      # Do we have a bin/java?
13578      if test ! -x "$BOOT_JDK/bin/java"; then
13579        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13581        BOOT_JDK_FOUND=no
13582      else
13583        # Do we have a bin/javac?
13584        if test ! -x "$BOOT_JDK/bin/javac"; then
13585          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13587          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13588$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13589          BOOT_JDK_FOUND=no
13590        else
13591          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13592          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13593            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13595            BOOT_JDK_FOUND=no
13596          else
13597            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13598            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13599
13600            # Extra M4 quote needed to protect [] in grep expression.
13601            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13602            if test "x$FOUND_VERSION_78" = x; then
13603              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13605              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13606$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13607              BOOT_JDK_FOUND=no
13608            else
13609              # We're done! :-)
13610              BOOT_JDK_FOUND=yes
13611
13612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13613
13614  # Input might be given as Windows format, start by converting to
13615  # unix format.
13616  path="$BOOT_JDK"
13617  new_path=`$CYGPATH -u "$path"`
13618
13619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13622  # "foo.exe" is OK but "foo" is an error.
13623  #
13624  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13625  # It is also a way to make sure we got the proper file name for the real test later on.
13626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13627  if test "x$test_shortpath" = x; then
13628    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13629$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13630    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13631  fi
13632
13633  # Call helper function which possibly converts this using DOS-style short mode.
13634  # If so, the updated path is stored in $new_path.
13635
13636  input_path="$new_path"
13637  # Check if we need to convert this using DOS-style short mode. If the path
13638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13639  # take no chances and rewrite it.
13640  # Note: m4 eats our [], so we need to use [ and ] instead.
13641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13642  if test "x$has_forbidden_chars" != x; then
13643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13647      # Going to short mode and back again did indeed matter. Since short mode is
13648      # case insensitive, let's make it lowercase to improve readability.
13649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13650      # Now convert it back to Unix-stile (cygpath)
13651      input_path=`$CYGPATH -u "$shortmode_path"`
13652      new_path="$input_path"
13653    fi
13654  fi
13655
13656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13657  if test "x$test_cygdrive_prefix" = x; then
13658    # As a simple fix, exclude /usr/bin since it's not a real path.
13659    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13661      # a path prefixed by /cygdrive for fixpath to work.
13662      new_path="$CYGWIN_ROOT_PATH$input_path"
13663    fi
13664  fi
13665
13666
13667  if test "x$path" != "x$new_path"; then
13668    BOOT_JDK="$new_path"
13669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13670$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13671  fi
13672
13673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13674
13675  path="$BOOT_JDK"
13676  has_colon=`$ECHO $path | $GREP ^.:`
13677  new_path="$path"
13678  if test "x$has_colon" = x; then
13679    # Not in mixed or Windows style, start by that.
13680    new_path=`cmd //c echo $path`
13681  fi
13682
13683
13684  input_path="$new_path"
13685  # Check if we need to convert this using DOS-style short mode. If the path
13686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13687  # take no chances and rewrite it.
13688  # Note: m4 eats our [], so we need to use [ and ] instead.
13689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13690  if test "x$has_forbidden_chars" != x; then
13691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13693  fi
13694
13695
13696  windows_path="$new_path"
13697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13698    unix_path=`$CYGPATH -u "$windows_path"`
13699    new_path="$unix_path"
13700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13702    new_path="$unix_path"
13703  fi
13704
13705  if test "x$path" != "x$new_path"; then
13706    BOOT_JDK="$new_path"
13707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13708$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13709  fi
13710
13711  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13712  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13713
13714  else
13715    # We're on a posix platform. Hooray! :)
13716    path="$BOOT_JDK"
13717
13718    if test ! -f "$path" && test ! -d "$path"; then
13719      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13720    fi
13721
13722    has_space=`$ECHO "$path" | $GREP " "`
13723    if test "x$has_space" != x; then
13724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13726      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13727    fi
13728  fi
13729
13730              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13731$as_echo_n "checking for Boot JDK... " >&6; }
13732              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13733$as_echo "$BOOT_JDK" >&6; }
13734              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13735$as_echo_n "checking Boot JDK version... " >&6; }
13736              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13737              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13738$as_echo "$BOOT_JDK_VERSION" >&6; }
13739            fi # end check jdk version
13740          fi # end check rt.jar
13741        fi # end check javac
13742      fi # end check java
13743    fi # end check boot jdk found
13744  fi
13745
13746
13747  if test "x$BOOT_JDK_FOUND" = xno; then
13748    # Now execute the test
13749
13750  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13751  BOOT_JDK_SUFFIX=""
13752  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13753  if test "x$ALL_JDKS_FOUND" != x; then
13754    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13755
13756  if test "x$BOOT_JDK_FOUND" = xno; then
13757    # Now execute the test
13758
13759        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13760        if test -d "$BOOT_JDK"; then
13761          BOOT_JDK_FOUND=maybe
13762          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13763$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13764        fi
13765
13766
13767    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13768    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13769      # Do we have a bin/java?
13770      if test ! -x "$BOOT_JDK/bin/java"; then
13771        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13773        BOOT_JDK_FOUND=no
13774      else
13775        # Do we have a bin/javac?
13776        if test ! -x "$BOOT_JDK/bin/javac"; then
13777          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13779          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13780$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13781          BOOT_JDK_FOUND=no
13782        else
13783          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13784          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13785            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13787            BOOT_JDK_FOUND=no
13788          else
13789            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13790            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13791
13792            # Extra M4 quote needed to protect [] in grep expression.
13793            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13794            if test "x$FOUND_VERSION_78" = x; then
13795              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13797              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13798$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13799              BOOT_JDK_FOUND=no
13800            else
13801              # We're done! :-)
13802              BOOT_JDK_FOUND=yes
13803
13804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13805
13806  # Input might be given as Windows format, start by converting to
13807  # unix format.
13808  path="$BOOT_JDK"
13809  new_path=`$CYGPATH -u "$path"`
13810
13811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13814  # "foo.exe" is OK but "foo" is an error.
13815  #
13816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13817  # It is also a way to make sure we got the proper file name for the real test later on.
13818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13819  if test "x$test_shortpath" = x; then
13820    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13822    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13823  fi
13824
13825  # Call helper function which possibly converts this using DOS-style short mode.
13826  # If so, the updated path is stored in $new_path.
13827
13828  input_path="$new_path"
13829  # Check if we need to convert this using DOS-style short mode. If the path
13830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13831  # take no chances and rewrite it.
13832  # Note: m4 eats our [], so we need to use [ and ] instead.
13833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13834  if test "x$has_forbidden_chars" != x; then
13835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13839      # Going to short mode and back again did indeed matter. Since short mode is
13840      # case insensitive, let's make it lowercase to improve readability.
13841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13842      # Now convert it back to Unix-stile (cygpath)
13843      input_path=`$CYGPATH -u "$shortmode_path"`
13844      new_path="$input_path"
13845    fi
13846  fi
13847
13848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13849  if test "x$test_cygdrive_prefix" = x; then
13850    # As a simple fix, exclude /usr/bin since it's not a real path.
13851    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13853      # a path prefixed by /cygdrive for fixpath to work.
13854      new_path="$CYGWIN_ROOT_PATH$input_path"
13855    fi
13856  fi
13857
13858
13859  if test "x$path" != "x$new_path"; then
13860    BOOT_JDK="$new_path"
13861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13862$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13863  fi
13864
13865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13866
13867  path="$BOOT_JDK"
13868  has_colon=`$ECHO $path | $GREP ^.:`
13869  new_path="$path"
13870  if test "x$has_colon" = x; then
13871    # Not in mixed or Windows style, start by that.
13872    new_path=`cmd //c echo $path`
13873  fi
13874
13875
13876  input_path="$new_path"
13877  # Check if we need to convert this using DOS-style short mode. If the path
13878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13879  # take no chances and rewrite it.
13880  # Note: m4 eats our [], so we need to use [ and ] instead.
13881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13882  if test "x$has_forbidden_chars" != x; then
13883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13885  fi
13886
13887
13888  windows_path="$new_path"
13889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13890    unix_path=`$CYGPATH -u "$windows_path"`
13891    new_path="$unix_path"
13892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13894    new_path="$unix_path"
13895  fi
13896
13897  if test "x$path" != "x$new_path"; then
13898    BOOT_JDK="$new_path"
13899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13900$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13901  fi
13902
13903  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13904  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13905
13906  else
13907    # We're on a posix platform. Hooray! :)
13908    path="$BOOT_JDK"
13909
13910    if test ! -f "$path" && test ! -d "$path"; then
13911      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13912    fi
13913
13914    has_space=`$ECHO "$path" | $GREP " "`
13915    if test "x$has_space" != x; then
13916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13918      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13919    fi
13920  fi
13921
13922              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13923$as_echo_n "checking for Boot JDK... " >&6; }
13924              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13925$as_echo "$BOOT_JDK" >&6; }
13926              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13927$as_echo_n "checking Boot JDK version... " >&6; }
13928              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13929              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13930$as_echo "$BOOT_JDK_VERSION" >&6; }
13931            fi # end check jdk version
13932          fi # end check rt.jar
13933        fi # end check javac
13934      fi # end check java
13935    fi # end check boot jdk found
13936  fi
13937
13938    done
13939  fi
13940
13941
13942    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13943    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13944      # Do we have a bin/java?
13945      if test ! -x "$BOOT_JDK/bin/java"; then
13946        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13948        BOOT_JDK_FOUND=no
13949      else
13950        # Do we have a bin/javac?
13951        if test ! -x "$BOOT_JDK/bin/javac"; then
13952          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13954          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13955$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13956          BOOT_JDK_FOUND=no
13957        else
13958          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13959          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13960            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13962            BOOT_JDK_FOUND=no
13963          else
13964            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13965            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13966
13967            # Extra M4 quote needed to protect [] in grep expression.
13968            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13969            if test "x$FOUND_VERSION_78" = x; then
13970              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13972              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13973$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13974              BOOT_JDK_FOUND=no
13975            else
13976              # We're done! :-)
13977              BOOT_JDK_FOUND=yes
13978
13979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13980
13981  # Input might be given as Windows format, start by converting to
13982  # unix format.
13983  path="$BOOT_JDK"
13984  new_path=`$CYGPATH -u "$path"`
13985
13986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13989  # "foo.exe" is OK but "foo" is an error.
13990  #
13991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13992  # It is also a way to make sure we got the proper file name for the real test later on.
13993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13994  if test "x$test_shortpath" = x; then
13995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13997    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13998  fi
13999
14000  # Call helper function which possibly converts this using DOS-style short mode.
14001  # If so, the updated path is stored in $new_path.
14002
14003  input_path="$new_path"
14004  # Check if we need to convert this using DOS-style short mode. If the path
14005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14006  # take no chances and rewrite it.
14007  # Note: m4 eats our [], so we need to use [ and ] instead.
14008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14009  if test "x$has_forbidden_chars" != x; then
14010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14014      # Going to short mode and back again did indeed matter. Since short mode is
14015      # case insensitive, let's make it lowercase to improve readability.
14016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14017      # Now convert it back to Unix-stile (cygpath)
14018      input_path=`$CYGPATH -u "$shortmode_path"`
14019      new_path="$input_path"
14020    fi
14021  fi
14022
14023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14024  if test "x$test_cygdrive_prefix" = x; then
14025    # As a simple fix, exclude /usr/bin since it's not a real path.
14026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14028      # a path prefixed by /cygdrive for fixpath to work.
14029      new_path="$CYGWIN_ROOT_PATH$input_path"
14030    fi
14031  fi
14032
14033
14034  if test "x$path" != "x$new_path"; then
14035    BOOT_JDK="$new_path"
14036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14038  fi
14039
14040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14041
14042  path="$BOOT_JDK"
14043  has_colon=`$ECHO $path | $GREP ^.:`
14044  new_path="$path"
14045  if test "x$has_colon" = x; then
14046    # Not in mixed or Windows style, start by that.
14047    new_path=`cmd //c echo $path`
14048  fi
14049
14050
14051  input_path="$new_path"
14052  # Check if we need to convert this using DOS-style short mode. If the path
14053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14054  # take no chances and rewrite it.
14055  # Note: m4 eats our [], so we need to use [ and ] instead.
14056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14057  if test "x$has_forbidden_chars" != x; then
14058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14060  fi
14061
14062
14063  windows_path="$new_path"
14064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14065    unix_path=`$CYGPATH -u "$windows_path"`
14066    new_path="$unix_path"
14067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14069    new_path="$unix_path"
14070  fi
14071
14072  if test "x$path" != "x$new_path"; then
14073    BOOT_JDK="$new_path"
14074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14076  fi
14077
14078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14080
14081  else
14082    # We're on a posix platform. Hooray! :)
14083    path="$BOOT_JDK"
14084
14085    if test ! -f "$path" && test ! -d "$path"; then
14086      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14087    fi
14088
14089    has_space=`$ECHO "$path" | $GREP " "`
14090    if test "x$has_space" != x; then
14091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14092$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14093      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14094    fi
14095  fi
14096
14097              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14098$as_echo_n "checking for Boot JDK... " >&6; }
14099              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14100$as_echo "$BOOT_JDK" >&6; }
14101              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14102$as_echo_n "checking Boot JDK version... " >&6; }
14103              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14104              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14105$as_echo "$BOOT_JDK_VERSION" >&6; }
14106            fi # end check jdk version
14107          fi # end check rt.jar
14108        fi # end check javac
14109      fi # end check java
14110    fi # end check boot jdk found
14111  fi
14112
14113  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14114
14115  if test "x$BOOT_JDK_FOUND" = xno; then
14116    # Now execute the test
14117
14118  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14119  BOOT_JDK_SUFFIX="/Contents/Home"
14120  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14121  if test "x$ALL_JDKS_FOUND" != x; then
14122    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14123
14124  if test "x$BOOT_JDK_FOUND" = xno; then
14125    # Now execute the test
14126
14127        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14128        if test -d "$BOOT_JDK"; then
14129          BOOT_JDK_FOUND=maybe
14130          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14131$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14132        fi
14133
14134
14135    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14136    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14137      # Do we have a bin/java?
14138      if test ! -x "$BOOT_JDK/bin/java"; then
14139        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14141        BOOT_JDK_FOUND=no
14142      else
14143        # Do we have a bin/javac?
14144        if test ! -x "$BOOT_JDK/bin/javac"; then
14145          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14147          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14148$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14149          BOOT_JDK_FOUND=no
14150        else
14151          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14152          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14153            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14155            BOOT_JDK_FOUND=no
14156          else
14157            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14158            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14159
14160            # Extra M4 quote needed to protect [] in grep expression.
14161            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14162            if test "x$FOUND_VERSION_78" = x; then
14163              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14165              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14166$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14167              BOOT_JDK_FOUND=no
14168            else
14169              # We're done! :-)
14170              BOOT_JDK_FOUND=yes
14171
14172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14173
14174  # Input might be given as Windows format, start by converting to
14175  # unix format.
14176  path="$BOOT_JDK"
14177  new_path=`$CYGPATH -u "$path"`
14178
14179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14182  # "foo.exe" is OK but "foo" is an error.
14183  #
14184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14185  # It is also a way to make sure we got the proper file name for the real test later on.
14186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14187  if test "x$test_shortpath" = x; then
14188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14190    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14191  fi
14192
14193  # Call helper function which possibly converts this using DOS-style short mode.
14194  # If so, the updated path is stored in $new_path.
14195
14196  input_path="$new_path"
14197  # Check if we need to convert this using DOS-style short mode. If the path
14198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14199  # take no chances and rewrite it.
14200  # Note: m4 eats our [], so we need to use [ and ] instead.
14201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14202  if test "x$has_forbidden_chars" != x; then
14203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14207      # Going to short mode and back again did indeed matter. Since short mode is
14208      # case insensitive, let's make it lowercase to improve readability.
14209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14210      # Now convert it back to Unix-stile (cygpath)
14211      input_path=`$CYGPATH -u "$shortmode_path"`
14212      new_path="$input_path"
14213    fi
14214  fi
14215
14216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14217  if test "x$test_cygdrive_prefix" = x; then
14218    # As a simple fix, exclude /usr/bin since it's not a real path.
14219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14221      # a path prefixed by /cygdrive for fixpath to work.
14222      new_path="$CYGWIN_ROOT_PATH$input_path"
14223    fi
14224  fi
14225
14226
14227  if test "x$path" != "x$new_path"; then
14228    BOOT_JDK="$new_path"
14229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14230$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14231  fi
14232
14233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14234
14235  path="$BOOT_JDK"
14236  has_colon=`$ECHO $path | $GREP ^.:`
14237  new_path="$path"
14238  if test "x$has_colon" = x; then
14239    # Not in mixed or Windows style, start by that.
14240    new_path=`cmd //c echo $path`
14241  fi
14242
14243
14244  input_path="$new_path"
14245  # Check if we need to convert this using DOS-style short mode. If the path
14246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14247  # take no chances and rewrite it.
14248  # Note: m4 eats our [], so we need to use [ and ] instead.
14249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14250  if test "x$has_forbidden_chars" != x; then
14251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14253  fi
14254
14255
14256  windows_path="$new_path"
14257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14258    unix_path=`$CYGPATH -u "$windows_path"`
14259    new_path="$unix_path"
14260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14262    new_path="$unix_path"
14263  fi
14264
14265  if test "x$path" != "x$new_path"; then
14266    BOOT_JDK="$new_path"
14267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14268$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14269  fi
14270
14271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14273
14274  else
14275    # We're on a posix platform. Hooray! :)
14276    path="$BOOT_JDK"
14277
14278    if test ! -f "$path" && test ! -d "$path"; then
14279      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14280    fi
14281
14282    has_space=`$ECHO "$path" | $GREP " "`
14283    if test "x$has_space" != x; then
14284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14286      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14287    fi
14288  fi
14289
14290              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14291$as_echo_n "checking for Boot JDK... " >&6; }
14292              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14293$as_echo "$BOOT_JDK" >&6; }
14294              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14295$as_echo_n "checking Boot JDK version... " >&6; }
14296              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14297              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14298$as_echo "$BOOT_JDK_VERSION" >&6; }
14299            fi # end check jdk version
14300          fi # end check rt.jar
14301        fi # end check javac
14302      fi # end check java
14303    fi # end check boot jdk found
14304  fi
14305
14306    done
14307  fi
14308
14309
14310    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14311    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14312      # Do we have a bin/java?
14313      if test ! -x "$BOOT_JDK/bin/java"; then
14314        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14316        BOOT_JDK_FOUND=no
14317      else
14318        # Do we have a bin/javac?
14319        if test ! -x "$BOOT_JDK/bin/javac"; then
14320          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14322          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14323$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14324          BOOT_JDK_FOUND=no
14325        else
14326          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14327          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14328            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14330            BOOT_JDK_FOUND=no
14331          else
14332            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14333            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14334
14335            # Extra M4 quote needed to protect [] in grep expression.
14336            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14337            if test "x$FOUND_VERSION_78" = x; then
14338              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14340              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14341$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14342              BOOT_JDK_FOUND=no
14343            else
14344              # We're done! :-)
14345              BOOT_JDK_FOUND=yes
14346
14347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14348
14349  # Input might be given as Windows format, start by converting to
14350  # unix format.
14351  path="$BOOT_JDK"
14352  new_path=`$CYGPATH -u "$path"`
14353
14354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14357  # "foo.exe" is OK but "foo" is an error.
14358  #
14359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14360  # It is also a way to make sure we got the proper file name for the real test later on.
14361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14362  if test "x$test_shortpath" = x; then
14363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14365    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14366  fi
14367
14368  # Call helper function which possibly converts this using DOS-style short mode.
14369  # If so, the updated path is stored in $new_path.
14370
14371  input_path="$new_path"
14372  # Check if we need to convert this using DOS-style short mode. If the path
14373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14374  # take no chances and rewrite it.
14375  # Note: m4 eats our [], so we need to use [ and ] instead.
14376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14377  if test "x$has_forbidden_chars" != x; then
14378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14382      # Going to short mode and back again did indeed matter. Since short mode is
14383      # case insensitive, let's make it lowercase to improve readability.
14384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14385      # Now convert it back to Unix-stile (cygpath)
14386      input_path=`$CYGPATH -u "$shortmode_path"`
14387      new_path="$input_path"
14388    fi
14389  fi
14390
14391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14392  if test "x$test_cygdrive_prefix" = x; then
14393    # As a simple fix, exclude /usr/bin since it's not a real path.
14394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14396      # a path prefixed by /cygdrive for fixpath to work.
14397      new_path="$CYGWIN_ROOT_PATH$input_path"
14398    fi
14399  fi
14400
14401
14402  if test "x$path" != "x$new_path"; then
14403    BOOT_JDK="$new_path"
14404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14406  fi
14407
14408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14409
14410  path="$BOOT_JDK"
14411  has_colon=`$ECHO $path | $GREP ^.:`
14412  new_path="$path"
14413  if test "x$has_colon" = x; then
14414    # Not in mixed or Windows style, start by that.
14415    new_path=`cmd //c echo $path`
14416  fi
14417
14418
14419  input_path="$new_path"
14420  # Check if we need to convert this using DOS-style short mode. If the path
14421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14422  # take no chances and rewrite it.
14423  # Note: m4 eats our [], so we need to use [ and ] instead.
14424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14425  if test "x$has_forbidden_chars" != x; then
14426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14428  fi
14429
14430
14431  windows_path="$new_path"
14432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14433    unix_path=`$CYGPATH -u "$windows_path"`
14434    new_path="$unix_path"
14435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14437    new_path="$unix_path"
14438  fi
14439
14440  if test "x$path" != "x$new_path"; then
14441    BOOT_JDK="$new_path"
14442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14444  fi
14445
14446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14448
14449  else
14450    # We're on a posix platform. Hooray! :)
14451    path="$BOOT_JDK"
14452
14453    if test ! -f "$path" && test ! -d "$path"; then
14454      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14455    fi
14456
14457    has_space=`$ECHO "$path" | $GREP " "`
14458    if test "x$has_space" != x; then
14459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14461      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14462    fi
14463  fi
14464
14465              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14466$as_echo_n "checking for Boot JDK... " >&6; }
14467              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14468$as_echo "$BOOT_JDK" >&6; }
14469              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14470$as_echo_n "checking Boot JDK version... " >&6; }
14471              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14472              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14473$as_echo "$BOOT_JDK_VERSION" >&6; }
14474            fi # end check jdk version
14475          fi # end check rt.jar
14476        fi # end check javac
14477      fi # end check java
14478    fi # end check boot jdk found
14479  fi
14480
14481
14482  if test "x$BOOT_JDK_FOUND" = xno; then
14483    # Now execute the test
14484
14485  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14486  BOOT_JDK_SUFFIX="/Contents/Home"
14487  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14488  if test "x$ALL_JDKS_FOUND" != x; then
14489    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14490
14491  if test "x$BOOT_JDK_FOUND" = xno; then
14492    # Now execute the test
14493
14494        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14495        if test -d "$BOOT_JDK"; then
14496          BOOT_JDK_FOUND=maybe
14497          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14498$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14499        fi
14500
14501
14502    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14503    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14504      # Do we have a bin/java?
14505      if test ! -x "$BOOT_JDK/bin/java"; then
14506        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14508        BOOT_JDK_FOUND=no
14509      else
14510        # Do we have a bin/javac?
14511        if test ! -x "$BOOT_JDK/bin/javac"; then
14512          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14514          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14515$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14516          BOOT_JDK_FOUND=no
14517        else
14518          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14519          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14520            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14522            BOOT_JDK_FOUND=no
14523          else
14524            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14525            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14526
14527            # Extra M4 quote needed to protect [] in grep expression.
14528            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14529            if test "x$FOUND_VERSION_78" = x; then
14530              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14532              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14533$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14534              BOOT_JDK_FOUND=no
14535            else
14536              # We're done! :-)
14537              BOOT_JDK_FOUND=yes
14538
14539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14540
14541  # Input might be given as Windows format, start by converting to
14542  # unix format.
14543  path="$BOOT_JDK"
14544  new_path=`$CYGPATH -u "$path"`
14545
14546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14549  # "foo.exe" is OK but "foo" is an error.
14550  #
14551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14552  # It is also a way to make sure we got the proper file name for the real test later on.
14553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14554  if test "x$test_shortpath" = x; then
14555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14556$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14557    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14558  fi
14559
14560  # Call helper function which possibly converts this using DOS-style short mode.
14561  # If so, the updated path is stored in $new_path.
14562
14563  input_path="$new_path"
14564  # Check if we need to convert this using DOS-style short mode. If the path
14565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14566  # take no chances and rewrite it.
14567  # Note: m4 eats our [], so we need to use [ and ] instead.
14568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14569  if test "x$has_forbidden_chars" != x; then
14570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14574      # Going to short mode and back again did indeed matter. Since short mode is
14575      # case insensitive, let's make it lowercase to improve readability.
14576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14577      # Now convert it back to Unix-stile (cygpath)
14578      input_path=`$CYGPATH -u "$shortmode_path"`
14579      new_path="$input_path"
14580    fi
14581  fi
14582
14583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14584  if test "x$test_cygdrive_prefix" = x; then
14585    # As a simple fix, exclude /usr/bin since it's not a real path.
14586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14588      # a path prefixed by /cygdrive for fixpath to work.
14589      new_path="$CYGWIN_ROOT_PATH$input_path"
14590    fi
14591  fi
14592
14593
14594  if test "x$path" != "x$new_path"; then
14595    BOOT_JDK="$new_path"
14596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14598  fi
14599
14600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14601
14602  path="$BOOT_JDK"
14603  has_colon=`$ECHO $path | $GREP ^.:`
14604  new_path="$path"
14605  if test "x$has_colon" = x; then
14606    # Not in mixed or Windows style, start by that.
14607    new_path=`cmd //c echo $path`
14608  fi
14609
14610
14611  input_path="$new_path"
14612  # Check if we need to convert this using DOS-style short mode. If the path
14613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14614  # take no chances and rewrite it.
14615  # Note: m4 eats our [], so we need to use [ and ] instead.
14616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14617  if test "x$has_forbidden_chars" != x; then
14618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14620  fi
14621
14622
14623  windows_path="$new_path"
14624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14625    unix_path=`$CYGPATH -u "$windows_path"`
14626    new_path="$unix_path"
14627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14629    new_path="$unix_path"
14630  fi
14631
14632  if test "x$path" != "x$new_path"; then
14633    BOOT_JDK="$new_path"
14634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14636  fi
14637
14638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14640
14641  else
14642    # We're on a posix platform. Hooray! :)
14643    path="$BOOT_JDK"
14644
14645    if test ! -f "$path" && test ! -d "$path"; then
14646      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14647    fi
14648
14649    has_space=`$ECHO "$path" | $GREP " "`
14650    if test "x$has_space" != x; then
14651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14653      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14654    fi
14655  fi
14656
14657              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14658$as_echo_n "checking for Boot JDK... " >&6; }
14659              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14660$as_echo "$BOOT_JDK" >&6; }
14661              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14662$as_echo_n "checking Boot JDK version... " >&6; }
14663              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14664              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14665$as_echo "$BOOT_JDK_VERSION" >&6; }
14666            fi # end check jdk version
14667          fi # end check rt.jar
14668        fi # end check javac
14669      fi # end check java
14670    fi # end check boot jdk found
14671  fi
14672
14673    done
14674  fi
14675
14676
14677    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14678    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14679      # Do we have a bin/java?
14680      if test ! -x "$BOOT_JDK/bin/java"; then
14681        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14683        BOOT_JDK_FOUND=no
14684      else
14685        # Do we have a bin/javac?
14686        if test ! -x "$BOOT_JDK/bin/javac"; then
14687          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14689          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14690$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14691          BOOT_JDK_FOUND=no
14692        else
14693          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14694          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14695            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14697            BOOT_JDK_FOUND=no
14698          else
14699            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14700            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14701
14702            # Extra M4 quote needed to protect [] in grep expression.
14703            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14704            if test "x$FOUND_VERSION_78" = x; then
14705              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14707              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14708$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14709              BOOT_JDK_FOUND=no
14710            else
14711              # We're done! :-)
14712              BOOT_JDK_FOUND=yes
14713
14714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14715
14716  # Input might be given as Windows format, start by converting to
14717  # unix format.
14718  path="$BOOT_JDK"
14719  new_path=`$CYGPATH -u "$path"`
14720
14721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14724  # "foo.exe" is OK but "foo" is an error.
14725  #
14726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14727  # It is also a way to make sure we got the proper file name for the real test later on.
14728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14729  if test "x$test_shortpath" = x; then
14730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14732    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14733  fi
14734
14735  # Call helper function which possibly converts this using DOS-style short mode.
14736  # If so, the updated path is stored in $new_path.
14737
14738  input_path="$new_path"
14739  # Check if we need to convert this using DOS-style short mode. If the path
14740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14741  # take no chances and rewrite it.
14742  # Note: m4 eats our [], so we need to use [ and ] instead.
14743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14744  if test "x$has_forbidden_chars" != x; then
14745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14749      # Going to short mode and back again did indeed matter. Since short mode is
14750      # case insensitive, let's make it lowercase to improve readability.
14751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14752      # Now convert it back to Unix-stile (cygpath)
14753      input_path=`$CYGPATH -u "$shortmode_path"`
14754      new_path="$input_path"
14755    fi
14756  fi
14757
14758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14759  if test "x$test_cygdrive_prefix" = x; then
14760    # As a simple fix, exclude /usr/bin since it's not a real path.
14761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14763      # a path prefixed by /cygdrive for fixpath to work.
14764      new_path="$CYGWIN_ROOT_PATH$input_path"
14765    fi
14766  fi
14767
14768
14769  if test "x$path" != "x$new_path"; then
14770    BOOT_JDK="$new_path"
14771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14773  fi
14774
14775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14776
14777  path="$BOOT_JDK"
14778  has_colon=`$ECHO $path | $GREP ^.:`
14779  new_path="$path"
14780  if test "x$has_colon" = x; then
14781    # Not in mixed or Windows style, start by that.
14782    new_path=`cmd //c echo $path`
14783  fi
14784
14785
14786  input_path="$new_path"
14787  # Check if we need to convert this using DOS-style short mode. If the path
14788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14789  # take no chances and rewrite it.
14790  # Note: m4 eats our [], so we need to use [ and ] instead.
14791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14792  if test "x$has_forbidden_chars" != x; then
14793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14795  fi
14796
14797
14798  windows_path="$new_path"
14799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14800    unix_path=`$CYGPATH -u "$windows_path"`
14801    new_path="$unix_path"
14802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14804    new_path="$unix_path"
14805  fi
14806
14807  if test "x$path" != "x$new_path"; then
14808    BOOT_JDK="$new_path"
14809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14811  fi
14812
14813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14815
14816  else
14817    # We're on a posix platform. Hooray! :)
14818    path="$BOOT_JDK"
14819
14820    if test ! -f "$path" && test ! -d "$path"; then
14821      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14822    fi
14823
14824    has_space=`$ECHO "$path" | $GREP " "`
14825    if test "x$has_space" != x; then
14826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14828      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14829    fi
14830  fi
14831
14832              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14833$as_echo_n "checking for Boot JDK... " >&6; }
14834              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14835$as_echo "$BOOT_JDK" >&6; }
14836              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14837$as_echo_n "checking Boot JDK version... " >&6; }
14838              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14839              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14840$as_echo "$BOOT_JDK_VERSION" >&6; }
14841            fi # end check jdk version
14842          fi # end check rt.jar
14843        fi # end check javac
14844      fi # end check java
14845    fi # end check boot jdk found
14846  fi
14847
14848  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14849
14850  if test "x$BOOT_JDK_FOUND" = xno; then
14851    # Now execute the test
14852
14853  BOOT_JDK_PREFIX="/usr/lib/jvm"
14854  BOOT_JDK_SUFFIX=""
14855  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14856  if test "x$ALL_JDKS_FOUND" != x; then
14857    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14858
14859  if test "x$BOOT_JDK_FOUND" = xno; then
14860    # Now execute the test
14861
14862        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14863        if test -d "$BOOT_JDK"; then
14864          BOOT_JDK_FOUND=maybe
14865          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14866$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14867        fi
14868
14869
14870    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14871    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14872      # Do we have a bin/java?
14873      if test ! -x "$BOOT_JDK/bin/java"; then
14874        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14876        BOOT_JDK_FOUND=no
14877      else
14878        # Do we have a bin/javac?
14879        if test ! -x "$BOOT_JDK/bin/javac"; then
14880          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14882          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14883$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14884          BOOT_JDK_FOUND=no
14885        else
14886          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14887          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14888            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14889$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14890            BOOT_JDK_FOUND=no
14891          else
14892            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14893            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14894
14895            # Extra M4 quote needed to protect [] in grep expression.
14896            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14897            if test "x$FOUND_VERSION_78" = x; then
14898              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14900              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14901$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14902              BOOT_JDK_FOUND=no
14903            else
14904              # We're done! :-)
14905              BOOT_JDK_FOUND=yes
14906
14907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14908
14909  # Input might be given as Windows format, start by converting to
14910  # unix format.
14911  path="$BOOT_JDK"
14912  new_path=`$CYGPATH -u "$path"`
14913
14914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14917  # "foo.exe" is OK but "foo" is an error.
14918  #
14919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14920  # It is also a way to make sure we got the proper file name for the real test later on.
14921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14922  if test "x$test_shortpath" = x; then
14923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14925    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14926  fi
14927
14928  # Call helper function which possibly converts this using DOS-style short mode.
14929  # If so, the updated path is stored in $new_path.
14930
14931  input_path="$new_path"
14932  # Check if we need to convert this using DOS-style short mode. If the path
14933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14934  # take no chances and rewrite it.
14935  # Note: m4 eats our [], so we need to use [ and ] instead.
14936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14937  if test "x$has_forbidden_chars" != x; then
14938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14942      # Going to short mode and back again did indeed matter. Since short mode is
14943      # case insensitive, let's make it lowercase to improve readability.
14944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14945      # Now convert it back to Unix-stile (cygpath)
14946      input_path=`$CYGPATH -u "$shortmode_path"`
14947      new_path="$input_path"
14948    fi
14949  fi
14950
14951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14952  if test "x$test_cygdrive_prefix" = x; then
14953    # As a simple fix, exclude /usr/bin since it's not a real path.
14954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14956      # a path prefixed by /cygdrive for fixpath to work.
14957      new_path="$CYGWIN_ROOT_PATH$input_path"
14958    fi
14959  fi
14960
14961
14962  if test "x$path" != "x$new_path"; then
14963    BOOT_JDK="$new_path"
14964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14966  fi
14967
14968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14969
14970  path="$BOOT_JDK"
14971  has_colon=`$ECHO $path | $GREP ^.:`
14972  new_path="$path"
14973  if test "x$has_colon" = x; then
14974    # Not in mixed or Windows style, start by that.
14975    new_path=`cmd //c echo $path`
14976  fi
14977
14978
14979  input_path="$new_path"
14980  # Check if we need to convert this using DOS-style short mode. If the path
14981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14982  # take no chances and rewrite it.
14983  # Note: m4 eats our [], so we need to use [ and ] instead.
14984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14985  if test "x$has_forbidden_chars" != x; then
14986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14988  fi
14989
14990
14991  windows_path="$new_path"
14992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14993    unix_path=`$CYGPATH -u "$windows_path"`
14994    new_path="$unix_path"
14995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14997    new_path="$unix_path"
14998  fi
14999
15000  if test "x$path" != "x$new_path"; then
15001    BOOT_JDK="$new_path"
15002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15004  fi
15005
15006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15008
15009  else
15010    # We're on a posix platform. Hooray! :)
15011    path="$BOOT_JDK"
15012
15013    if test ! -f "$path" && test ! -d "$path"; then
15014      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15015    fi
15016
15017    has_space=`$ECHO "$path" | $GREP " "`
15018    if test "x$has_space" != x; then
15019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15020$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15021      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15022    fi
15023  fi
15024
15025              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15026$as_echo_n "checking for Boot JDK... " >&6; }
15027              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15028$as_echo "$BOOT_JDK" >&6; }
15029              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15030$as_echo_n "checking Boot JDK version... " >&6; }
15031              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15032              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15033$as_echo "$BOOT_JDK_VERSION" >&6; }
15034            fi # end check jdk version
15035          fi # end check rt.jar
15036        fi # end check javac
15037      fi # end check java
15038    fi # end check boot jdk found
15039  fi
15040
15041    done
15042  fi
15043
15044
15045    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15046    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15047      # Do we have a bin/java?
15048      if test ! -x "$BOOT_JDK/bin/java"; then
15049        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15051        BOOT_JDK_FOUND=no
15052      else
15053        # Do we have a bin/javac?
15054        if test ! -x "$BOOT_JDK/bin/javac"; then
15055          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15057          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15058$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15059          BOOT_JDK_FOUND=no
15060        else
15061          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15062          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15063            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15065            BOOT_JDK_FOUND=no
15066          else
15067            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15068            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15069
15070            # Extra M4 quote needed to protect [] in grep expression.
15071            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15072            if test "x$FOUND_VERSION_78" = x; then
15073              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15075              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15076$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15077              BOOT_JDK_FOUND=no
15078            else
15079              # We're done! :-)
15080              BOOT_JDK_FOUND=yes
15081
15082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15083
15084  # Input might be given as Windows format, start by converting to
15085  # unix format.
15086  path="$BOOT_JDK"
15087  new_path=`$CYGPATH -u "$path"`
15088
15089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15092  # "foo.exe" is OK but "foo" is an error.
15093  #
15094  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15095  # It is also a way to make sure we got the proper file name for the real test later on.
15096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15097  if test "x$test_shortpath" = x; then
15098    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15099$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15100    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15101  fi
15102
15103  # Call helper function which possibly converts this using DOS-style short mode.
15104  # If so, the updated path is stored in $new_path.
15105
15106  input_path="$new_path"
15107  # Check if we need to convert this using DOS-style short mode. If the path
15108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15109  # take no chances and rewrite it.
15110  # Note: m4 eats our [], so we need to use [ and ] instead.
15111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15112  if test "x$has_forbidden_chars" != x; then
15113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15117      # Going to short mode and back again did indeed matter. Since short mode is
15118      # case insensitive, let's make it lowercase to improve readability.
15119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15120      # Now convert it back to Unix-stile (cygpath)
15121      input_path=`$CYGPATH -u "$shortmode_path"`
15122      new_path="$input_path"
15123    fi
15124  fi
15125
15126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15127  if test "x$test_cygdrive_prefix" = x; then
15128    # As a simple fix, exclude /usr/bin since it's not a real path.
15129    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15131      # a path prefixed by /cygdrive for fixpath to work.
15132      new_path="$CYGWIN_ROOT_PATH$input_path"
15133    fi
15134  fi
15135
15136
15137  if test "x$path" != "x$new_path"; then
15138    BOOT_JDK="$new_path"
15139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15141  fi
15142
15143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15144
15145  path="$BOOT_JDK"
15146  has_colon=`$ECHO $path | $GREP ^.:`
15147  new_path="$path"
15148  if test "x$has_colon" = x; then
15149    # Not in mixed or Windows style, start by that.
15150    new_path=`cmd //c echo $path`
15151  fi
15152
15153
15154  input_path="$new_path"
15155  # Check if we need to convert this using DOS-style short mode. If the path
15156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15157  # take no chances and rewrite it.
15158  # Note: m4 eats our [], so we need to use [ and ] instead.
15159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15160  if test "x$has_forbidden_chars" != x; then
15161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15163  fi
15164
15165
15166  windows_path="$new_path"
15167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15168    unix_path=`$CYGPATH -u "$windows_path"`
15169    new_path="$unix_path"
15170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15172    new_path="$unix_path"
15173  fi
15174
15175  if test "x$path" != "x$new_path"; then
15176    BOOT_JDK="$new_path"
15177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15178$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15179  fi
15180
15181  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15182  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15183
15184  else
15185    # We're on a posix platform. Hooray! :)
15186    path="$BOOT_JDK"
15187
15188    if test ! -f "$path" && test ! -d "$path"; then
15189      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15190    fi
15191
15192    has_space=`$ECHO "$path" | $GREP " "`
15193    if test "x$has_space" != x; then
15194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15196      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15197    fi
15198  fi
15199
15200              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15201$as_echo_n "checking for Boot JDK... " >&6; }
15202              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15203$as_echo "$BOOT_JDK" >&6; }
15204              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15205$as_echo_n "checking Boot JDK version... " >&6; }
15206              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15207              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15208$as_echo "$BOOT_JDK_VERSION" >&6; }
15209            fi # end check jdk version
15210          fi # end check rt.jar
15211        fi # end check javac
15212      fi # end check java
15213    fi # end check boot jdk found
15214  fi
15215
15216  fi
15217
15218
15219    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15220    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15221      # Do we have a bin/java?
15222      if test ! -x "$BOOT_JDK/bin/java"; then
15223        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15225        BOOT_JDK_FOUND=no
15226      else
15227        # Do we have a bin/javac?
15228        if test ! -x "$BOOT_JDK/bin/javac"; then
15229          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15231          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15232$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15233          BOOT_JDK_FOUND=no
15234        else
15235          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15236          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15237            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15239            BOOT_JDK_FOUND=no
15240          else
15241            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15242            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15243
15244            # Extra M4 quote needed to protect [] in grep expression.
15245            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15246            if test "x$FOUND_VERSION_78" = x; then
15247              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15249              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15250$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15251              BOOT_JDK_FOUND=no
15252            else
15253              # We're done! :-)
15254              BOOT_JDK_FOUND=yes
15255
15256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15257
15258  # Input might be given as Windows format, start by converting to
15259  # unix format.
15260  path="$BOOT_JDK"
15261  new_path=`$CYGPATH -u "$path"`
15262
15263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15266  # "foo.exe" is OK but "foo" is an error.
15267  #
15268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15269  # It is also a way to make sure we got the proper file name for the real test later on.
15270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15271  if test "x$test_shortpath" = x; then
15272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15274    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15275  fi
15276
15277  # Call helper function which possibly converts this using DOS-style short mode.
15278  # If so, the updated path is stored in $new_path.
15279
15280  input_path="$new_path"
15281  # Check if we need to convert this using DOS-style short mode. If the path
15282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15283  # take no chances and rewrite it.
15284  # Note: m4 eats our [], so we need to use [ and ] instead.
15285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15286  if test "x$has_forbidden_chars" != x; then
15287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15291      # Going to short mode and back again did indeed matter. Since short mode is
15292      # case insensitive, let's make it lowercase to improve readability.
15293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15294      # Now convert it back to Unix-stile (cygpath)
15295      input_path=`$CYGPATH -u "$shortmode_path"`
15296      new_path="$input_path"
15297    fi
15298  fi
15299
15300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15301  if test "x$test_cygdrive_prefix" = x; then
15302    # As a simple fix, exclude /usr/bin since it's not a real path.
15303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15305      # a path prefixed by /cygdrive for fixpath to work.
15306      new_path="$CYGWIN_ROOT_PATH$input_path"
15307    fi
15308  fi
15309
15310
15311  if test "x$path" != "x$new_path"; then
15312    BOOT_JDK="$new_path"
15313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15315  fi
15316
15317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15318
15319  path="$BOOT_JDK"
15320  has_colon=`$ECHO $path | $GREP ^.:`
15321  new_path="$path"
15322  if test "x$has_colon" = x; then
15323    # Not in mixed or Windows style, start by that.
15324    new_path=`cmd //c echo $path`
15325  fi
15326
15327
15328  input_path="$new_path"
15329  # Check if we need to convert this using DOS-style short mode. If the path
15330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15331  # take no chances and rewrite it.
15332  # Note: m4 eats our [], so we need to use [ and ] instead.
15333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15334  if test "x$has_forbidden_chars" != x; then
15335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15337  fi
15338
15339
15340  windows_path="$new_path"
15341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15342    unix_path=`$CYGPATH -u "$windows_path"`
15343    new_path="$unix_path"
15344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15346    new_path="$unix_path"
15347  fi
15348
15349  if test "x$path" != "x$new_path"; then
15350    BOOT_JDK="$new_path"
15351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15353  fi
15354
15355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15357
15358  else
15359    # We're on a posix platform. Hooray! :)
15360    path="$BOOT_JDK"
15361
15362    if test ! -f "$path" && test ! -d "$path"; then
15363      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15364    fi
15365
15366    has_space=`$ECHO "$path" | $GREP " "`
15367    if test "x$has_space" != x; then
15368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15370      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15371    fi
15372  fi
15373
15374              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15375$as_echo_n "checking for Boot JDK... " >&6; }
15376              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15377$as_echo "$BOOT_JDK" >&6; }
15378              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15379$as_echo_n "checking Boot JDK version... " >&6; }
15380              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15381              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15382$as_echo "$BOOT_JDK_VERSION" >&6; }
15383            fi # end check jdk version
15384          fi # end check rt.jar
15385        fi # end check javac
15386      fi # end check java
15387    fi # end check boot jdk found
15388  fi
15389
15390
15391# If we haven't found anything yet, we've truly lost. Give up.
15392if test "x$BOOT_JDK_FOUND" = xno; then
15393
15394    # Print a helpful message on how to acquire the necessary build dependency.
15395    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15396    MISSING_DEPENDENCY=openjdk
15397    PKGHANDLER_COMMAND=
15398
15399    case $PKGHANDLER in
15400	apt-get)
15401                apt_help     $MISSING_DEPENDENCY ;;
15402    yum)
15403                yum_help     $MISSING_DEPENDENCY ;;
15404	port)
15405                port_help    $MISSING_DEPENDENCY ;;
15406	pkgutil)
15407                pkgutil_help $MISSING_DEPENDENCY ;;
15408	pkgadd)
15409                pkgadd_help  $MISSING_DEPENDENCY ;;
15410    * )
15411      break ;;
15412    esac
15413
15414    if test "x$PKGHANDLER_COMMAND" != x; then
15415        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15416    fi
15417
15418  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15419$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15420  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15421$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15422  as_fn_error $? "Cannot continue" "$LINENO" 5
15423fi
15424
15425# Setup proper paths for what we found
15426BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15427if test ! -f "$BOOT_RTJAR"; then
15428    # On MacOSX it is called classes.jar
15429    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15430    if test -f "$BOOT_RTJAR"; then
15431      # Remove the ..
15432      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15433    fi
15434fi
15435BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15436BOOT_JDK="$BOOT_JDK"
15437
15438
15439
15440
15441# Setup tools from the Boot JDK.
15442
15443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15444$as_echo_n "checking for java in Boot JDK... " >&6; }
15445  JAVA=$BOOT_JDK/bin/java
15446  if test ! -x $JAVA; then
15447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15448$as_echo "not found" >&6; }
15449      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15450$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15451      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15452  fi
15453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15454$as_echo "ok" >&6; }
15455
15456
15457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15458$as_echo_n "checking for javac in Boot JDK... " >&6; }
15459  JAVAC=$BOOT_JDK/bin/javac
15460  if test ! -x $JAVAC; then
15461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15462$as_echo "not found" >&6; }
15463      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15464$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15465      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15466  fi
15467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15468$as_echo "ok" >&6; }
15469
15470
15471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15472$as_echo_n "checking for javah in Boot JDK... " >&6; }
15473  JAVAH=$BOOT_JDK/bin/javah
15474  if test ! -x $JAVAH; then
15475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15476$as_echo "not found" >&6; }
15477      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15478$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15479      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15480  fi
15481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15482$as_echo "ok" >&6; }
15483
15484
15485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15486$as_echo_n "checking for javap in Boot JDK... " >&6; }
15487  JAVAP=$BOOT_JDK/bin/javap
15488  if test ! -x $JAVAP; then
15489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15490$as_echo "not found" >&6; }
15491      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15492$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15493      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15494  fi
15495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15496$as_echo "ok" >&6; }
15497
15498
15499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15500$as_echo_n "checking for jar in Boot JDK... " >&6; }
15501  JAR=$BOOT_JDK/bin/jar
15502  if test ! -x $JAR; then
15503      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15504$as_echo "not found" >&6; }
15505      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15506$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15507      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15508  fi
15509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15510$as_echo "ok" >&6; }
15511
15512
15513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15514$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15515  RMIC=$BOOT_JDK/bin/rmic
15516  if test ! -x $RMIC; then
15517      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15518$as_echo "not found" >&6; }
15519      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15520$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15521      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15522  fi
15523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15524$as_echo "ok" >&6; }
15525
15526
15527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15528$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15529  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15530  if test ! -x $NATIVE2ASCII; then
15531      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15532$as_echo "not found" >&6; }
15533      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15534$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15535      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15536  fi
15537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15538$as_echo "ok" >&6; }
15539
15540
15541# Finally, set some other options...
15542
15543# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15544BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15545
15546
15547
15548
15549##############################################################################
15550#
15551# Specify options for anything that is run with the Boot JDK.
15552#
15553
15554# Check whether --with-boot-jdk-jvmargs was given.
15555if test "${with_boot_jdk_jvmargs+set}" = set; then :
15556  withval=$with_boot_jdk_jvmargs;
15557fi
15558
15559
15560if test "x$with_boot_jdk_jvmargs" = x; then
15561    # Not all JVM:s accept the same arguments on the command line.
15562    # OpenJDK specific increase in thread stack for JDK build,
15563    # well more specifically, when running javac.
15564    if test "x$BUILD_NUM_BITS" = x32; then
15565       STACK_SIZE=768
15566    else
15567       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15568       # since 64-bit pointers are pushed on the stach. Apparently, we need
15569       # to increase the stack space when javacing the JDK....
15570       STACK_SIZE=1536
15571    fi
15572
15573    # Minimum amount of heap memory.
15574
15575    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15576    # If so, then append -Xms64M to boot_jdk_jvmargs
15577    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15578    FOUND_VERSION=`$JAVA -Xms64M -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 -Xms64M"
15581    fi
15582
15583    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15584        # Why does macosx need more heap? Its the huge JDK batch.
15585
15586    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15587    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15588    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15589    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15590    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15591        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15592    fi
15593
15594    else
15595
15596    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15597    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15598    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15599    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15600    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15601        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15602    fi
15603
15604    fi
15605    # When is adding -client something that speeds up the JVM?
15606    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15607
15608    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15609    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15610    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15611    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15612    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15613        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15614    fi
15615
15616
15617    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15618    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15619    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15620    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15621    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15622        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15623    fi
15624
15625
15626    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15627    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15628    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15629    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15630    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15631        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15632    fi
15633
15634    # Disable special log output when a debug build is used as Boot JDK...
15635
15636    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15637    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15638    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15639    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15640    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15641        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15642    fi
15643
15644fi
15645
15646BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15647
15648
15649
15650###############################################################################
15651#
15652# Configure the sources to use. We can add or override individual directories.
15653#
15654###############################################################################
15655
15656
15657
15658# Where are the sources. Any of these can be overridden
15659# using --with-override-corba and the likes.
15660LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15661CORBA_TOPDIR="$SRC_ROOT/corba"
15662JAXP_TOPDIR="$SRC_ROOT/jaxp"
15663JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15664HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15665JDK_TOPDIR="$SRC_ROOT/jdk"
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675###############################################################################
15676#
15677# Pickup additional source for a component from outside of the source root
15678# or override source for a component.
15679#
15680
15681# Check whether --with-add-source-root was given.
15682if test "${with_add_source_root+set}" = set; then :
15683  withval=$with_add_source_root;
15684fi
15685
15686
15687
15688# Check whether --with-override-source-root was given.
15689if test "${with_override_source_root+set}" = set; then :
15690  withval=$with_override_source_root;
15691fi
15692
15693
15694
15695# Check whether --with-adds-and-overrides was given.
15696if test "${with_adds_and_overrides+set}" = set; then :
15697  withval=$with_adds_and_overrides;
15698fi
15699
15700
15701if test "x$with_adds_and_overrides" != x; then
15702    with_add_source_root="$with_adds_and_overrides/adds"
15703    with_override_source_root="$with_adds_and_overrides/overrides"
15704fi
15705
15706if test "x$with_add_source_root" != x; then
15707    if ! test -d $with_add_source_root; then
15708       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15709    fi
15710    CURDIR="$PWD"
15711    cd "$with_add_source_root"
15712    ADD_SRC_ROOT="`pwd`"
15713    cd "$CURDIR"
15714    # Verify that the addon source root does not have any root makefiles.
15715    # If it does, then it is usually an error, prevent this.
15716    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15717       test -f $with_add_source_root/langtools/make/Makefile; then
15718        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
15719    fi
15720    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15721       test -f $with_add_source_root/corba/make/Makefile; then
15722        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
15723    fi
15724    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15725       test -f $with_add_source_root/jaxp/make/Makefile; then
15726        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
15727    fi
15728    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15729       test -f $with_add_source_root/jaxws/make/Makefile; then
15730        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
15731    fi
15732    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15733       test -f $with_add_source_root/hotspot/make/Makefile; then
15734        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
15735    fi
15736    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15737       test -f $with_add_source_root/jdk/make/Makefile; then
15738        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
15739    fi
15740fi
15741
15742
15743if test "x$with_override_source_root" != x; then
15744    if ! test -d $with_override_source_root; then
15745       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15746    fi
15747    CURDIR="$PWD"
15748    cd "$with_override_source_root"
15749    OVERRIDE_SRC_ROOT="`pwd`"
15750    cd "$CURDIR"
15751    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15752       test -f $with_override_source_root/langtools/make/Makefile; then
15753        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
15754    fi
15755    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15756       test -f $with_override_source_root/corba/make/Makefile; then
15757        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
15758    fi
15759    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15760       test -f $with_override_source_root/jaxp/make/Makefile; then
15761        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
15762    fi
15763    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15764       test -f $with_override_source_root/jaxws/make/Makefile; then
15765        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
15766    fi
15767    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15768       test -f $with_override_source_root/hotspot/make/Makefile; then
15769        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
15770    fi
15771    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15772       test -f $with_override_source_root/jdk/make/Makefile; then
15773        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
15774    fi
15775fi
15776
15777
15778###############################################################################
15779#
15780# Override a repo completely, this is used for example when you have 3 small
15781# development sandboxes of the langtools sources and want to avoid having 3 full
15782# OpenJDK sources checked out on disk.
15783#
15784# Assuming that the 3 langtools sandboxes are located here:
15785# /home/fredrik/sandbox1/langtools
15786# /home/fredrik/sandbox2/langtools
15787# /home/fredrik/sandbox3/langtools
15788#
15789# From the source root you create build subdirs manually:
15790#     mkdir -p build1 build2 build3
15791# in each build directory run:
15792#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15793#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15794#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15795#
15796
15797
15798# Check whether --with-override-langtools was given.
15799if test "${with_override_langtools+set}" = set; then :
15800  withval=$with_override_langtools;
15801fi
15802
15803
15804
15805# Check whether --with-override-corba was given.
15806if test "${with_override_corba+set}" = set; then :
15807  withval=$with_override_corba;
15808fi
15809
15810
15811
15812# Check whether --with-override-jaxp was given.
15813if test "${with_override_jaxp+set}" = set; then :
15814  withval=$with_override_jaxp;
15815fi
15816
15817
15818
15819# Check whether --with-override-jaxws was given.
15820if test "${with_override_jaxws+set}" = set; then :
15821  withval=$with_override_jaxws;
15822fi
15823
15824
15825
15826# Check whether --with-override-hotspot was given.
15827if test "${with_override_hotspot+set}" = set; then :
15828  withval=$with_override_hotspot;
15829fi
15830
15831
15832
15833# Check whether --with-override-jdk was given.
15834if test "${with_override_jdk+set}" = set; then :
15835  withval=$with_override_jdk;
15836fi
15837
15838
15839if test "x$with_override_langtools" != x; then
15840    CURDIR="$PWD"
15841    cd "$with_override_langtools"
15842    LANGTOOLS_TOPDIR="`pwd`"
15843    cd "$CURDIR"
15844    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15845        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15846    fi
15847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15848$as_echo_n "checking if langtools should be overridden... " >&6; }
15849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15850$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15851fi
15852if test "x$with_override_corba" != x; then
15853    CURDIR="$PWD"
15854    cd "$with_override_corba"
15855    CORBA_TOPDIR="`pwd`"
15856    cd "$CURDIR"
15857    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15858        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15859    fi
15860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15861$as_echo_n "checking if corba should be overridden... " >&6; }
15862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15863$as_echo "yes with $CORBA_TOPDIR" >&6; }
15864fi
15865if test "x$with_override_jaxp" != x; then
15866    CURDIR="$PWD"
15867    cd "$with_override_jaxp"
15868    JAXP_TOPDIR="`pwd`"
15869    cd "$CURDIR"
15870    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15871        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15872    fi
15873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15874$as_echo_n "checking if jaxp should be overridden... " >&6; }
15875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15876$as_echo "yes with $JAXP_TOPDIR" >&6; }
15877fi
15878if test "x$with_override_jaxws" != x; then
15879    CURDIR="$PWD"
15880    cd "$with_override_jaxws"
15881    JAXWS_TOPDIR="`pwd`"
15882    cd "$CURDIR"
15883    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15884        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15885    fi
15886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15887$as_echo_n "checking if jaxws should be overridden... " >&6; }
15888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15889$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15890fi
15891if test "x$with_override_hotspot" != x; then
15892    CURDIR="$PWD"
15893    cd "$with_override_hotspot"
15894    HOTSPOT_TOPDIR="`pwd`"
15895    cd "$CURDIR"
15896    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15897       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15898        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15899    fi
15900    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15901$as_echo_n "checking if hotspot should be overridden... " >&6; }
15902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15903$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15904fi
15905if test "x$with_override_jdk" != x; then
15906    CURDIR="$PWD"
15907    cd "$with_override_jdk"
15908    JDK_TOPDIR="`pwd`"
15909    cd "$CURDIR"
15910    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15911        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15912    fi
15913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15914$as_echo_n "checking if JDK should be overridden... " >&6; }
15915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15916$as_echo "yes with $JDK_TOPDIR" >&6; }
15917fi
15918
15919
15920
15921BUILD_OUTPUT="$OUTPUT_ROOT"
15922
15923
15924HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15925BUILD_HOTSPOT=true
15926
15927
15928
15929# Check whether --with-import-hotspot was given.
15930if test "${with_import_hotspot+set}" = set; then :
15931  withval=$with_import_hotspot;
15932fi
15933
15934if test "x$with_import_hotspot" != x; then
15935    CURDIR="$PWD"
15936    cd "$with_import_hotspot"
15937    HOTSPOT_DIST="`pwd`"
15938    cd "$CURDIR"
15939    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15940        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15941    fi
15942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15943$as_echo_n "checking if hotspot should be imported... " >&6; }
15944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15945$as_echo "yes from $HOTSPOT_DIST" >&6; }
15946    BUILD_HOTSPOT=false
15947fi
15948
15949JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15950
15951
15952###############################################################################
15953#
15954# Setup the toolchain (compilers etc), i.e. the tools that need to be
15955# cross-compilation aware.
15956#
15957###############################################################################
15958
15959
15960###############################################################################
15961#
15962# Configure the development tool paths and potential sysroot.
15963#
15964ac_ext=cpp
15965ac_cpp='$CXXCPP $CPPFLAGS'
15966ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15967ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15968ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15969
15970
15971# The option used to specify the target .o,.a or .so file.
15972# When compiling, how to specify the to be created object file.
15973CC_OUT_OPTION='-o$(SPACE)'
15974# When linking, how to specify the to be created executable.
15975EXE_OUT_OPTION='-o$(SPACE)'
15976# When linking, how to specify the to be created dynamically linkable library.
15977LD_OUT_OPTION='-o$(SPACE)'
15978# When archiving, how to specify the to be create static archive for object files.
15979AR_OUT_OPTION='rcs$(SPACE)'
15980
15981
15982
15983
15984
15985# Locate the actual tools
15986
15987if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15988
15989  # Store path to cygwin link.exe to help excluding it when searching for
15990  # VS linker. This must be done before changing the PATH when looking for VS.
15991  # Extract the first word of "link", so it can be a program name with args.
15992set dummy link; ac_word=$2
15993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15994$as_echo_n "checking for $ac_word... " >&6; }
15995if ${ac_cv_path_CYGWIN_LINK+:} false; then :
15996  $as_echo_n "(cached) " >&6
15997else
15998  case $CYGWIN_LINK in
15999  [\\/]* | ?:[\\/]*)
16000  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16001  ;;
16002  *)
16003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16004for as_dir in $PATH
16005do
16006  IFS=$as_save_IFS
16007  test -z "$as_dir" && as_dir=.
16008    for ac_exec_ext in '' $ac_executable_extensions; do
16009  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16010    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16012    break 2
16013  fi
16014done
16015  done
16016IFS=$as_save_IFS
16017
16018  ;;
16019esac
16020fi
16021CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16022if test -n "$CYGWIN_LINK"; then
16023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16024$as_echo "$CYGWIN_LINK" >&6; }
16025else
16026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16027$as_echo "no" >&6; }
16028fi
16029
16030
16031  if test "x$CYGWIN_LINK" != x; then
16032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16033$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16034    "$CYGWIN_LINK" --version > /dev/null
16035    if test $? -eq 0 ; then
16036      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16037$as_echo "yes" >&6; }
16038    else
16039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16040$as_echo "no" >&6; }
16041      # This might be the VS linker. Don't exclude it later on.
16042      CYGWIN_LINK=""
16043    fi
16044  fi
16045
16046  # First-hand choice is to locate and run the vsvars bat file.
16047
16048  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16049    VCVARSFILE="vc/bin/vcvars32.bat"
16050  else
16051    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16052  fi
16053
16054  VS_ENV_CMD=""
16055  VS_ENV_ARGS=""
16056  if test "x$with_toolsdir" != x; then
16057
16058  if test "x$VS_ENV_CMD" = x; then
16059    VS100BASE="$with_toolsdir/../.."
16060    METHOD="--with-tools-dir"
16061
16062  windows_path="$VS100BASE"
16063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16064    unix_path=`$CYGPATH -u "$windows_path"`
16065    VS100BASE="$unix_path"
16066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16068    VS100BASE="$unix_path"
16069  fi
16070
16071    if test -d "$VS100BASE"; then
16072      if test -f "$VS100BASE/$VCVARSFILE"; then
16073        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16074$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16075        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16076      else
16077        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16078$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16079        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16080$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16081      fi
16082    fi
16083  fi
16084
16085  fi
16086
16087  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16088    # Having specified an argument which is incorrect will produce an instant failure;
16089    # we should not go on looking
16090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16091$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16092    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16093$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16094    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16095  fi
16096
16097  if test "x$ProgramW6432" != x; then
16098
16099  if test "x$VS_ENV_CMD" = x; then
16100    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16101    METHOD="well-known name"
16102
16103  windows_path="$WIN_SDK_BASE"
16104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16105    unix_path=`$CYGPATH -u "$windows_path"`
16106    WIN_SDK_BASE="$unix_path"
16107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16109    WIN_SDK_BASE="$unix_path"
16110  fi
16111
16112    if test -d "$WIN_SDK_BASE"; then
16113      # There have been cases of partial or broken SDK installations. A missing
16114      # lib dir is not going to work.
16115      if test ! -d "$WIN_SDK_BASE/../lib"; then
16116        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16117$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16118        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16119$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16120      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16121        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16122$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16123        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16124        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16125          VS_ENV_ARGS="/x86"
16126        else
16127          VS_ENV_ARGS="/x64"
16128        fi
16129      else
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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16133$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16134      fi
16135    fi
16136  fi
16137
16138  fi
16139  if test "x$PROGRAMW6432" != x; then
16140
16141  if test "x$VS_ENV_CMD" = x; then
16142    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16143    METHOD="well-known name"
16144
16145  windows_path="$WIN_SDK_BASE"
16146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16147    unix_path=`$CYGPATH -u "$windows_path"`
16148    WIN_SDK_BASE="$unix_path"
16149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16151    WIN_SDK_BASE="$unix_path"
16152  fi
16153
16154    if test -d "$WIN_SDK_BASE"; then
16155      # There have been cases of partial or broken SDK installations. A missing
16156      # lib dir is not going to work.
16157      if test ! -d "$WIN_SDK_BASE/../lib"; then
16158        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16159$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16160        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16161$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16162      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16163        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16164$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16165        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16166        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16167          VS_ENV_ARGS="/x86"
16168        else
16169          VS_ENV_ARGS="/x64"
16170        fi
16171      else
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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16175$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16176      fi
16177    fi
16178  fi
16179
16180  fi
16181  if test "x$PROGRAMFILES" != x; then
16182
16183  if test "x$VS_ENV_CMD" = x; then
16184    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16185    METHOD="well-known name"
16186
16187  windows_path="$WIN_SDK_BASE"
16188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16189    unix_path=`$CYGPATH -u "$windows_path"`
16190    WIN_SDK_BASE="$unix_path"
16191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16193    WIN_SDK_BASE="$unix_path"
16194  fi
16195
16196    if test -d "$WIN_SDK_BASE"; then
16197      # There have been cases of partial or broken SDK installations. A missing
16198      # lib dir is not going to work.
16199      if test ! -d "$WIN_SDK_BASE/../lib"; then
16200        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16201$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16202        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16203$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16204      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16205        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16206$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16207        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16208        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16209          VS_ENV_ARGS="/x86"
16210        else
16211          VS_ENV_ARGS="/x64"
16212        fi
16213      else
16214        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16215$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16216        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16217$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16218      fi
16219    fi
16220  fi
16221
16222  fi
16223
16224  if test "x$VS_ENV_CMD" = x; then
16225    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16226    METHOD="well-known name"
16227
16228  windows_path="$WIN_SDK_BASE"
16229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16230    unix_path=`$CYGPATH -u "$windows_path"`
16231    WIN_SDK_BASE="$unix_path"
16232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16234    WIN_SDK_BASE="$unix_path"
16235  fi
16236
16237    if test -d "$WIN_SDK_BASE"; then
16238      # There have been cases of partial or broken SDK installations. A missing
16239      # lib dir is not going to work.
16240      if test ! -d "$WIN_SDK_BASE/../lib"; then
16241        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16242$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16243        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16244$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16245      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16246        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16247$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16248        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16249        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16250          VS_ENV_ARGS="/x86"
16251        else
16252          VS_ENV_ARGS="/x64"
16253        fi
16254      else
16255        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16256$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16257        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16258$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16259      fi
16260    fi
16261  fi
16262
16263
16264  if test "x$VS_ENV_CMD" = x; then
16265    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16266    METHOD="well-known name"
16267
16268  windows_path="$WIN_SDK_BASE"
16269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16270    unix_path=`$CYGPATH -u "$windows_path"`
16271    WIN_SDK_BASE="$unix_path"
16272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16274    WIN_SDK_BASE="$unix_path"
16275  fi
16276
16277    if test -d "$WIN_SDK_BASE"; then
16278      # There have been cases of partial or broken SDK installations. A missing
16279      # lib dir is not going to work.
16280      if test ! -d "$WIN_SDK_BASE/../lib"; then
16281        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16282$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16283        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16284$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16285      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16286        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16287$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16288        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16289        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16290          VS_ENV_ARGS="/x86"
16291        else
16292          VS_ENV_ARGS="/x64"
16293        fi
16294      else
16295        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16296$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16297        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16298$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16299      fi
16300    fi
16301  fi
16302
16303
16304  if test "x$VS100COMNTOOLS" != x; then
16305
16306  if test "x$VS_ENV_CMD" = x; then
16307    VS100BASE="$VS100COMNTOOLS/../.."
16308    METHOD="VS100COMNTOOLS variable"
16309
16310  windows_path="$VS100BASE"
16311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16312    unix_path=`$CYGPATH -u "$windows_path"`
16313    VS100BASE="$unix_path"
16314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16316    VS100BASE="$unix_path"
16317  fi
16318
16319    if test -d "$VS100BASE"; then
16320      if test -f "$VS100BASE/$VCVARSFILE"; then
16321        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16322$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16323        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16324      else
16325        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16326$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16327        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16328$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16329      fi
16330    fi
16331  fi
16332
16333  fi
16334  if test "x$PROGRAMFILES" != x; then
16335
16336  if test "x$VS_ENV_CMD" = x; then
16337    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16338    METHOD="well-known name"
16339
16340  windows_path="$VS100BASE"
16341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16342    unix_path=`$CYGPATH -u "$windows_path"`
16343    VS100BASE="$unix_path"
16344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16346    VS100BASE="$unix_path"
16347  fi
16348
16349    if test -d "$VS100BASE"; then
16350      if test -f "$VS100BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16354      else
16355        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16356$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16357        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16358$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16359      fi
16360    fi
16361  fi
16362
16363  fi
16364
16365  if test "x$VS_ENV_CMD" = x; then
16366    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16367    METHOD="well-known name"
16368
16369  windows_path="$VS100BASE"
16370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16371    unix_path=`$CYGPATH -u "$windows_path"`
16372    VS100BASE="$unix_path"
16373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16375    VS100BASE="$unix_path"
16376  fi
16377
16378    if test -d "$VS100BASE"; then
16379      if test -f "$VS100BASE/$VCVARSFILE"; then
16380        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16381$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16382        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16383      else
16384        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16385$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16386        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16387$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16388      fi
16389    fi
16390  fi
16391
16392
16393  if test "x$VS_ENV_CMD" = x; then
16394    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16395    METHOD="well-known name"
16396
16397  windows_path="$VS100BASE"
16398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16399    unix_path=`$CYGPATH -u "$windows_path"`
16400    VS100BASE="$unix_path"
16401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16403    VS100BASE="$unix_path"
16404  fi
16405
16406    if test -d "$VS100BASE"; then
16407      if test -f "$VS100BASE/$VCVARSFILE"; then
16408        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16409$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16410        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16411      else
16412        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16413$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16414        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16415$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16416      fi
16417    fi
16418  fi
16419
16420
16421  if test "x$VS_ENV_CMD" != x; then
16422    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16423
16424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16425
16426  # First separate the path from the arguments. This will split at the first
16427  # space.
16428  complete="$VS_ENV_CMD"
16429  path="${complete%% *}"
16430  tmp="$complete EOL"
16431  arguments="${tmp#* }"
16432
16433  # Input might be given as Windows format, start by converting to
16434  # unix format.
16435  new_path=`$CYGPATH -u "$path"`
16436
16437  # Now try to locate executable using which
16438  new_path=`$WHICH "$new_path" 2> /dev/null`
16439  # bat and cmd files are not always considered executable in cygwin causing which
16440  # to not find them
16441  if test "x$new_path" = x \
16442           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16443           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16444    new_path=`$CYGPATH -u "$path"`
16445  fi
16446  if test "x$new_path" = x; then
16447    # Oops. Which didn't find the executable.
16448    # The splitting of arguments from the executable at a space might have been incorrect,
16449    # since paths with space are more likely in Windows. Give it another try with the whole
16450    # argument.
16451    path="$complete"
16452    arguments="EOL"
16453    new_path=`$CYGPATH -u "$path"`
16454    new_path=`$WHICH "$new_path" 2> /dev/null`
16455    # bat and cmd files are not always considered executable in cygwin causing which
16456    # to not find them
16457    if test "x$new_path" = x \
16458             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16459             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16460      new_path=`$CYGPATH -u "$path"`
16461    fi
16462    if test "x$new_path" = x; then
16463      # It's still not found. Now this is an unrecoverable error.
16464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16465$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16466      has_space=`$ECHO "$complete" | $GREP " "`
16467      if test "x$has_space" != x; then
16468        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16469$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16470      fi
16471      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16472    fi
16473  fi
16474
16475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16478  # "foo.exe" is OK but "foo" is an error.
16479  #
16480  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16481  # It is also a way to make sure we got the proper file name for the real test later on.
16482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16483  if test "x$test_shortpath" = x; then
16484    # Short path failed, file does not exist as specified.
16485    # Try adding .exe or .cmd
16486    if test -f "${new_path}.exe"; then
16487       input_to_shortpath="${new_path}.exe"
16488    elif test -f "${new_path}.cmd"; then
16489       input_to_shortpath="${new_path}.cmd"
16490    else
16491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16492$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16493      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16494$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16495      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16496    fi
16497  else
16498    input_to_shortpath="$new_path"
16499  fi
16500
16501  # Call helper function which possibly converts this using DOS-style short mode.
16502  # If so, the updated path is stored in $new_path.
16503  new_path="$input_to_shortpath"
16504
16505  input_path="$input_to_shortpath"
16506  # Check if we need to convert this using DOS-style short mode. If the path
16507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16508  # take no chances and rewrite it.
16509  # Note: m4 eats our [], so we need to use [ and ] instead.
16510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16511  if test "x$has_forbidden_chars" != x; then
16512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16516      # Going to short mode and back again did indeed matter. Since short mode is
16517      # case insensitive, let's make it lowercase to improve readability.
16518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16519      # Now convert it back to Unix-stile (cygpath)
16520      input_path=`$CYGPATH -u "$shortmode_path"`
16521      new_path="$input_path"
16522    fi
16523  fi
16524
16525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16526  if test "x$test_cygdrive_prefix" = x; then
16527    # As a simple fix, exclude /usr/bin since it's not a real path.
16528    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16530      # a path prefixed by /cygdrive for fixpath to work.
16531      new_path="$CYGWIN_ROOT_PATH$input_path"
16532    fi
16533  fi
16534
16535  # remove trailing .exe if any
16536  new_path="${new_path/%.exe/}"
16537
16538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16539
16540  # First separate the path from the arguments. This will split at the first
16541  # space.
16542  complete="$VS_ENV_CMD"
16543  path="${complete%% *}"
16544  tmp="$complete EOL"
16545  arguments="${tmp#* }"
16546
16547  # Input might be given as Windows format, start by converting to
16548  # unix format.
16549  new_path="$path"
16550
16551  windows_path="$new_path"
16552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16553    unix_path=`$CYGPATH -u "$windows_path"`
16554    new_path="$unix_path"
16555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16557    new_path="$unix_path"
16558  fi
16559
16560
16561  # Now try to locate executable using which
16562  new_path=`$WHICH "$new_path" 2> /dev/null`
16563
16564  if test "x$new_path" = x; then
16565    # Oops. Which didn't find the executable.
16566    # The splitting of arguments from the executable at a space might have been incorrect,
16567    # since paths with space are more likely in Windows. Give it another try with the whole
16568    # argument.
16569    path="$complete"
16570    arguments="EOL"
16571    new_path="$path"
16572
16573  windows_path="$new_path"
16574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16575    unix_path=`$CYGPATH -u "$windows_path"`
16576    new_path="$unix_path"
16577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16579    new_path="$unix_path"
16580  fi
16581
16582
16583    new_path=`$WHICH "$new_path" 2> /dev/null`
16584
16585    if test "x$new_path" = x; then
16586      # It's still not found. Now this is an unrecoverable error.
16587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16588$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16589      has_space=`$ECHO "$complete" | $GREP " "`
16590      if test "x$has_space" != x; then
16591        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16592$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16593      fi
16594      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16595    fi
16596  fi
16597
16598  # Now new_path has a complete unix path to the binary
16599  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16600    # Keep paths in /bin as-is, but remove trailing .exe if any
16601    new_path="${new_path/%.exe/}"
16602    # Do not save /bin paths to all_fixpath_prefixes!
16603  else
16604    # Not in mixed or Windows style, start by that.
16605    new_path=`cmd //c echo $new_path`
16606
16607  input_path="$new_path"
16608  # Check if we need to convert this using DOS-style short mode. If the path
16609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16610  # take no chances and rewrite it.
16611  # Note: m4 eats our [], so we need to use [ and ] instead.
16612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16613  if test "x$has_forbidden_chars" != x; then
16614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16616  fi
16617
16618    # Output is in $new_path
16619
16620  windows_path="$new_path"
16621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16622    unix_path=`$CYGPATH -u "$windows_path"`
16623    new_path="$unix_path"
16624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16626    new_path="$unix_path"
16627  fi
16628
16629    # remove trailing .exe if any
16630    new_path="${new_path/%.exe/}"
16631
16632    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16633    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16634  fi
16635
16636  else
16637    # We're on a posix platform. Hooray! :)
16638    # First separate the path from the arguments. This will split at the first
16639    # space.
16640    complete="$VS_ENV_CMD"
16641    path="${complete%% *}"
16642    tmp="$complete EOL"
16643    arguments="${tmp#* }"
16644
16645    # Cannot rely on the command "which" here since it doesn't always work.
16646    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16647    if test -z "$is_absolute_path"; then
16648      # Path to executable is not absolute. Find it.
16649      IFS_save="$IFS"
16650      IFS=:
16651      for p in $PATH; do
16652        if test -f "$p/$path" && test -x "$p/$path"; then
16653          new_path="$p/$path"
16654          break
16655        fi
16656      done
16657      IFS="$IFS_save"
16658    else
16659      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16660$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16661      new_path="$path"
16662    fi
16663
16664    if test "x$new_path" = x; then
16665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16666$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16667        has_space=`$ECHO "$complete" | $GREP " "`
16668        if test "x$has_space" != x; then
16669          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16670$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16671        fi
16672        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16673      fi
16674  fi
16675
16676      # Now join together the path and the arguments once again
16677      if test "x$arguments" != xEOL; then
16678        new_complete="$new_path ${arguments% *}"
16679      else
16680        new_complete="$new_path"
16681      fi
16682
16683  if test "x$complete" != "x$new_complete"; then
16684      VS_ENV_CMD="$new_complete"
16685      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16686$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16687    fi
16688
16689
16690    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16691    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16692$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16693    cd $OUTPUT_ROOT
16694    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16695    # to autoconf standards.
16696
16697    #----
16698
16699    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16700    # but calculate the difference in Cygwin environment before/after running it and then
16701    # apply the diff.
16702
16703    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16704      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16705      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16706      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16707    else
16708      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16709      _dosbash=`cmd //c echo \`which bash\``
16710    fi
16711
16712    # generate the set of exported vars before/after the vs10 setup
16713    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16714    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16715    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16716    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16717
16718    # Now execute the newly created bat file.
16719    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16720    cmd /c localdevenvtmp.bat | cat
16721
16722    # apply the diff (less some non-vs10 vars named by "!")
16723    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16724    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16725    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16726
16727    # cleanup
16728    $RM localdevenvtmp*
16729    #----
16730    cd $CURDIR
16731    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16733$as_echo "no" >&6; }
16734      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16735$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16736      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16737$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16738      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16739$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16740      as_fn_error $? "Cannot continue" "$LINENO" 5
16741    fi
16742
16743    # Now set all paths and other env variables. This will allow the rest of
16744    # the configure script to find and run the compiler in the proper way.
16745    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16746$as_echo "$as_me: Setting extracted environment variables" >&6;}
16747    . $OUTPUT_ROOT/localdevenv.sh
16748  else
16749    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16750    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16751$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16752  fi
16753
16754  # At this point, we should have corrent variables in the environment, or we can't continue.
16755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16756$as_echo_n "checking for Visual Studio variables... " >&6; }
16757
16758  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16759    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16761$as_echo "present but broken" >&6; }
16762      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16763    else
16764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16765$as_echo "ok" >&6; }
16766      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16767      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16768      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16769      VS_PATH="$PATH"
16770
16771
16772
16773    fi
16774  else
16775    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16776$as_echo "not found" >&6; }
16777
16778    if test "x$VS_ENV_CMD" = x; then
16779      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16780$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16781      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16782$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16783    else
16784      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16785$as_echo "$as_me: Running the extraction script failed." >&6;}
16786    fi
16787    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16788$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16789    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16790$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16791    as_fn_error $? "Cannot continue" "$LINENO" 5
16792  fi
16793
16794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16795$as_echo_n "checking for msvcr100.dll... " >&6; }
16796
16797# Check whether --with-msvcr-dll was given.
16798if test "${with_msvcr_dll+set}" = set; then :
16799  withval=$with_msvcr_dll;
16800fi
16801
16802  if test "x$with_msvcr_dll" != x; then
16803    MSVCR_DLL="$with_msvcr_dll"
16804  else
16805    if test "x$VCINSTALLDIR" != x; then
16806      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16807        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16808      else
16809        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16810        if test "x$MSVCR_DLL" = x; then
16811          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16812        fi
16813      fi
16814      if test "x$MSVCR_DLL" != x; then
16815        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16816$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16817      else
16818        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16819$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16820      fi
16821    fi
16822    if test "x$MSVCR_DLL" = x; then
16823      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16824        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16825$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16826        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16827      fi
16828    fi
16829  fi
16830  if test "x$MSVCR_DLL" = x; then
16831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16832$as_echo "no" >&6; }
16833    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16834  fi
16835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16836$as_echo "$MSVCR_DLL" >&6; }
16837
16838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16839
16840  # Input might be given as Windows format, start by converting to
16841  # unix format.
16842  path="$MSVCR_DLL"
16843  new_path=`$CYGPATH -u "$path"`
16844
16845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16848  # "foo.exe" is OK but "foo" is an error.
16849  #
16850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16851  # It is also a way to make sure we got the proper file name for the real test later on.
16852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16853  if test "x$test_shortpath" = x; then
16854    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16855$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16856    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16857  fi
16858
16859  # Call helper function which possibly converts this using DOS-style short mode.
16860  # If so, the updated path is stored in $new_path.
16861
16862  input_path="$new_path"
16863  # Check if we need to convert this using DOS-style short mode. If the path
16864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16865  # take no chances and rewrite it.
16866  # Note: m4 eats our [], so we need to use [ and ] instead.
16867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16868  if test "x$has_forbidden_chars" != x; then
16869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16873      # Going to short mode and back again did indeed matter. Since short mode is
16874      # case insensitive, let's make it lowercase to improve readability.
16875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16876      # Now convert it back to Unix-stile (cygpath)
16877      input_path=`$CYGPATH -u "$shortmode_path"`
16878      new_path="$input_path"
16879    fi
16880  fi
16881
16882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16883  if test "x$test_cygdrive_prefix" = x; then
16884    # As a simple fix, exclude /usr/bin since it's not a real path.
16885    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16887      # a path prefixed by /cygdrive for fixpath to work.
16888      new_path="$CYGWIN_ROOT_PATH$input_path"
16889    fi
16890  fi
16891
16892
16893  if test "x$path" != "x$new_path"; then
16894    MSVCR_DLL="$new_path"
16895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16896$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16897  fi
16898
16899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16900
16901  path="$MSVCR_DLL"
16902  has_colon=`$ECHO $path | $GREP ^.:`
16903  new_path="$path"
16904  if test "x$has_colon" = x; then
16905    # Not in mixed or Windows style, start by that.
16906    new_path=`cmd //c echo $path`
16907  fi
16908
16909
16910  input_path="$new_path"
16911  # Check if we need to convert this using DOS-style short mode. If the path
16912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16913  # take no chances and rewrite it.
16914  # Note: m4 eats our [], so we need to use [ and ] instead.
16915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16916  if test "x$has_forbidden_chars" != x; then
16917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16919  fi
16920
16921
16922  windows_path="$new_path"
16923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16924    unix_path=`$CYGPATH -u "$windows_path"`
16925    new_path="$unix_path"
16926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16928    new_path="$unix_path"
16929  fi
16930
16931  if test "x$path" != "x$new_path"; then
16932    MSVCR_DLL="$new_path"
16933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16934$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16935  fi
16936
16937  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16938  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16939
16940  else
16941    # We're on a posix platform. Hooray! :)
16942    path="$MSVCR_DLL"
16943
16944    if test ! -f "$path" && test ! -d "$path"; then
16945      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16946    fi
16947
16948    has_space=`$ECHO "$path" | $GREP " "`
16949    if test "x$has_space" != x; then
16950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16951$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16952      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16953    fi
16954  fi
16955
16956
16957fi
16958
16959
16960
16961# If --build AND --host is set, then the configure script will find any
16962# cross compilation tools in the PATH. Cross compilation tools
16963# follows the cross compilation standard where they are prefixed with ${host}.
16964# For example the binary i686-sun-solaris2.10-gcc
16965# will cross compile for i686-sun-solaris2.10
16966# If neither of build and host is not set, then build=host and the
16967# default compiler found in the path will be used.
16968# Setting only --host, does not seem to be really supported.
16969# Please set both --build and --host if you want to cross compile.
16970
16971if test "x$COMPILE_TYPE" = "xcross"; then
16972    # Now we to find a C/C++ compiler that can build executables for the build
16973    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16974    # once. Also, we need to do this before adding a tools dir to the path,
16975    # otherwise we might pick up cross-compilers which don't use standard naming.
16976    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16977    # to wait until they are properly discovered.
16978    for ac_prog in cl cc gcc
16979do
16980  # Extract the first word of "$ac_prog", so it can be a program name with args.
16981set dummy $ac_prog; ac_word=$2
16982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16983$as_echo_n "checking for $ac_word... " >&6; }
16984if ${ac_cv_path_BUILD_CC+:} false; then :
16985  $as_echo_n "(cached) " >&6
16986else
16987  case $BUILD_CC in
16988  [\\/]* | ?:[\\/]*)
16989  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16990  ;;
16991  *)
16992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16993for as_dir in $PATH
16994do
16995  IFS=$as_save_IFS
16996  test -z "$as_dir" && as_dir=.
16997    for ac_exec_ext in '' $ac_executable_extensions; do
16998  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16999    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17001    break 2
17002  fi
17003done
17004  done
17005IFS=$as_save_IFS
17006
17007  ;;
17008esac
17009fi
17010BUILD_CC=$ac_cv_path_BUILD_CC
17011if test -n "$BUILD_CC"; then
17012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17013$as_echo "$BUILD_CC" >&6; }
17014else
17015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17016$as_echo "no" >&6; }
17017fi
17018
17019
17020  test -n "$BUILD_CC" && break
17021done
17022
17023
17024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17025
17026  # First separate the path from the arguments. This will split at the first
17027  # space.
17028  complete="$BUILD_CC"
17029  path="${complete%% *}"
17030  tmp="$complete EOL"
17031  arguments="${tmp#* }"
17032
17033  # Input might be given as Windows format, start by converting to
17034  # unix format.
17035  new_path=`$CYGPATH -u "$path"`
17036
17037  # Now try to locate executable using which
17038  new_path=`$WHICH "$new_path" 2> /dev/null`
17039  # bat and cmd files are not always considered executable in cygwin causing which
17040  # to not find them
17041  if test "x$new_path" = x \
17042           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17043           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17044    new_path=`$CYGPATH -u "$path"`
17045  fi
17046  if test "x$new_path" = x; then
17047    # Oops. Which didn't find the executable.
17048    # The splitting of arguments from the executable at a space might have been incorrect,
17049    # since paths with space are more likely in Windows. Give it another try with the whole
17050    # argument.
17051    path="$complete"
17052    arguments="EOL"
17053    new_path=`$CYGPATH -u "$path"`
17054    new_path=`$WHICH "$new_path" 2> /dev/null`
17055    # bat and cmd files are not always considered executable in cygwin causing which
17056    # to not find them
17057    if test "x$new_path" = x \
17058             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17059             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17060      new_path=`$CYGPATH -u "$path"`
17061    fi
17062    if test "x$new_path" = x; then
17063      # It's still not found. Now this is an unrecoverable error.
17064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17065$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17066      has_space=`$ECHO "$complete" | $GREP " "`
17067      if test "x$has_space" != x; then
17068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17070      fi
17071      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17072    fi
17073  fi
17074
17075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17078  # "foo.exe" is OK but "foo" is an error.
17079  #
17080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17081  # It is also a way to make sure we got the proper file name for the real test later on.
17082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17083  if test "x$test_shortpath" = x; then
17084    # Short path failed, file does not exist as specified.
17085    # Try adding .exe or .cmd
17086    if test -f "${new_path}.exe"; then
17087       input_to_shortpath="${new_path}.exe"
17088    elif test -f "${new_path}.cmd"; then
17089       input_to_shortpath="${new_path}.cmd"
17090    else
17091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17092$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17093      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17094$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17095      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17096    fi
17097  else
17098    input_to_shortpath="$new_path"
17099  fi
17100
17101  # Call helper function which possibly converts this using DOS-style short mode.
17102  # If so, the updated path is stored in $new_path.
17103  new_path="$input_to_shortpath"
17104
17105  input_path="$input_to_shortpath"
17106  # Check if we need to convert this using DOS-style short mode. If the path
17107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17108  # take no chances and rewrite it.
17109  # Note: m4 eats our [], so we need to use [ and ] instead.
17110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17111  if test "x$has_forbidden_chars" != x; then
17112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17116      # Going to short mode and back again did indeed matter. Since short mode is
17117      # case insensitive, let's make it lowercase to improve readability.
17118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17119      # Now convert it back to Unix-stile (cygpath)
17120      input_path=`$CYGPATH -u "$shortmode_path"`
17121      new_path="$input_path"
17122    fi
17123  fi
17124
17125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17126  if test "x$test_cygdrive_prefix" = x; then
17127    # As a simple fix, exclude /usr/bin since it's not a real path.
17128    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17130      # a path prefixed by /cygdrive for fixpath to work.
17131      new_path="$CYGWIN_ROOT_PATH$input_path"
17132    fi
17133  fi
17134
17135  # remove trailing .exe if any
17136  new_path="${new_path/%.exe/}"
17137
17138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17139
17140  # First separate the path from the arguments. This will split at the first
17141  # space.
17142  complete="$BUILD_CC"
17143  path="${complete%% *}"
17144  tmp="$complete EOL"
17145  arguments="${tmp#* }"
17146
17147  # Input might be given as Windows format, start by converting to
17148  # unix format.
17149  new_path="$path"
17150
17151  windows_path="$new_path"
17152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17153    unix_path=`$CYGPATH -u "$windows_path"`
17154    new_path="$unix_path"
17155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17157    new_path="$unix_path"
17158  fi
17159
17160
17161  # Now try to locate executable using which
17162  new_path=`$WHICH "$new_path" 2> /dev/null`
17163
17164  if test "x$new_path" = x; then
17165    # Oops. Which didn't find the executable.
17166    # The splitting of arguments from the executable at a space might have been incorrect,
17167    # since paths with space are more likely in Windows. Give it another try with the whole
17168    # argument.
17169    path="$complete"
17170    arguments="EOL"
17171    new_path="$path"
17172
17173  windows_path="$new_path"
17174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17175    unix_path=`$CYGPATH -u "$windows_path"`
17176    new_path="$unix_path"
17177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17179    new_path="$unix_path"
17180  fi
17181
17182
17183    new_path=`$WHICH "$new_path" 2> /dev/null`
17184
17185    if test "x$new_path" = x; then
17186      # It's still not found. Now this is an unrecoverable error.
17187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17188$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17189      has_space=`$ECHO "$complete" | $GREP " "`
17190      if test "x$has_space" != x; then
17191        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17192$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17193      fi
17194      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17195    fi
17196  fi
17197
17198  # Now new_path has a complete unix path to the binary
17199  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17200    # Keep paths in /bin as-is, but remove trailing .exe if any
17201    new_path="${new_path/%.exe/}"
17202    # Do not save /bin paths to all_fixpath_prefixes!
17203  else
17204    # Not in mixed or Windows style, start by that.
17205    new_path=`cmd //c echo $new_path`
17206
17207  input_path="$new_path"
17208  # Check if we need to convert this using DOS-style short mode. If the path
17209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17210  # take no chances and rewrite it.
17211  # Note: m4 eats our [], so we need to use [ and ] instead.
17212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17213  if test "x$has_forbidden_chars" != x; then
17214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17216  fi
17217
17218    # Output is in $new_path
17219
17220  windows_path="$new_path"
17221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17222    unix_path=`$CYGPATH -u "$windows_path"`
17223    new_path="$unix_path"
17224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17226    new_path="$unix_path"
17227  fi
17228
17229    # remove trailing .exe if any
17230    new_path="${new_path/%.exe/}"
17231
17232    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17233    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17234  fi
17235
17236  else
17237    # We're on a posix platform. Hooray! :)
17238    # First separate the path from the arguments. This will split at the first
17239    # space.
17240    complete="$BUILD_CC"
17241    path="${complete%% *}"
17242    tmp="$complete EOL"
17243    arguments="${tmp#* }"
17244
17245    # Cannot rely on the command "which" here since it doesn't always work.
17246    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17247    if test -z "$is_absolute_path"; then
17248      # Path to executable is not absolute. Find it.
17249      IFS_save="$IFS"
17250      IFS=:
17251      for p in $PATH; do
17252        if test -f "$p/$path" && test -x "$p/$path"; then
17253          new_path="$p/$path"
17254          break
17255        fi
17256      done
17257      IFS="$IFS_save"
17258    else
17259      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17260$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17261      new_path="$path"
17262    fi
17263
17264    if test "x$new_path" = x; then
17265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17266$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17267        has_space=`$ECHO "$complete" | $GREP " "`
17268        if test "x$has_space" != x; then
17269          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17270$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17271        fi
17272        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17273      fi
17274  fi
17275
17276      # Now join together the path and the arguments once again
17277      if test "x$arguments" != xEOL; then
17278        new_complete="$new_path ${arguments% *}"
17279      else
17280        new_complete="$new_path"
17281      fi
17282
17283  if test "x$complete" != "x$new_complete"; then
17284      BUILD_CC="$new_complete"
17285      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17286$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17287    fi
17288
17289    for ac_prog in cl CC g++
17290do
17291  # Extract the first word of "$ac_prog", so it can be a program name with args.
17292set dummy $ac_prog; ac_word=$2
17293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17294$as_echo_n "checking for $ac_word... " >&6; }
17295if ${ac_cv_path_BUILD_CXX+:} false; then :
17296  $as_echo_n "(cached) " >&6
17297else
17298  case $BUILD_CXX in
17299  [\\/]* | ?:[\\/]*)
17300  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17301  ;;
17302  *)
17303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17304for as_dir in $PATH
17305do
17306  IFS=$as_save_IFS
17307  test -z "$as_dir" && as_dir=.
17308    for ac_exec_ext in '' $ac_executable_extensions; do
17309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17310    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17312    break 2
17313  fi
17314done
17315  done
17316IFS=$as_save_IFS
17317
17318  ;;
17319esac
17320fi
17321BUILD_CXX=$ac_cv_path_BUILD_CXX
17322if test -n "$BUILD_CXX"; then
17323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17324$as_echo "$BUILD_CXX" >&6; }
17325else
17326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17327$as_echo "no" >&6; }
17328fi
17329
17330
17331  test -n "$BUILD_CXX" && break
17332done
17333
17334
17335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17336
17337  # First separate the path from the arguments. This will split at the first
17338  # space.
17339  complete="$BUILD_CXX"
17340  path="${complete%% *}"
17341  tmp="$complete EOL"
17342  arguments="${tmp#* }"
17343
17344  # Input might be given as Windows format, start by converting to
17345  # unix format.
17346  new_path=`$CYGPATH -u "$path"`
17347
17348  # Now try to locate executable using which
17349  new_path=`$WHICH "$new_path" 2> /dev/null`
17350  # bat and cmd files are not always considered executable in cygwin causing which
17351  # to not find them
17352  if test "x$new_path" = x \
17353           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17354           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17355    new_path=`$CYGPATH -u "$path"`
17356  fi
17357  if test "x$new_path" = x; then
17358    # Oops. Which didn't find the executable.
17359    # The splitting of arguments from the executable at a space might have been incorrect,
17360    # since paths with space are more likely in Windows. Give it another try with the whole
17361    # argument.
17362    path="$complete"
17363    arguments="EOL"
17364    new_path=`$CYGPATH -u "$path"`
17365    new_path=`$WHICH "$new_path" 2> /dev/null`
17366    # bat and cmd files are not always considered executable in cygwin causing which
17367    # to not find them
17368    if test "x$new_path" = x \
17369             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17370             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17371      new_path=`$CYGPATH -u "$path"`
17372    fi
17373    if test "x$new_path" = x; then
17374      # It's still not found. Now this is an unrecoverable error.
17375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17376$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17377      has_space=`$ECHO "$complete" | $GREP " "`
17378      if test "x$has_space" != x; then
17379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17381      fi
17382      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17383    fi
17384  fi
17385
17386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17389  # "foo.exe" is OK but "foo" is an error.
17390  #
17391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17392  # It is also a way to make sure we got the proper file name for the real test later on.
17393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17394  if test "x$test_shortpath" = x; then
17395    # Short path failed, file does not exist as specified.
17396    # Try adding .exe or .cmd
17397    if test -f "${new_path}.exe"; then
17398       input_to_shortpath="${new_path}.exe"
17399    elif test -f "${new_path}.cmd"; then
17400       input_to_shortpath="${new_path}.cmd"
17401    else
17402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17403$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17404      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17405$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17406      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17407    fi
17408  else
17409    input_to_shortpath="$new_path"
17410  fi
17411
17412  # Call helper function which possibly converts this using DOS-style short mode.
17413  # If so, the updated path is stored in $new_path.
17414  new_path="$input_to_shortpath"
17415
17416  input_path="$input_to_shortpath"
17417  # Check if we need to convert this using DOS-style short mode. If the path
17418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17419  # take no chances and rewrite it.
17420  # Note: m4 eats our [], so we need to use [ and ] instead.
17421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17422  if test "x$has_forbidden_chars" != x; then
17423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17427      # Going to short mode and back again did indeed matter. Since short mode is
17428      # case insensitive, let's make it lowercase to improve readability.
17429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17430      # Now convert it back to Unix-stile (cygpath)
17431      input_path=`$CYGPATH -u "$shortmode_path"`
17432      new_path="$input_path"
17433    fi
17434  fi
17435
17436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17437  if test "x$test_cygdrive_prefix" = x; then
17438    # As a simple fix, exclude /usr/bin since it's not a real path.
17439    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17441      # a path prefixed by /cygdrive for fixpath to work.
17442      new_path="$CYGWIN_ROOT_PATH$input_path"
17443    fi
17444  fi
17445
17446  # remove trailing .exe if any
17447  new_path="${new_path/%.exe/}"
17448
17449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17450
17451  # First separate the path from the arguments. This will split at the first
17452  # space.
17453  complete="$BUILD_CXX"
17454  path="${complete%% *}"
17455  tmp="$complete EOL"
17456  arguments="${tmp#* }"
17457
17458  # Input might be given as Windows format, start by converting to
17459  # unix format.
17460  new_path="$path"
17461
17462  windows_path="$new_path"
17463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17464    unix_path=`$CYGPATH -u "$windows_path"`
17465    new_path="$unix_path"
17466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17468    new_path="$unix_path"
17469  fi
17470
17471
17472  # Now try to locate executable using which
17473  new_path=`$WHICH "$new_path" 2> /dev/null`
17474
17475  if test "x$new_path" = x; then
17476    # Oops. Which didn't find the executable.
17477    # The splitting of arguments from the executable at a space might have been incorrect,
17478    # since paths with space are more likely in Windows. Give it another try with the whole
17479    # argument.
17480    path="$complete"
17481    arguments="EOL"
17482    new_path="$path"
17483
17484  windows_path="$new_path"
17485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17486    unix_path=`$CYGPATH -u "$windows_path"`
17487    new_path="$unix_path"
17488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17490    new_path="$unix_path"
17491  fi
17492
17493
17494    new_path=`$WHICH "$new_path" 2> /dev/null`
17495
17496    if test "x$new_path" = x; then
17497      # It's still not found. Now this is an unrecoverable error.
17498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17499$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17500      has_space=`$ECHO "$complete" | $GREP " "`
17501      if test "x$has_space" != x; then
17502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17504      fi
17505      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17506    fi
17507  fi
17508
17509  # Now new_path has a complete unix path to the binary
17510  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17511    # Keep paths in /bin as-is, but remove trailing .exe if any
17512    new_path="${new_path/%.exe/}"
17513    # Do not save /bin paths to all_fixpath_prefixes!
17514  else
17515    # Not in mixed or Windows style, start by that.
17516    new_path=`cmd //c echo $new_path`
17517
17518  input_path="$new_path"
17519  # Check if we need to convert this using DOS-style short mode. If the path
17520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17521  # take no chances and rewrite it.
17522  # Note: m4 eats our [], so we need to use [ and ] instead.
17523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17524  if test "x$has_forbidden_chars" != x; then
17525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17527  fi
17528
17529    # Output is in $new_path
17530
17531  windows_path="$new_path"
17532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17533    unix_path=`$CYGPATH -u "$windows_path"`
17534    new_path="$unix_path"
17535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17537    new_path="$unix_path"
17538  fi
17539
17540    # remove trailing .exe if any
17541    new_path="${new_path/%.exe/}"
17542
17543    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17544    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17545  fi
17546
17547  else
17548    # We're on a posix platform. Hooray! :)
17549    # First separate the path from the arguments. This will split at the first
17550    # space.
17551    complete="$BUILD_CXX"
17552    path="${complete%% *}"
17553    tmp="$complete EOL"
17554    arguments="${tmp#* }"
17555
17556    # Cannot rely on the command "which" here since it doesn't always work.
17557    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17558    if test -z "$is_absolute_path"; then
17559      # Path to executable is not absolute. Find it.
17560      IFS_save="$IFS"
17561      IFS=:
17562      for p in $PATH; do
17563        if test -f "$p/$path" && test -x "$p/$path"; then
17564          new_path="$p/$path"
17565          break
17566        fi
17567      done
17568      IFS="$IFS_save"
17569    else
17570      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17571$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17572      new_path="$path"
17573    fi
17574
17575    if test "x$new_path" = x; then
17576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17577$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17578        has_space=`$ECHO "$complete" | $GREP " "`
17579        if test "x$has_space" != x; then
17580          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17581$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17582        fi
17583        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17584      fi
17585  fi
17586
17587      # Now join together the path and the arguments once again
17588      if test "x$arguments" != xEOL; then
17589        new_complete="$new_path ${arguments% *}"
17590      else
17591        new_complete="$new_path"
17592      fi
17593
17594  if test "x$complete" != "x$new_complete"; then
17595      BUILD_CXX="$new_complete"
17596      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17597$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17598    fi
17599
17600    # Extract the first word of "ld", so it can be a program name with args.
17601set dummy ld; ac_word=$2
17602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17603$as_echo_n "checking for $ac_word... " >&6; }
17604if ${ac_cv_path_BUILD_LD+:} false; then :
17605  $as_echo_n "(cached) " >&6
17606else
17607  case $BUILD_LD in
17608  [\\/]* | ?:[\\/]*)
17609  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17610  ;;
17611  *)
17612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17613for as_dir in $PATH
17614do
17615  IFS=$as_save_IFS
17616  test -z "$as_dir" && as_dir=.
17617    for ac_exec_ext in '' $ac_executable_extensions; do
17618  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17619    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17621    break 2
17622  fi
17623done
17624  done
17625IFS=$as_save_IFS
17626
17627  ;;
17628esac
17629fi
17630BUILD_LD=$ac_cv_path_BUILD_LD
17631if test -n "$BUILD_LD"; then
17632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17633$as_echo "$BUILD_LD" >&6; }
17634else
17635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17636$as_echo "no" >&6; }
17637fi
17638
17639
17640
17641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17642
17643  # First separate the path from the arguments. This will split at the first
17644  # space.
17645  complete="$BUILD_LD"
17646  path="${complete%% *}"
17647  tmp="$complete EOL"
17648  arguments="${tmp#* }"
17649
17650  # Input might be given as Windows format, start by converting to
17651  # unix format.
17652  new_path=`$CYGPATH -u "$path"`
17653
17654  # Now try to locate executable using which
17655  new_path=`$WHICH "$new_path" 2> /dev/null`
17656  # bat and cmd files are not always considered executable in cygwin causing which
17657  # to not find them
17658  if test "x$new_path" = x \
17659           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17660           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17661    new_path=`$CYGPATH -u "$path"`
17662  fi
17663  if test "x$new_path" = x; then
17664    # Oops. Which didn't find the executable.
17665    # The splitting of arguments from the executable at a space might have been incorrect,
17666    # since paths with space are more likely in Windows. Give it another try with the whole
17667    # argument.
17668    path="$complete"
17669    arguments="EOL"
17670    new_path=`$CYGPATH -u "$path"`
17671    new_path=`$WHICH "$new_path" 2> /dev/null`
17672    # bat and cmd files are not always considered executable in cygwin causing which
17673    # to not find them
17674    if test "x$new_path" = x \
17675             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17676             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17677      new_path=`$CYGPATH -u "$path"`
17678    fi
17679    if test "x$new_path" = x; then
17680      # It's still not found. Now this is an unrecoverable error.
17681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17682$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17683      has_space=`$ECHO "$complete" | $GREP " "`
17684      if test "x$has_space" != x; then
17685        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17686$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17687      fi
17688      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17689    fi
17690  fi
17691
17692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17695  # "foo.exe" is OK but "foo" is an error.
17696  #
17697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17698  # It is also a way to make sure we got the proper file name for the real test later on.
17699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17700  if test "x$test_shortpath" = x; then
17701    # Short path failed, file does not exist as specified.
17702    # Try adding .exe or .cmd
17703    if test -f "${new_path}.exe"; then
17704       input_to_shortpath="${new_path}.exe"
17705    elif test -f "${new_path}.cmd"; then
17706       input_to_shortpath="${new_path}.cmd"
17707    else
17708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17709$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17710      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17711$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17712      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17713    fi
17714  else
17715    input_to_shortpath="$new_path"
17716  fi
17717
17718  # Call helper function which possibly converts this using DOS-style short mode.
17719  # If so, the updated path is stored in $new_path.
17720  new_path="$input_to_shortpath"
17721
17722  input_path="$input_to_shortpath"
17723  # Check if we need to convert this using DOS-style short mode. If the path
17724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17725  # take no chances and rewrite it.
17726  # Note: m4 eats our [], so we need to use [ and ] instead.
17727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17728  if test "x$has_forbidden_chars" != x; then
17729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17730    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17731    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17732    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17733      # Going to short mode and back again did indeed matter. Since short mode is
17734      # case insensitive, let's make it lowercase to improve readability.
17735      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17736      # Now convert it back to Unix-stile (cygpath)
17737      input_path=`$CYGPATH -u "$shortmode_path"`
17738      new_path="$input_path"
17739    fi
17740  fi
17741
17742  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17743  if test "x$test_cygdrive_prefix" = x; then
17744    # As a simple fix, exclude /usr/bin since it's not a real path.
17745    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17746      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17747      # a path prefixed by /cygdrive for fixpath to work.
17748      new_path="$CYGWIN_ROOT_PATH$input_path"
17749    fi
17750  fi
17751
17752  # remove trailing .exe if any
17753  new_path="${new_path/%.exe/}"
17754
17755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17756
17757  # First separate the path from the arguments. This will split at the first
17758  # space.
17759  complete="$BUILD_LD"
17760  path="${complete%% *}"
17761  tmp="$complete EOL"
17762  arguments="${tmp#* }"
17763
17764  # Input might be given as Windows format, start by converting to
17765  # unix format.
17766  new_path="$path"
17767
17768  windows_path="$new_path"
17769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17770    unix_path=`$CYGPATH -u "$windows_path"`
17771    new_path="$unix_path"
17772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17774    new_path="$unix_path"
17775  fi
17776
17777
17778  # Now try to locate executable using which
17779  new_path=`$WHICH "$new_path" 2> /dev/null`
17780
17781  if test "x$new_path" = x; then
17782    # Oops. Which didn't find the executable.
17783    # The splitting of arguments from the executable at a space might have been incorrect,
17784    # since paths with space are more likely in Windows. Give it another try with the whole
17785    # argument.
17786    path="$complete"
17787    arguments="EOL"
17788    new_path="$path"
17789
17790  windows_path="$new_path"
17791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17792    unix_path=`$CYGPATH -u "$windows_path"`
17793    new_path="$unix_path"
17794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17796    new_path="$unix_path"
17797  fi
17798
17799
17800    new_path=`$WHICH "$new_path" 2> /dev/null`
17801
17802    if test "x$new_path" = x; then
17803      # It's still not found. Now this is an unrecoverable error.
17804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17805$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17806      has_space=`$ECHO "$complete" | $GREP " "`
17807      if test "x$has_space" != x; then
17808        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17809$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17810      fi
17811      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17812    fi
17813  fi
17814
17815  # Now new_path has a complete unix path to the binary
17816  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17817    # Keep paths in /bin as-is, but remove trailing .exe if any
17818    new_path="${new_path/%.exe/}"
17819    # Do not save /bin paths to all_fixpath_prefixes!
17820  else
17821    # Not in mixed or Windows style, start by that.
17822    new_path=`cmd //c echo $new_path`
17823
17824  input_path="$new_path"
17825  # Check if we need to convert this using DOS-style short mode. If the path
17826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17827  # take no chances and rewrite it.
17828  # Note: m4 eats our [], so we need to use [ and ] instead.
17829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17830  if test "x$has_forbidden_chars" != x; then
17831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17833  fi
17834
17835    # Output is in $new_path
17836
17837  windows_path="$new_path"
17838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17839    unix_path=`$CYGPATH -u "$windows_path"`
17840    new_path="$unix_path"
17841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17843    new_path="$unix_path"
17844  fi
17845
17846    # remove trailing .exe if any
17847    new_path="${new_path/%.exe/}"
17848
17849    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17850    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17851  fi
17852
17853  else
17854    # We're on a posix platform. Hooray! :)
17855    # First separate the path from the arguments. This will split at the first
17856    # space.
17857    complete="$BUILD_LD"
17858    path="${complete%% *}"
17859    tmp="$complete EOL"
17860    arguments="${tmp#* }"
17861
17862    # Cannot rely on the command "which" here since it doesn't always work.
17863    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17864    if test -z "$is_absolute_path"; then
17865      # Path to executable is not absolute. Find it.
17866      IFS_save="$IFS"
17867      IFS=:
17868      for p in $PATH; do
17869        if test -f "$p/$path" && test -x "$p/$path"; then
17870          new_path="$p/$path"
17871          break
17872        fi
17873      done
17874      IFS="$IFS_save"
17875    else
17876      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17877$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17878      new_path="$path"
17879    fi
17880
17881    if test "x$new_path" = x; then
17882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17883$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17884        has_space=`$ECHO "$complete" | $GREP " "`
17885        if test "x$has_space" != x; then
17886          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17887$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17888        fi
17889        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17890      fi
17891  fi
17892
17893      # Now join together the path and the arguments once again
17894      if test "x$arguments" != xEOL; then
17895        new_complete="$new_path ${arguments% *}"
17896      else
17897        new_complete="$new_path"
17898      fi
17899
17900  if test "x$complete" != "x$new_complete"; then
17901      BUILD_LD="$new_complete"
17902      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17903$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17904    fi
17905
17906fi
17907
17908
17909
17910
17911# If a devkit is found on the builddeps server, then prepend its path to the
17912# PATH variable. If there are cross compilers available in the devkit, these
17913# will be found by AC_PROG_CC et al.
17914DEVKIT=
17915
17916
17917    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17918        # Source the builddeps file again, to make sure it uses the latest variables!
17919        . $builddepsfile
17920        # Look for a target and build machine specific resource!
17921        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17922        if test "x$resource" = x; then
17923            # Ok, lets instead look for a target specific resource
17924            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17925        fi
17926        if test "x$resource" = x; then
17927            # Ok, lets instead look for a build specific resource
17928            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17929        fi
17930        if test "x$resource" = x; then
17931            # Ok, lets instead look for a generic resource
17932            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17933            resource=${builddep_devkit}
17934        fi
17935        if test "x$resource" != x; then
17936            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17937$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17938	    # If the resource in the builddeps.conf file is an existing directory,
17939	    # for example /java/linux/cups
17940	    if test -d ${resource}; then
17941	       depdir=${resource}
17942	    else
17943
17944# devkit is for example mymodule
17945# $resource is for example libs/general/libmymod_1_2_3.zip
17946# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17947# $with_builddeps_dir is for example /localhome/builddeps
17948# depdir is the name of the variable into which we store the depdir, eg MYMOD
17949# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17950# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17951    filename=`basename $resource`
17952    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17953    filebase=${filename%%.*}
17954    extension=${filename#*.}
17955    installdir=$with_builddeps_dir/$filebase
17956    if test ! -f $installdir/$filename.unpacked; then
17957        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17958$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17959        if test ! -d $installdir; then
17960            mkdir -p $installdir
17961        fi
17962        if test ! -d $installdir; then
17963            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17964        fi
17965        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17966        touch $tmpfile
17967        if test ! -f $tmpfile; then
17968            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17969        fi
17970
17971    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17972    # $tmpfile is the local file name for the downloaded file.
17973    VALID_TOOL=no
17974    if test "x$BDEPS_FTP" = xwget; then
17975       VALID_TOOL=yes
17976       wget -O $tmpfile $with_builddeps_server/$resource
17977    fi
17978    if test "x$BDEPS_FTP" = xlftp; then
17979       VALID_TOOL=yes
17980       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17981    fi
17982    if test "x$BDEPS_FTP" = xftp; then
17983        VALID_TOOL=yes
17984        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17985        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17986        FTPUSERPWD=${FTPSERVER%%@*}
17987        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17988            FTPUSER=${userpwd%%:*}
17989            FTPPWD=${userpwd#*@}
17990            FTPSERVER=${FTPSERVER#*@}
17991        else
17992            FTPUSER=ftp
17993            FTPPWD=ftp
17994        fi
17995        # the "pass" command does not work on some
17996        # ftp clients (read ftp.exe) but if it works,
17997        # passive mode is better!
17998        (\
17999            echo "user $FTPUSER $FTPPWD"        ;\
18000            echo "pass"                         ;\
18001            echo "bin"                          ;\
18002            echo "get $FTPPATH $tmpfile"              ;\
18003        ) | ftp -in $FTPSERVER
18004    fi
18005    if test "x$VALID_TOOL" != xyes; then
18006       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18007    fi
18008
18009        mv $tmpfile $installdir/$filename
18010        if test ! -s $installdir/$filename; then
18011            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18012        fi
18013        case "$extension" in
18014            zip)  echo "Unzipping $installdir/$filename..."
18015               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18016            ;;
18017            tar.gz) echo "Untaring $installdir/$filename..."
18018               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18019            ;;
18020            tgz) echo "Untaring $installdir/$filename..."
18021               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18022            ;;
18023            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18024            ;;
18025        esac
18026    fi
18027    if test -f $installdir/$filename.unpacked; then
18028        depdir=$installdir
18029    fi
18030
18031	    fi
18032            # Source the builddeps file again, because in the previous command, the depdir
18033            # was updated to point at the current build dependency install directory.
18034            . $builddepsfile
18035            # Now extract variables from the builddeps.conf files.
18036            theroot=${builddep_devkit_ROOT}
18037            thecflags=${builddep_devkit_CFLAGS}
18038            thelibs=${builddep_devkit_LIBS}
18039            if test "x$depdir" = x; then
18040                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18041            fi
18042            DEVKIT=$depdir
18043            if test "x$theroot" != x; then
18044               DEVKIT="$theroot"
18045            fi
18046            if test "x$thecflags" != x; then
18047               DEVKIT_CFLAGS="$thecflags"
18048            fi
18049            if test "x$thelibs" != x; then
18050               DEVKIT_LIBS="$thelibs"
18051            fi
18052            # Found devkit
18053                     PATH="$DEVKIT/bin:$PATH"
18054                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18055                     if test "x$x_includes" = "xNONE"; then
18056                         x_includes="$SYS_ROOT/usr/include/X11"
18057                     fi
18058                     if test "x$x_libraries" = "xNONE"; then
18059                         x_libraries="$SYS_ROOT/usr/lib"
18060                     fi
18061
18062
18063        fi
18064
18065    fi
18066
18067
18068if test "x$SYS_ROOT" != "x/" ; then
18069    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18070    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18071    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18072    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18073    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18074    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18075fi
18076
18077# Store the CFLAGS etal passed to the configure script.
18078ORG_CFLAGS="$CFLAGS"
18079ORG_CXXFLAGS="$CXXFLAGS"
18080ORG_OBJCFLAGS="$OBJCFLAGS"
18081
18082# autoconf magic only relies on PATH, so update it if tools dir is specified
18083OLD_PATH="$PATH"
18084if test "x$TOOLS_DIR" != x; then
18085  PATH=$TOOLS_DIR:$PATH
18086fi
18087
18088
18089### Locate C compiler (CC)
18090
18091# gcc is almost always present, but on Windows we
18092# prefer cl.exe and on Solaris we prefer CC.
18093# Thus test for them in this order.
18094if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18095  # Do not probe for cc on MacOSX.
18096  COMPILER_CHECK_LIST="cl gcc"
18097else
18098  COMPILER_CHECK_LIST="cl cc gcc"
18099fi
18100
18101
18102  COMPILER_NAME=C
18103
18104  CC=
18105  # If TOOLS_DIR is set, check for all compiler names in there first
18106  # before checking the rest of the PATH.
18107  if test -n "$TOOLS_DIR"; then
18108    PATH_save="$PATH"
18109    PATH="$TOOLS_DIR"
18110    for ac_prog in $COMPILER_CHECK_LIST
18111do
18112  # Extract the first word of "$ac_prog", so it can be a program name with args.
18113set dummy $ac_prog; ac_word=$2
18114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18115$as_echo_n "checking for $ac_word... " >&6; }
18116if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18117  $as_echo_n "(cached) " >&6
18118else
18119  case $TOOLS_DIR_CC in
18120  [\\/]* | ?:[\\/]*)
18121  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18122  ;;
18123  *)
18124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18125for as_dir in $PATH
18126do
18127  IFS=$as_save_IFS
18128  test -z "$as_dir" && as_dir=.
18129    for ac_exec_ext in '' $ac_executable_extensions; do
18130  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18131    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18133    break 2
18134  fi
18135done
18136  done
18137IFS=$as_save_IFS
18138
18139  ;;
18140esac
18141fi
18142TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18143if test -n "$TOOLS_DIR_CC"; then
18144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18145$as_echo "$TOOLS_DIR_CC" >&6; }
18146else
18147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18148$as_echo "no" >&6; }
18149fi
18150
18151
18152  test -n "$TOOLS_DIR_CC" && break
18153done
18154
18155    CC=$TOOLS_DIR_CC
18156    PATH="$PATH_save"
18157  fi
18158
18159  # AC_PATH_PROGS can't be run multiple times with the same variable,
18160  # so create a new name for this run.
18161  if test "x$CC" = x; then
18162    for ac_prog in $COMPILER_CHECK_LIST
18163do
18164  # Extract the first word of "$ac_prog", so it can be a program name with args.
18165set dummy $ac_prog; ac_word=$2
18166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18167$as_echo_n "checking for $ac_word... " >&6; }
18168if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18169  $as_echo_n "(cached) " >&6
18170else
18171  case $POTENTIAL_CC in
18172  [\\/]* | ?:[\\/]*)
18173  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18174  ;;
18175  *)
18176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18177for as_dir in $PATH
18178do
18179  IFS=$as_save_IFS
18180  test -z "$as_dir" && as_dir=.
18181    for ac_exec_ext in '' $ac_executable_extensions; do
18182  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18183    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18185    break 2
18186  fi
18187done
18188  done
18189IFS=$as_save_IFS
18190
18191  ;;
18192esac
18193fi
18194POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18195if test -n "$POTENTIAL_CC"; then
18196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18197$as_echo "$POTENTIAL_CC" >&6; }
18198else
18199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18200$as_echo "no" >&6; }
18201fi
18202
18203
18204  test -n "$POTENTIAL_CC" && break
18205done
18206
18207    CC=$POTENTIAL_CC
18208  fi
18209
18210  if test "x$CC" = x; then
18211
18212    # Print a helpful message on how to acquire the necessary build dependency.
18213    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18214    MISSING_DEPENDENCY=devkit
18215    PKGHANDLER_COMMAND=
18216
18217    case $PKGHANDLER in
18218	apt-get)
18219                apt_help     $MISSING_DEPENDENCY ;;
18220    yum)
18221                yum_help     $MISSING_DEPENDENCY ;;
18222	port)
18223                port_help    $MISSING_DEPENDENCY ;;
18224	pkgutil)
18225                pkgutil_help $MISSING_DEPENDENCY ;;
18226	pkgadd)
18227                pkgadd_help  $MISSING_DEPENDENCY ;;
18228    * )
18229      break ;;
18230    esac
18231
18232    if test "x$PKGHANDLER_COMMAND" != x; then
18233        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18234    fi
18235
18236      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18237  fi
18238
18239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18240
18241  # First separate the path from the arguments. This will split at the first
18242  # space.
18243  complete="$CC"
18244  path="${complete%% *}"
18245  tmp="$complete EOL"
18246  arguments="${tmp#* }"
18247
18248  # Input might be given as Windows format, start by converting to
18249  # unix format.
18250  new_path=`$CYGPATH -u "$path"`
18251
18252  # Now try to locate executable using which
18253  new_path=`$WHICH "$new_path" 2> /dev/null`
18254  # bat and cmd files are not always considered executable in cygwin causing which
18255  # to not find them
18256  if test "x$new_path" = x \
18257           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18258           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18259    new_path=`$CYGPATH -u "$path"`
18260  fi
18261  if test "x$new_path" = x; then
18262    # Oops. Which didn't find the executable.
18263    # The splitting of arguments from the executable at a space might have been incorrect,
18264    # since paths with space are more likely in Windows. Give it another try with the whole
18265    # argument.
18266    path="$complete"
18267    arguments="EOL"
18268    new_path=`$CYGPATH -u "$path"`
18269    new_path=`$WHICH "$new_path" 2> /dev/null`
18270    # bat and cmd files are not always considered executable in cygwin causing which
18271    # to not find them
18272    if test "x$new_path" = x \
18273             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18274             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18275      new_path=`$CYGPATH -u "$path"`
18276    fi
18277    if test "x$new_path" = x; then
18278      # It's still not found. Now this is an unrecoverable error.
18279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18280$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18281      has_space=`$ECHO "$complete" | $GREP " "`
18282      if test "x$has_space" != x; then
18283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18285      fi
18286      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18287    fi
18288  fi
18289
18290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18293  # "foo.exe" is OK but "foo" is an error.
18294  #
18295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18296  # It is also a way to make sure we got the proper file name for the real test later on.
18297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18298  if test "x$test_shortpath" = x; then
18299    # Short path failed, file does not exist as specified.
18300    # Try adding .exe or .cmd
18301    if test -f "${new_path}.exe"; then
18302       input_to_shortpath="${new_path}.exe"
18303    elif test -f "${new_path}.cmd"; then
18304       input_to_shortpath="${new_path}.cmd"
18305    else
18306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18307$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18310      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18311    fi
18312  else
18313    input_to_shortpath="$new_path"
18314  fi
18315
18316  # Call helper function which possibly converts this using DOS-style short mode.
18317  # If so, the updated path is stored in $new_path.
18318  new_path="$input_to_shortpath"
18319
18320  input_path="$input_to_shortpath"
18321  # Check if we need to convert this using DOS-style short mode. If the path
18322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18323  # take no chances and rewrite it.
18324  # Note: m4 eats our [], so we need to use [ and ] instead.
18325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18326  if test "x$has_forbidden_chars" != x; then
18327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18331      # Going to short mode and back again did indeed matter. Since short mode is
18332      # case insensitive, let's make it lowercase to improve readability.
18333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18334      # Now convert it back to Unix-stile (cygpath)
18335      input_path=`$CYGPATH -u "$shortmode_path"`
18336      new_path="$input_path"
18337    fi
18338  fi
18339
18340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18341  if test "x$test_cygdrive_prefix" = x; then
18342    # As a simple fix, exclude /usr/bin since it's not a real path.
18343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18345      # a path prefixed by /cygdrive for fixpath to work.
18346      new_path="$CYGWIN_ROOT_PATH$input_path"
18347    fi
18348  fi
18349
18350  # remove trailing .exe if any
18351  new_path="${new_path/%.exe/}"
18352
18353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18354
18355  # First separate the path from the arguments. This will split at the first
18356  # space.
18357  complete="$CC"
18358  path="${complete%% *}"
18359  tmp="$complete EOL"
18360  arguments="${tmp#* }"
18361
18362  # Input might be given as Windows format, start by converting to
18363  # unix format.
18364  new_path="$path"
18365
18366  windows_path="$new_path"
18367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18368    unix_path=`$CYGPATH -u "$windows_path"`
18369    new_path="$unix_path"
18370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18372    new_path="$unix_path"
18373  fi
18374
18375
18376  # Now try to locate executable using which
18377  new_path=`$WHICH "$new_path" 2> /dev/null`
18378
18379  if test "x$new_path" = x; then
18380    # Oops. Which didn't find the executable.
18381    # The splitting of arguments from the executable at a space might have been incorrect,
18382    # since paths with space are more likely in Windows. Give it another try with the whole
18383    # argument.
18384    path="$complete"
18385    arguments="EOL"
18386    new_path="$path"
18387
18388  windows_path="$new_path"
18389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18390    unix_path=`$CYGPATH -u "$windows_path"`
18391    new_path="$unix_path"
18392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18394    new_path="$unix_path"
18395  fi
18396
18397
18398    new_path=`$WHICH "$new_path" 2> /dev/null`
18399
18400    if test "x$new_path" = x; then
18401      # It's still not found. Now this is an unrecoverable error.
18402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18403$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18404      has_space=`$ECHO "$complete" | $GREP " "`
18405      if test "x$has_space" != x; then
18406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18408      fi
18409      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18410    fi
18411  fi
18412
18413  # Now new_path has a complete unix path to the binary
18414  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18415    # Keep paths in /bin as-is, but remove trailing .exe if any
18416    new_path="${new_path/%.exe/}"
18417    # Do not save /bin paths to all_fixpath_prefixes!
18418  else
18419    # Not in mixed or Windows style, start by that.
18420    new_path=`cmd //c echo $new_path`
18421
18422  input_path="$new_path"
18423  # Check if we need to convert this using DOS-style short mode. If the path
18424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18425  # take no chances and rewrite it.
18426  # Note: m4 eats our [], so we need to use [ and ] instead.
18427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18428  if test "x$has_forbidden_chars" != x; then
18429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18431  fi
18432
18433    # Output is in $new_path
18434
18435  windows_path="$new_path"
18436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18437    unix_path=`$CYGPATH -u "$windows_path"`
18438    new_path="$unix_path"
18439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18441    new_path="$unix_path"
18442  fi
18443
18444    # remove trailing .exe if any
18445    new_path="${new_path/%.exe/}"
18446
18447    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18448    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18449  fi
18450
18451  else
18452    # We're on a posix platform. Hooray! :)
18453    # First separate the path from the arguments. This will split at the first
18454    # space.
18455    complete="$CC"
18456    path="${complete%% *}"
18457    tmp="$complete EOL"
18458    arguments="${tmp#* }"
18459
18460    # Cannot rely on the command "which" here since it doesn't always work.
18461    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18462    if test -z "$is_absolute_path"; then
18463      # Path to executable is not absolute. Find it.
18464      IFS_save="$IFS"
18465      IFS=:
18466      for p in $PATH; do
18467        if test -f "$p/$path" && test -x "$p/$path"; then
18468          new_path="$p/$path"
18469          break
18470        fi
18471      done
18472      IFS="$IFS_save"
18473    else
18474      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18475$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18476      new_path="$path"
18477    fi
18478
18479    if test "x$new_path" = x; then
18480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18481$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18482        has_space=`$ECHO "$complete" | $GREP " "`
18483        if test "x$has_space" != x; then
18484          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18485$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18486        fi
18487        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18488      fi
18489  fi
18490
18491      # Now join together the path and the arguments once again
18492      if test "x$arguments" != xEOL; then
18493        new_complete="$new_path ${arguments% *}"
18494      else
18495        new_complete="$new_path"
18496      fi
18497
18498  if test "x$complete" != "x$new_complete"; then
18499      CC="$new_complete"
18500      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18501$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18502    fi
18503
18504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18505$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18506  TEST_COMPILER="$CC"
18507
18508    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18509        # Follow a chain of symbolic links. Use readlink
18510        # where it exists, else fall back to horribly
18511        # complicated shell code.
18512        if test "x$READLINK_TESTED" != yes; then
18513            # On MacOSX there is a readlink tool with a different
18514            # purpose than the GNU readlink tool. Check the found readlink.
18515            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18516            if test "x$ISGNU" = x; then
18517                 # A readlink that we do not know how to use.
18518                 # Are there other non-GNU readlinks out there?
18519                 READLINK_TESTED=yes
18520                 READLINK=
18521            fi
18522        fi
18523
18524        if test "x$READLINK" != x; then
18525            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18526        else
18527            # Save the current directory for restoring afterwards
18528            STARTDIR=$PWD
18529            COUNTER=0
18530            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18531            sym_link_file=`$BASENAME $TEST_COMPILER`
18532            # Use the system pwd and not the shell builtin to resolve directory symlinks
18533            cd $sym_link_dir
18534            cd `$THEPWDCMD`
18535            sym_link_dir=`$THEPWDCMD`
18536            # Resolve file symlinks
18537            while test $COUNTER -lt 20; do
18538                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18539                if test "x$ISLINK" == x; then
18540                    # This is not a symbolic link! We are done!
18541                    break
18542                fi
18543                # Again resolve directory symlinks since the target of the just found
18544                # link could be in a different directory
18545                cd `$DIRNAME $ISLINK`
18546                sym_link_dir=`$THEPWDCMD`
18547                sym_link_file=`$BASENAME $ISLINK`
18548                let COUNTER=COUNTER+1
18549            done
18550            cd $STARTDIR
18551            TEST_COMPILER=$sym_link_dir/$sym_link_file
18552        fi
18553    fi
18554
18555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18556$as_echo "$TEST_COMPILER" >&6; }
18557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18558$as_echo_n "checking if CC is disguised ccache... " >&6; }
18559
18560  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18561  if test "x$COMPILER_BASENAME" = "xccache"; then
18562    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18563$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18564    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18565    # We want to control ccache invocation ourselves, so ignore this cc and try
18566    # searching again.
18567
18568    # Remove the path to the fake ccache cc from the PATH
18569    RETRY_COMPILER_SAVED_PATH="$PATH"
18570    COMPILER_DIRNAME=`$DIRNAME $CC`
18571    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18572
18573    # Try again looking for our compiler
18574    if test -n "$ac_tool_prefix"; then
18575  for ac_prog in $COMPILER_CHECK_LIST
18576  do
18577    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18578set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18580$as_echo_n "checking for $ac_word... " >&6; }
18581if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
18582  $as_echo_n "(cached) " >&6
18583else
18584  if test -n "$PROPER_COMPILER_CC"; then
18585  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18586else
18587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18588for as_dir in $PATH
18589do
18590  IFS=$as_save_IFS
18591  test -z "$as_dir" && as_dir=.
18592    for ac_exec_ext in '' $ac_executable_extensions; do
18593  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18594    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18596    break 2
18597  fi
18598done
18599  done
18600IFS=$as_save_IFS
18601
18602fi
18603fi
18604PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18605if test -n "$PROPER_COMPILER_CC"; then
18606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18607$as_echo "$PROPER_COMPILER_CC" >&6; }
18608else
18609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18610$as_echo "no" >&6; }
18611fi
18612
18613
18614    test -n "$PROPER_COMPILER_CC" && break
18615  done
18616fi
18617if test -z "$PROPER_COMPILER_CC"; then
18618  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18619  for ac_prog in $COMPILER_CHECK_LIST
18620do
18621  # Extract the first word of "$ac_prog", so it can be a program name with args.
18622set dummy $ac_prog; ac_word=$2
18623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18624$as_echo_n "checking for $ac_word... " >&6; }
18625if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
18626  $as_echo_n "(cached) " >&6
18627else
18628  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18629  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18630else
18631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18632for as_dir in $PATH
18633do
18634  IFS=$as_save_IFS
18635  test -z "$as_dir" && as_dir=.
18636    for ac_exec_ext in '' $ac_executable_extensions; do
18637  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18638    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18640    break 2
18641  fi
18642done
18643  done
18644IFS=$as_save_IFS
18645
18646fi
18647fi
18648ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18649if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18651$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18652else
18653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18654$as_echo "no" >&6; }
18655fi
18656
18657
18658  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18659done
18660
18661  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18662    PROPER_COMPILER_CC=""
18663  else
18664    case $cross_compiling:$ac_tool_warned in
18665yes:)
18666{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18667$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18668ac_tool_warned=yes ;;
18669esac
18670    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18671  fi
18672fi
18673
18674
18675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18676
18677  # First separate the path from the arguments. This will split at the first
18678  # space.
18679  complete="$PROPER_COMPILER_CC"
18680  path="${complete%% *}"
18681  tmp="$complete EOL"
18682  arguments="${tmp#* }"
18683
18684  # Input might be given as Windows format, start by converting to
18685  # unix format.
18686  new_path=`$CYGPATH -u "$path"`
18687
18688  # Now try to locate executable using which
18689  new_path=`$WHICH "$new_path" 2> /dev/null`
18690  # bat and cmd files are not always considered executable in cygwin causing which
18691  # to not find them
18692  if test "x$new_path" = x \
18693           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18694           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18695    new_path=`$CYGPATH -u "$path"`
18696  fi
18697  if test "x$new_path" = x; then
18698    # Oops. Which didn't find the executable.
18699    # The splitting of arguments from the executable at a space might have been incorrect,
18700    # since paths with space are more likely in Windows. Give it another try with the whole
18701    # argument.
18702    path="$complete"
18703    arguments="EOL"
18704    new_path=`$CYGPATH -u "$path"`
18705    new_path=`$WHICH "$new_path" 2> /dev/null`
18706    # bat and cmd files are not always considered executable in cygwin causing which
18707    # to not find them
18708    if test "x$new_path" = x \
18709             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18710             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18711      new_path=`$CYGPATH -u "$path"`
18712    fi
18713    if test "x$new_path" = x; then
18714      # It's still not found. Now this is an unrecoverable error.
18715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18716$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18717      has_space=`$ECHO "$complete" | $GREP " "`
18718      if test "x$has_space" != x; then
18719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18721      fi
18722      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18723    fi
18724  fi
18725
18726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18729  # "foo.exe" is OK but "foo" is an error.
18730  #
18731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18732  # It is also a way to make sure we got the proper file name for the real test later on.
18733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18734  if test "x$test_shortpath" = x; then
18735    # Short path failed, file does not exist as specified.
18736    # Try adding .exe or .cmd
18737    if test -f "${new_path}.exe"; then
18738       input_to_shortpath="${new_path}.exe"
18739    elif test -f "${new_path}.cmd"; then
18740       input_to_shortpath="${new_path}.cmd"
18741    else
18742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18743$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18744      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18745$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18746      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18747    fi
18748  else
18749    input_to_shortpath="$new_path"
18750  fi
18751
18752  # Call helper function which possibly converts this using DOS-style short mode.
18753  # If so, the updated path is stored in $new_path.
18754  new_path="$input_to_shortpath"
18755
18756  input_path="$input_to_shortpath"
18757  # Check if we need to convert this using DOS-style short mode. If the path
18758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18759  # take no chances and rewrite it.
18760  # Note: m4 eats our [], so we need to use [ and ] instead.
18761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18762  if test "x$has_forbidden_chars" != x; then
18763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18767      # Going to short mode and back again did indeed matter. Since short mode is
18768      # case insensitive, let's make it lowercase to improve readability.
18769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18770      # Now convert it back to Unix-stile (cygpath)
18771      input_path=`$CYGPATH -u "$shortmode_path"`
18772      new_path="$input_path"
18773    fi
18774  fi
18775
18776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18777  if test "x$test_cygdrive_prefix" = x; then
18778    # As a simple fix, exclude /usr/bin since it's not a real path.
18779    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18781      # a path prefixed by /cygdrive for fixpath to work.
18782      new_path="$CYGWIN_ROOT_PATH$input_path"
18783    fi
18784  fi
18785
18786  # remove trailing .exe if any
18787  new_path="${new_path/%.exe/}"
18788
18789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18790
18791  # First separate the path from the arguments. This will split at the first
18792  # space.
18793  complete="$PROPER_COMPILER_CC"
18794  path="${complete%% *}"
18795  tmp="$complete EOL"
18796  arguments="${tmp#* }"
18797
18798  # Input might be given as Windows format, start by converting to
18799  # unix format.
18800  new_path="$path"
18801
18802  windows_path="$new_path"
18803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18804    unix_path=`$CYGPATH -u "$windows_path"`
18805    new_path="$unix_path"
18806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18808    new_path="$unix_path"
18809  fi
18810
18811
18812  # Now try to locate executable using which
18813  new_path=`$WHICH "$new_path" 2> /dev/null`
18814
18815  if test "x$new_path" = x; then
18816    # Oops. Which didn't find the executable.
18817    # The splitting of arguments from the executable at a space might have been incorrect,
18818    # since paths with space are more likely in Windows. Give it another try with the whole
18819    # argument.
18820    path="$complete"
18821    arguments="EOL"
18822    new_path="$path"
18823
18824  windows_path="$new_path"
18825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18826    unix_path=`$CYGPATH -u "$windows_path"`
18827    new_path="$unix_path"
18828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18830    new_path="$unix_path"
18831  fi
18832
18833
18834    new_path=`$WHICH "$new_path" 2> /dev/null`
18835
18836    if test "x$new_path" = x; then
18837      # It's still not found. Now this is an unrecoverable error.
18838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18839$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18840      has_space=`$ECHO "$complete" | $GREP " "`
18841      if test "x$has_space" != x; then
18842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18844      fi
18845      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18846    fi
18847  fi
18848
18849  # Now new_path has a complete unix path to the binary
18850  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18851    # Keep paths in /bin as-is, but remove trailing .exe if any
18852    new_path="${new_path/%.exe/}"
18853    # Do not save /bin paths to all_fixpath_prefixes!
18854  else
18855    # Not in mixed or Windows style, start by that.
18856    new_path=`cmd //c echo $new_path`
18857
18858  input_path="$new_path"
18859  # Check if we need to convert this using DOS-style short mode. If the path
18860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18861  # take no chances and rewrite it.
18862  # Note: m4 eats our [], so we need to use [ and ] instead.
18863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18864  if test "x$has_forbidden_chars" != x; then
18865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18867  fi
18868
18869    # Output is in $new_path
18870
18871  windows_path="$new_path"
18872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18873    unix_path=`$CYGPATH -u "$windows_path"`
18874    new_path="$unix_path"
18875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18877    new_path="$unix_path"
18878  fi
18879
18880    # remove trailing .exe if any
18881    new_path="${new_path/%.exe/}"
18882
18883    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18884    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18885  fi
18886
18887  else
18888    # We're on a posix platform. Hooray! :)
18889    # First separate the path from the arguments. This will split at the first
18890    # space.
18891    complete="$PROPER_COMPILER_CC"
18892    path="${complete%% *}"
18893    tmp="$complete EOL"
18894    arguments="${tmp#* }"
18895
18896    # Cannot rely on the command "which" here since it doesn't always work.
18897    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18898    if test -z "$is_absolute_path"; then
18899      # Path to executable is not absolute. Find it.
18900      IFS_save="$IFS"
18901      IFS=:
18902      for p in $PATH; do
18903        if test -f "$p/$path" && test -x "$p/$path"; then
18904          new_path="$p/$path"
18905          break
18906        fi
18907      done
18908      IFS="$IFS_save"
18909    else
18910      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18911$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18912      new_path="$path"
18913    fi
18914
18915    if test "x$new_path" = x; then
18916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18917$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18918        has_space=`$ECHO "$complete" | $GREP " "`
18919        if test "x$has_space" != x; then
18920          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18921$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18922        fi
18923        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18924      fi
18925  fi
18926
18927      # Now join together the path and the arguments once again
18928      if test "x$arguments" != xEOL; then
18929        new_complete="$new_path ${arguments% *}"
18930      else
18931        new_complete="$new_path"
18932      fi
18933
18934  if test "x$complete" != "x$new_complete"; then
18935      PROPER_COMPILER_CC="$new_complete"
18936      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18937$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18938    fi
18939
18940    PATH="$RETRY_COMPILER_SAVED_PATH"
18941
18942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18943$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18944
18945    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18946        # Follow a chain of symbolic links. Use readlink
18947        # where it exists, else fall back to horribly
18948        # complicated shell code.
18949        if test "x$READLINK_TESTED" != yes; then
18950            # On MacOSX there is a readlink tool with a different
18951            # purpose than the GNU readlink tool. Check the found readlink.
18952            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18953            if test "x$ISGNU" = x; then
18954                 # A readlink that we do not know how to use.
18955                 # Are there other non-GNU readlinks out there?
18956                 READLINK_TESTED=yes
18957                 READLINK=
18958            fi
18959        fi
18960
18961        if test "x$READLINK" != x; then
18962            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18963        else
18964            # Save the current directory for restoring afterwards
18965            STARTDIR=$PWD
18966            COUNTER=0
18967            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18968            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18969            # Use the system pwd and not the shell builtin to resolve directory symlinks
18970            cd $sym_link_dir
18971            cd `$THEPWDCMD`
18972            sym_link_dir=`$THEPWDCMD`
18973            # Resolve file symlinks
18974            while test $COUNTER -lt 20; do
18975                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18976                if test "x$ISLINK" == x; then
18977                    # This is not a symbolic link! We are done!
18978                    break
18979                fi
18980                # Again resolve directory symlinks since the target of the just found
18981                # link could be in a different directory
18982                cd `$DIRNAME $ISLINK`
18983                sym_link_dir=`$THEPWDCMD`
18984                sym_link_file=`$BASENAME $ISLINK`
18985                let COUNTER=COUNTER+1
18986            done
18987            cd $STARTDIR
18988            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18989        fi
18990    fi
18991
18992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18993$as_echo "$PROPER_COMPILER_CC" >&6; }
18994    CC="$PROPER_COMPILER_CC"
18995  else
18996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18997$as_echo "no, keeping CC" >&6; }
18998    CC="$TEST_COMPILER"
18999  fi
19000
19001  COMPILER=$CC
19002  COMPILER_NAME=$COMPILER_NAME
19003
19004  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19005    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19006    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19007    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19008    if test $? -ne 0; then
19009      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19010
19011      { $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
19012$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19013      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19014$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19015      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19016    else
19017      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19018      COMPILER_VENDOR="Sun Studio"
19019    fi
19020  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19021    # First line typically looks something like:
19022    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19023    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19024    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19025    COMPILER_VENDOR="Microsoft CL.EXE"
19026    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19027    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19028      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19029        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19030      fi
19031    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19032      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19033        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19034      fi
19035    fi
19036  else
19037    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19038    # Check that this is likely to be GCC.
19039    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19040    if test $? -ne 0; then
19041      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19042$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19043      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19044$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19045      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19046    fi
19047
19048    # First line typically looks something like:
19049    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19050    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19051    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19052  fi
19053  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19054  CC_VERSION="$COMPILER_VERSION"
19055  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19056  CC_VENDOR="$COMPILER_VENDOR"
19057
19058  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19059$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19060
19061
19062# Now that we have resolved CC ourself, let autoconf have it's go at it
19063ac_ext=c
19064ac_cpp='$CPP $CPPFLAGS'
19065ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19066ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19067ac_compiler_gnu=$ac_cv_c_compiler_gnu
19068if test -n "$ac_tool_prefix"; then
19069  for ac_prog in $CC
19070  do
19071    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19074$as_echo_n "checking for $ac_word... " >&6; }
19075if ${ac_cv_prog_CC+:} false; then :
19076  $as_echo_n "(cached) " >&6
19077else
19078  if test -n "$CC"; then
19079  ac_cv_prog_CC="$CC" # Let the user override the test.
19080else
19081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19082for as_dir in $PATH
19083do
19084  IFS=$as_save_IFS
19085  test -z "$as_dir" && as_dir=.
19086    for ac_exec_ext in '' $ac_executable_extensions; do
19087  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19088    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19090    break 2
19091  fi
19092done
19093  done
19094IFS=$as_save_IFS
19095
19096fi
19097fi
19098CC=$ac_cv_prog_CC
19099if test -n "$CC"; then
19100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19101$as_echo "$CC" >&6; }
19102else
19103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19104$as_echo "no" >&6; }
19105fi
19106
19107
19108    test -n "$CC" && break
19109  done
19110fi
19111if test -z "$CC"; then
19112  ac_ct_CC=$CC
19113  for ac_prog in $CC
19114do
19115  # Extract the first word of "$ac_prog", so it can be a program name with args.
19116set dummy $ac_prog; ac_word=$2
19117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19118$as_echo_n "checking for $ac_word... " >&6; }
19119if ${ac_cv_prog_ac_ct_CC+:} false; then :
19120  $as_echo_n "(cached) " >&6
19121else
19122  if test -n "$ac_ct_CC"; then
19123  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19124else
19125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19126for as_dir in $PATH
19127do
19128  IFS=$as_save_IFS
19129  test -z "$as_dir" && as_dir=.
19130    for ac_exec_ext in '' $ac_executable_extensions; do
19131  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19132    ac_cv_prog_ac_ct_CC="$ac_prog"
19133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19134    break 2
19135  fi
19136done
19137  done
19138IFS=$as_save_IFS
19139
19140fi
19141fi
19142ac_ct_CC=$ac_cv_prog_ac_ct_CC
19143if test -n "$ac_ct_CC"; then
19144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19145$as_echo "$ac_ct_CC" >&6; }
19146else
19147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19148$as_echo "no" >&6; }
19149fi
19150
19151
19152  test -n "$ac_ct_CC" && break
19153done
19154
19155  if test "x$ac_ct_CC" = x; then
19156    CC=""
19157  else
19158    case $cross_compiling:$ac_tool_warned in
19159yes:)
19160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19162ac_tool_warned=yes ;;
19163esac
19164    CC=$ac_ct_CC
19165  fi
19166fi
19167
19168
19169test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19171as_fn_error $? "no acceptable C compiler found in \$PATH
19172See \`config.log' for more details" "$LINENO" 5; }
19173
19174# Provide some information about the compiler.
19175$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19176set X $ac_compile
19177ac_compiler=$2
19178for ac_option in --version -v -V -qversion; do
19179  { { ac_try="$ac_compiler $ac_option >&5"
19180case "(($ac_try" in
19181  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19182  *) ac_try_echo=$ac_try;;
19183esac
19184eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19185$as_echo "$ac_try_echo"; } >&5
19186  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19187  ac_status=$?
19188  if test -s conftest.err; then
19189    sed '10a\
19190... rest of stderr output deleted ...
19191         10q' conftest.err >conftest.er1
19192    cat conftest.er1 >&5
19193  fi
19194  rm -f conftest.er1 conftest.err
19195  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19196  test $ac_status = 0; }
19197done
19198
19199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19200/* end confdefs.h.  */
19201
19202int
19203main ()
19204{
19205
19206  ;
19207  return 0;
19208}
19209_ACEOF
19210ac_clean_files_save=$ac_clean_files
19211ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19212# Try to create an executable without -o first, disregard a.out.
19213# It will help us diagnose broken compilers, and finding out an intuition
19214# of exeext.
19215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19216$as_echo_n "checking whether the C compiler works... " >&6; }
19217ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19218
19219# The possible output files:
19220ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19221
19222ac_rmfiles=
19223for ac_file in $ac_files
19224do
19225  case $ac_file in
19226    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19227    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19228  esac
19229done
19230rm -f $ac_rmfiles
19231
19232if { { ac_try="$ac_link_default"
19233case "(($ac_try" in
19234  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19235  *) ac_try_echo=$ac_try;;
19236esac
19237eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19238$as_echo "$ac_try_echo"; } >&5
19239  (eval "$ac_link_default") 2>&5
19240  ac_status=$?
19241  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19242  test $ac_status = 0; }; then :
19243  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19244# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19245# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19246# so that the user can short-circuit this test for compilers unknown to
19247# Autoconf.
19248for ac_file in $ac_files ''
19249do
19250  test -f "$ac_file" || continue
19251  case $ac_file in
19252    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19253	;;
19254    [ab].out )
19255	# We found the default executable, but exeext='' is most
19256	# certainly right.
19257	break;;
19258    *.* )
19259	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19260	then :; else
19261	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19262	fi
19263	# We set ac_cv_exeext here because the later test for it is not
19264	# safe: cross compilers may not add the suffix if given an `-o'
19265	# argument, so we may need to know it at that point already.
19266	# Even if this section looks crufty: it has the advantage of
19267	# actually working.
19268	break;;
19269    * )
19270	break;;
19271  esac
19272done
19273test "$ac_cv_exeext" = no && ac_cv_exeext=
19274
19275else
19276  ac_file=''
19277fi
19278if test -z "$ac_file"; then :
19279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19280$as_echo "no" >&6; }
19281$as_echo "$as_me: failed program was:" >&5
19282sed 's/^/| /' conftest.$ac_ext >&5
19283
19284{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19285$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19286as_fn_error 77 "C compiler cannot create executables
19287See \`config.log' for more details" "$LINENO" 5; }
19288else
19289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19290$as_echo "yes" >&6; }
19291fi
19292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19293$as_echo_n "checking for C compiler default output file name... " >&6; }
19294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19295$as_echo "$ac_file" >&6; }
19296ac_exeext=$ac_cv_exeext
19297
19298rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19299ac_clean_files=$ac_clean_files_save
19300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19301$as_echo_n "checking for suffix of executables... " >&6; }
19302if { { ac_try="$ac_link"
19303case "(($ac_try" in
19304  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19305  *) ac_try_echo=$ac_try;;
19306esac
19307eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19308$as_echo "$ac_try_echo"; } >&5
19309  (eval "$ac_link") 2>&5
19310  ac_status=$?
19311  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19312  test $ac_status = 0; }; then :
19313  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19314# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19315# work properly (i.e., refer to `conftest.exe'), while it won't with
19316# `rm'.
19317for ac_file in conftest.exe conftest conftest.*; do
19318  test -f "$ac_file" || continue
19319  case $ac_file in
19320    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19321    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19322	  break;;
19323    * ) break;;
19324  esac
19325done
19326else
19327  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19329as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19330See \`config.log' for more details" "$LINENO" 5; }
19331fi
19332rm -f conftest conftest$ac_cv_exeext
19333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19334$as_echo "$ac_cv_exeext" >&6; }
19335
19336rm -f conftest.$ac_ext
19337EXEEXT=$ac_cv_exeext
19338ac_exeext=$EXEEXT
19339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19340/* end confdefs.h.  */
19341#include <stdio.h>
19342int
19343main ()
19344{
19345FILE *f = fopen ("conftest.out", "w");
19346 return ferror (f) || fclose (f) != 0;
19347
19348  ;
19349  return 0;
19350}
19351_ACEOF
19352ac_clean_files="$ac_clean_files conftest.out"
19353# Check that the compiler produces executables we can run.  If not, either
19354# the compiler is broken, or we cross compile.
19355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19356$as_echo_n "checking whether we are cross compiling... " >&6; }
19357if test "$cross_compiling" != yes; then
19358  { { ac_try="$ac_link"
19359case "(($ac_try" in
19360  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19361  *) ac_try_echo=$ac_try;;
19362esac
19363eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19364$as_echo "$ac_try_echo"; } >&5
19365  (eval "$ac_link") 2>&5
19366  ac_status=$?
19367  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19368  test $ac_status = 0; }
19369  if { ac_try='./conftest$ac_cv_exeext'
19370  { { case "(($ac_try" in
19371  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19372  *) ac_try_echo=$ac_try;;
19373esac
19374eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19375$as_echo "$ac_try_echo"; } >&5
19376  (eval "$ac_try") 2>&5
19377  ac_status=$?
19378  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19379  test $ac_status = 0; }; }; then
19380    cross_compiling=no
19381  else
19382    if test "$cross_compiling" = maybe; then
19383	cross_compiling=yes
19384    else
19385	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19387as_fn_error $? "cannot run C compiled programs.
19388If you meant to cross compile, use \`--host'.
19389See \`config.log' for more details" "$LINENO" 5; }
19390    fi
19391  fi
19392fi
19393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19394$as_echo "$cross_compiling" >&6; }
19395
19396rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19397ac_clean_files=$ac_clean_files_save
19398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19399$as_echo_n "checking for suffix of object files... " >&6; }
19400if ${ac_cv_objext+:} false; then :
19401  $as_echo_n "(cached) " >&6
19402else
19403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19404/* end confdefs.h.  */
19405
19406int
19407main ()
19408{
19409
19410  ;
19411  return 0;
19412}
19413_ACEOF
19414rm -f conftest.o conftest.obj
19415if { { ac_try="$ac_compile"
19416case "(($ac_try" in
19417  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19418  *) ac_try_echo=$ac_try;;
19419esac
19420eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19421$as_echo "$ac_try_echo"; } >&5
19422  (eval "$ac_compile") 2>&5
19423  ac_status=$?
19424  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19425  test $ac_status = 0; }; then :
19426  for ac_file in conftest.o conftest.obj conftest.*; do
19427  test -f "$ac_file" || continue;
19428  case $ac_file in
19429    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19430    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19431       break;;
19432  esac
19433done
19434else
19435  $as_echo "$as_me: failed program was:" >&5
19436sed 's/^/| /' conftest.$ac_ext >&5
19437
19438{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19439$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19440as_fn_error $? "cannot compute suffix of object files: cannot compile
19441See \`config.log' for more details" "$LINENO" 5; }
19442fi
19443rm -f conftest.$ac_cv_objext conftest.$ac_ext
19444fi
19445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19446$as_echo "$ac_cv_objext" >&6; }
19447OBJEXT=$ac_cv_objext
19448ac_objext=$OBJEXT
19449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19450$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19451if ${ac_cv_c_compiler_gnu+:} false; then :
19452  $as_echo_n "(cached) " >&6
19453else
19454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19455/* end confdefs.h.  */
19456
19457int
19458main ()
19459{
19460#ifndef __GNUC__
19461       choke me
19462#endif
19463
19464  ;
19465  return 0;
19466}
19467_ACEOF
19468if ac_fn_c_try_compile "$LINENO"; then :
19469  ac_compiler_gnu=yes
19470else
19471  ac_compiler_gnu=no
19472fi
19473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19474ac_cv_c_compiler_gnu=$ac_compiler_gnu
19475
19476fi
19477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19478$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19479if test $ac_compiler_gnu = yes; then
19480  GCC=yes
19481else
19482  GCC=
19483fi
19484ac_test_CFLAGS=${CFLAGS+set}
19485ac_save_CFLAGS=$CFLAGS
19486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19487$as_echo_n "checking whether $CC accepts -g... " >&6; }
19488if ${ac_cv_prog_cc_g+:} false; then :
19489  $as_echo_n "(cached) " >&6
19490else
19491  ac_save_c_werror_flag=$ac_c_werror_flag
19492   ac_c_werror_flag=yes
19493   ac_cv_prog_cc_g=no
19494   CFLAGS="-g"
19495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19496/* end confdefs.h.  */
19497
19498int
19499main ()
19500{
19501
19502  ;
19503  return 0;
19504}
19505_ACEOF
19506if ac_fn_c_try_compile "$LINENO"; then :
19507  ac_cv_prog_cc_g=yes
19508else
19509  CFLAGS=""
19510      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19511/* end confdefs.h.  */
19512
19513int
19514main ()
19515{
19516
19517  ;
19518  return 0;
19519}
19520_ACEOF
19521if ac_fn_c_try_compile "$LINENO"; then :
19522
19523else
19524  ac_c_werror_flag=$ac_save_c_werror_flag
19525	 CFLAGS="-g"
19526	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19527/* end confdefs.h.  */
19528
19529int
19530main ()
19531{
19532
19533  ;
19534  return 0;
19535}
19536_ACEOF
19537if ac_fn_c_try_compile "$LINENO"; then :
19538  ac_cv_prog_cc_g=yes
19539fi
19540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19541fi
19542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19543fi
19544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19545   ac_c_werror_flag=$ac_save_c_werror_flag
19546fi
19547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19548$as_echo "$ac_cv_prog_cc_g" >&6; }
19549if test "$ac_test_CFLAGS" = set; then
19550  CFLAGS=$ac_save_CFLAGS
19551elif test $ac_cv_prog_cc_g = yes; then
19552  if test "$GCC" = yes; then
19553    CFLAGS="-g -O2"
19554  else
19555    CFLAGS="-g"
19556  fi
19557else
19558  if test "$GCC" = yes; then
19559    CFLAGS="-O2"
19560  else
19561    CFLAGS=
19562  fi
19563fi
19564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19565$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19566if ${ac_cv_prog_cc_c89+:} false; then :
19567  $as_echo_n "(cached) " >&6
19568else
19569  ac_cv_prog_cc_c89=no
19570ac_save_CC=$CC
19571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19572/* end confdefs.h.  */
19573#include <stdarg.h>
19574#include <stdio.h>
19575#include <sys/types.h>
19576#include <sys/stat.h>
19577/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19578struct buf { int x; };
19579FILE * (*rcsopen) (struct buf *, struct stat *, int);
19580static char *e (p, i)
19581     char **p;
19582     int i;
19583{
19584  return p[i];
19585}
19586static char *f (char * (*g) (char **, int), char **p, ...)
19587{
19588  char *s;
19589  va_list v;
19590  va_start (v,p);
19591  s = g (p, va_arg (v,int));
19592  va_end (v);
19593  return s;
19594}
19595
19596/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19597   function prototypes and stuff, but not '\xHH' hex character constants.
19598   These don't provoke an error unfortunately, instead are silently treated
19599   as 'x'.  The following induces an error, until -std is added to get
19600   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19601   array size at least.  It's necessary to write '\x00'==0 to get something
19602   that's true only with -std.  */
19603int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19604
19605/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19606   inside strings and character constants.  */
19607#define FOO(x) 'x'
19608int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19609
19610int test (int i, double x);
19611struct s1 {int (*f) (int a);};
19612struct s2 {int (*f) (double a);};
19613int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19614int argc;
19615char **argv;
19616int
19617main ()
19618{
19619return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19620  ;
19621  return 0;
19622}
19623_ACEOF
19624for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19625	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19626do
19627  CC="$ac_save_CC $ac_arg"
19628  if ac_fn_c_try_compile "$LINENO"; then :
19629  ac_cv_prog_cc_c89=$ac_arg
19630fi
19631rm -f core conftest.err conftest.$ac_objext
19632  test "x$ac_cv_prog_cc_c89" != "xno" && break
19633done
19634rm -f conftest.$ac_ext
19635CC=$ac_save_CC
19636
19637fi
19638# AC_CACHE_VAL
19639case "x$ac_cv_prog_cc_c89" in
19640  x)
19641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19642$as_echo "none needed" >&6; } ;;
19643  xno)
19644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19645$as_echo "unsupported" >&6; } ;;
19646  *)
19647    CC="$CC $ac_cv_prog_cc_c89"
19648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19649$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19650esac
19651if test "x$ac_cv_prog_cc_c89" != xno; then :
19652
19653fi
19654
19655ac_ext=cpp
19656ac_cpp='$CXXCPP $CPPFLAGS'
19657ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19658ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19659ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19660
19661
19662### Locate C++ compiler (CXX)
19663
19664if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19665  # Do not probe for CC on MacOSX.
19666  COMPILER_CHECK_LIST="cl g++"
19667else
19668  COMPILER_CHECK_LIST="cl CC g++"
19669fi
19670
19671  COMPILER_NAME=C++
19672
19673  CXX=
19674  # If TOOLS_DIR is set, check for all compiler names in there first
19675  # before checking the rest of the PATH.
19676  if test -n "$TOOLS_DIR"; then
19677    PATH_save="$PATH"
19678    PATH="$TOOLS_DIR"
19679    for ac_prog in $COMPILER_CHECK_LIST
19680do
19681  # Extract the first word of "$ac_prog", so it can be a program name with args.
19682set dummy $ac_prog; ac_word=$2
19683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19684$as_echo_n "checking for $ac_word... " >&6; }
19685if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
19686  $as_echo_n "(cached) " >&6
19687else
19688  case $TOOLS_DIR_CXX in
19689  [\\/]* | ?:[\\/]*)
19690  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19691  ;;
19692  *)
19693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19694for as_dir in $PATH
19695do
19696  IFS=$as_save_IFS
19697  test -z "$as_dir" && as_dir=.
19698    for ac_exec_ext in '' $ac_executable_extensions; do
19699  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19700    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19702    break 2
19703  fi
19704done
19705  done
19706IFS=$as_save_IFS
19707
19708  ;;
19709esac
19710fi
19711TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19712if test -n "$TOOLS_DIR_CXX"; then
19713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19714$as_echo "$TOOLS_DIR_CXX" >&6; }
19715else
19716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19717$as_echo "no" >&6; }
19718fi
19719
19720
19721  test -n "$TOOLS_DIR_CXX" && break
19722done
19723
19724    CXX=$TOOLS_DIR_CXX
19725    PATH="$PATH_save"
19726  fi
19727
19728  # AC_PATH_PROGS can't be run multiple times with the same variable,
19729  # so create a new name for this run.
19730  if test "x$CXX" = x; then
19731    for ac_prog in $COMPILER_CHECK_LIST
19732do
19733  # Extract the first word of "$ac_prog", so it can be a program name with args.
19734set dummy $ac_prog; ac_word=$2
19735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19736$as_echo_n "checking for $ac_word... " >&6; }
19737if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
19738  $as_echo_n "(cached) " >&6
19739else
19740  case $POTENTIAL_CXX in
19741  [\\/]* | ?:[\\/]*)
19742  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19743  ;;
19744  *)
19745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19746for as_dir in $PATH
19747do
19748  IFS=$as_save_IFS
19749  test -z "$as_dir" && as_dir=.
19750    for ac_exec_ext in '' $ac_executable_extensions; do
19751  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19752    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19754    break 2
19755  fi
19756done
19757  done
19758IFS=$as_save_IFS
19759
19760  ;;
19761esac
19762fi
19763POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19764if test -n "$POTENTIAL_CXX"; then
19765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19766$as_echo "$POTENTIAL_CXX" >&6; }
19767else
19768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19769$as_echo "no" >&6; }
19770fi
19771
19772
19773  test -n "$POTENTIAL_CXX" && break
19774done
19775
19776    CXX=$POTENTIAL_CXX
19777  fi
19778
19779  if test "x$CXX" = x; then
19780
19781    # Print a helpful message on how to acquire the necessary build dependency.
19782    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19783    MISSING_DEPENDENCY=devkit
19784    PKGHANDLER_COMMAND=
19785
19786    case $PKGHANDLER in
19787	apt-get)
19788                apt_help     $MISSING_DEPENDENCY ;;
19789    yum)
19790                yum_help     $MISSING_DEPENDENCY ;;
19791	port)
19792                port_help    $MISSING_DEPENDENCY ;;
19793	pkgutil)
19794                pkgutil_help $MISSING_DEPENDENCY ;;
19795	pkgadd)
19796                pkgadd_help  $MISSING_DEPENDENCY ;;
19797    * )
19798      break ;;
19799    esac
19800
19801    if test "x$PKGHANDLER_COMMAND" != x; then
19802        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19803    fi
19804
19805      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19806  fi
19807
19808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19809
19810  # First separate the path from the arguments. This will split at the first
19811  # space.
19812  complete="$CXX"
19813  path="${complete%% *}"
19814  tmp="$complete EOL"
19815  arguments="${tmp#* }"
19816
19817  # Input might be given as Windows format, start by converting to
19818  # unix format.
19819  new_path=`$CYGPATH -u "$path"`
19820
19821  # Now try to locate executable using which
19822  new_path=`$WHICH "$new_path" 2> /dev/null`
19823  # bat and cmd files are not always considered executable in cygwin causing which
19824  # to not find them
19825  if test "x$new_path" = x \
19826           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19827           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19828    new_path=`$CYGPATH -u "$path"`
19829  fi
19830  if test "x$new_path" = x; then
19831    # Oops. Which didn't find the executable.
19832    # The splitting of arguments from the executable at a space might have been incorrect,
19833    # since paths with space are more likely in Windows. Give it another try with the whole
19834    # argument.
19835    path="$complete"
19836    arguments="EOL"
19837    new_path=`$CYGPATH -u "$path"`
19838    new_path=`$WHICH "$new_path" 2> /dev/null`
19839    # bat and cmd files are not always considered executable in cygwin causing which
19840    # to not find them
19841    if test "x$new_path" = x \
19842             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19843             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19844      new_path=`$CYGPATH -u "$path"`
19845    fi
19846    if test "x$new_path" = x; then
19847      # It's still not found. Now this is an unrecoverable error.
19848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19849$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19850      has_space=`$ECHO "$complete" | $GREP " "`
19851      if test "x$has_space" != x; then
19852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19854      fi
19855      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19856    fi
19857  fi
19858
19859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19862  # "foo.exe" is OK but "foo" is an error.
19863  #
19864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19865  # It is also a way to make sure we got the proper file name for the real test later on.
19866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19867  if test "x$test_shortpath" = x; then
19868    # Short path failed, file does not exist as specified.
19869    # Try adding .exe or .cmd
19870    if test -f "${new_path}.exe"; then
19871       input_to_shortpath="${new_path}.exe"
19872    elif test -f "${new_path}.cmd"; then
19873       input_to_shortpath="${new_path}.cmd"
19874    else
19875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19876$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19879      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19880    fi
19881  else
19882    input_to_shortpath="$new_path"
19883  fi
19884
19885  # Call helper function which possibly converts this using DOS-style short mode.
19886  # If so, the updated path is stored in $new_path.
19887  new_path="$input_to_shortpath"
19888
19889  input_path="$input_to_shortpath"
19890  # Check if we need to convert this using DOS-style short mode. If the path
19891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19892  # take no chances and rewrite it.
19893  # Note: m4 eats our [], so we need to use [ and ] instead.
19894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19895  if test "x$has_forbidden_chars" != x; then
19896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19900      # Going to short mode and back again did indeed matter. Since short mode is
19901      # case insensitive, let's make it lowercase to improve readability.
19902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19903      # Now convert it back to Unix-stile (cygpath)
19904      input_path=`$CYGPATH -u "$shortmode_path"`
19905      new_path="$input_path"
19906    fi
19907  fi
19908
19909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19910  if test "x$test_cygdrive_prefix" = x; then
19911    # As a simple fix, exclude /usr/bin since it's not a real path.
19912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19914      # a path prefixed by /cygdrive for fixpath to work.
19915      new_path="$CYGWIN_ROOT_PATH$input_path"
19916    fi
19917  fi
19918
19919  # remove trailing .exe if any
19920  new_path="${new_path/%.exe/}"
19921
19922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19923
19924  # First separate the path from the arguments. This will split at the first
19925  # space.
19926  complete="$CXX"
19927  path="${complete%% *}"
19928  tmp="$complete EOL"
19929  arguments="${tmp#* }"
19930
19931  # Input might be given as Windows format, start by converting to
19932  # unix format.
19933  new_path="$path"
19934
19935  windows_path="$new_path"
19936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19937    unix_path=`$CYGPATH -u "$windows_path"`
19938    new_path="$unix_path"
19939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19941    new_path="$unix_path"
19942  fi
19943
19944
19945  # Now try to locate executable using which
19946  new_path=`$WHICH "$new_path" 2> /dev/null`
19947
19948  if test "x$new_path" = x; then
19949    # Oops. Which didn't find the executable.
19950    # The splitting of arguments from the executable at a space might have been incorrect,
19951    # since paths with space are more likely in Windows. Give it another try with the whole
19952    # argument.
19953    path="$complete"
19954    arguments="EOL"
19955    new_path="$path"
19956
19957  windows_path="$new_path"
19958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19959    unix_path=`$CYGPATH -u "$windows_path"`
19960    new_path="$unix_path"
19961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19963    new_path="$unix_path"
19964  fi
19965
19966
19967    new_path=`$WHICH "$new_path" 2> /dev/null`
19968
19969    if test "x$new_path" = x; then
19970      # It's still not found. Now this is an unrecoverable error.
19971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19972$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19973      has_space=`$ECHO "$complete" | $GREP " "`
19974      if test "x$has_space" != x; then
19975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19977      fi
19978      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19979    fi
19980  fi
19981
19982  # Now new_path has a complete unix path to the binary
19983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19984    # Keep paths in /bin as-is, but remove trailing .exe if any
19985    new_path="${new_path/%.exe/}"
19986    # Do not save /bin paths to all_fixpath_prefixes!
19987  else
19988    # Not in mixed or Windows style, start by that.
19989    new_path=`cmd //c echo $new_path`
19990
19991  input_path="$new_path"
19992  # Check if we need to convert this using DOS-style short mode. If the path
19993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19994  # take no chances and rewrite it.
19995  # Note: m4 eats our [], so we need to use [ and ] instead.
19996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19997  if test "x$has_forbidden_chars" != x; then
19998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20000  fi
20001
20002    # Output is in $new_path
20003
20004  windows_path="$new_path"
20005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20006    unix_path=`$CYGPATH -u "$windows_path"`
20007    new_path="$unix_path"
20008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20010    new_path="$unix_path"
20011  fi
20012
20013    # remove trailing .exe if any
20014    new_path="${new_path/%.exe/}"
20015
20016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20018  fi
20019
20020  else
20021    # We're on a posix platform. Hooray! :)
20022    # First separate the path from the arguments. This will split at the first
20023    # space.
20024    complete="$CXX"
20025    path="${complete%% *}"
20026    tmp="$complete EOL"
20027    arguments="${tmp#* }"
20028
20029    # Cannot rely on the command "which" here since it doesn't always work.
20030    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20031    if test -z "$is_absolute_path"; then
20032      # Path to executable is not absolute. Find it.
20033      IFS_save="$IFS"
20034      IFS=:
20035      for p in $PATH; do
20036        if test -f "$p/$path" && test -x "$p/$path"; then
20037          new_path="$p/$path"
20038          break
20039        fi
20040      done
20041      IFS="$IFS_save"
20042    else
20043      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20044$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20045      new_path="$path"
20046    fi
20047
20048    if test "x$new_path" = x; then
20049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20050$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20051        has_space=`$ECHO "$complete" | $GREP " "`
20052        if test "x$has_space" != x; then
20053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20055        fi
20056        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20057      fi
20058  fi
20059
20060      # Now join together the path and the arguments once again
20061      if test "x$arguments" != xEOL; then
20062        new_complete="$new_path ${arguments% *}"
20063      else
20064        new_complete="$new_path"
20065      fi
20066
20067  if test "x$complete" != "x$new_complete"; then
20068      CXX="$new_complete"
20069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20070$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20071    fi
20072
20073  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20074$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20075  TEST_COMPILER="$CXX"
20076
20077    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20078        # Follow a chain of symbolic links. Use readlink
20079        # where it exists, else fall back to horribly
20080        # complicated shell code.
20081        if test "x$READLINK_TESTED" != yes; then
20082            # On MacOSX there is a readlink tool with a different
20083            # purpose than the GNU readlink tool. Check the found readlink.
20084            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20085            if test "x$ISGNU" = x; then
20086                 # A readlink that we do not know how to use.
20087                 # Are there other non-GNU readlinks out there?
20088                 READLINK_TESTED=yes
20089                 READLINK=
20090            fi
20091        fi
20092
20093        if test "x$READLINK" != x; then
20094            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20095        else
20096            # Save the current directory for restoring afterwards
20097            STARTDIR=$PWD
20098            COUNTER=0
20099            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20100            sym_link_file=`$BASENAME $TEST_COMPILER`
20101            # Use the system pwd and not the shell builtin to resolve directory symlinks
20102            cd $sym_link_dir
20103            cd `$THEPWDCMD`
20104            sym_link_dir=`$THEPWDCMD`
20105            # Resolve file symlinks
20106            while test $COUNTER -lt 20; do
20107                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20108                if test "x$ISLINK" == x; then
20109                    # This is not a symbolic link! We are done!
20110                    break
20111                fi
20112                # Again resolve directory symlinks since the target of the just found
20113                # link could be in a different directory
20114                cd `$DIRNAME $ISLINK`
20115                sym_link_dir=`$THEPWDCMD`
20116                sym_link_file=`$BASENAME $ISLINK`
20117                let COUNTER=COUNTER+1
20118            done
20119            cd $STARTDIR
20120            TEST_COMPILER=$sym_link_dir/$sym_link_file
20121        fi
20122    fi
20123
20124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20125$as_echo "$TEST_COMPILER" >&6; }
20126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20127$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20128
20129  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20130  if test "x$COMPILER_BASENAME" = "xccache"; then
20131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20132$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20133    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20134    # We want to control ccache invocation ourselves, so ignore this cc and try
20135    # searching again.
20136
20137    # Remove the path to the fake ccache cc from the PATH
20138    RETRY_COMPILER_SAVED_PATH="$PATH"
20139    COMPILER_DIRNAME=`$DIRNAME $CXX`
20140    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20141
20142    # Try again looking for our compiler
20143    if test -n "$ac_tool_prefix"; then
20144  for ac_prog in $COMPILER_CHECK_LIST
20145  do
20146    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20147set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20149$as_echo_n "checking for $ac_word... " >&6; }
20150if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20151  $as_echo_n "(cached) " >&6
20152else
20153  if test -n "$PROPER_COMPILER_CXX"; then
20154  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20155else
20156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20157for as_dir in $PATH
20158do
20159  IFS=$as_save_IFS
20160  test -z "$as_dir" && as_dir=.
20161    for ac_exec_ext in '' $ac_executable_extensions; do
20162  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20163    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20165    break 2
20166  fi
20167done
20168  done
20169IFS=$as_save_IFS
20170
20171fi
20172fi
20173PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20174if test -n "$PROPER_COMPILER_CXX"; then
20175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20176$as_echo "$PROPER_COMPILER_CXX" >&6; }
20177else
20178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20179$as_echo "no" >&6; }
20180fi
20181
20182
20183    test -n "$PROPER_COMPILER_CXX" && break
20184  done
20185fi
20186if test -z "$PROPER_COMPILER_CXX"; then
20187  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20188  for ac_prog in $COMPILER_CHECK_LIST
20189do
20190  # Extract the first word of "$ac_prog", so it can be a program name with args.
20191set dummy $ac_prog; ac_word=$2
20192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20193$as_echo_n "checking for $ac_word... " >&6; }
20194if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20195  $as_echo_n "(cached) " >&6
20196else
20197  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20198  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20199else
20200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20201for as_dir in $PATH
20202do
20203  IFS=$as_save_IFS
20204  test -z "$as_dir" && as_dir=.
20205    for ac_exec_ext in '' $ac_executable_extensions; do
20206  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20207    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20209    break 2
20210  fi
20211done
20212  done
20213IFS=$as_save_IFS
20214
20215fi
20216fi
20217ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20218if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20220$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20221else
20222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20223$as_echo "no" >&6; }
20224fi
20225
20226
20227  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20228done
20229
20230  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20231    PROPER_COMPILER_CXX=""
20232  else
20233    case $cross_compiling:$ac_tool_warned in
20234yes:)
20235{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20236$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20237ac_tool_warned=yes ;;
20238esac
20239    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20240  fi
20241fi
20242
20243
20244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20245
20246  # First separate the path from the arguments. This will split at the first
20247  # space.
20248  complete="$PROPER_COMPILER_CXX"
20249  path="${complete%% *}"
20250  tmp="$complete EOL"
20251  arguments="${tmp#* }"
20252
20253  # Input might be given as Windows format, start by converting to
20254  # unix format.
20255  new_path=`$CYGPATH -u "$path"`
20256
20257  # Now try to locate executable using which
20258  new_path=`$WHICH "$new_path" 2> /dev/null`
20259  # bat and cmd files are not always considered executable in cygwin causing which
20260  # to not find them
20261  if test "x$new_path" = x \
20262           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20263           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20264    new_path=`$CYGPATH -u "$path"`
20265  fi
20266  if test "x$new_path" = x; then
20267    # Oops. Which didn't find the executable.
20268    # The splitting of arguments from the executable at a space might have been incorrect,
20269    # since paths with space are more likely in Windows. Give it another try with the whole
20270    # argument.
20271    path="$complete"
20272    arguments="EOL"
20273    new_path=`$CYGPATH -u "$path"`
20274    new_path=`$WHICH "$new_path" 2> /dev/null`
20275    # bat and cmd files are not always considered executable in cygwin causing which
20276    # to not find them
20277    if test "x$new_path" = x \
20278             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20279             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20280      new_path=`$CYGPATH -u "$path"`
20281    fi
20282    if test "x$new_path" = x; then
20283      # It's still not found. Now this is an unrecoverable error.
20284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20285$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20286      has_space=`$ECHO "$complete" | $GREP " "`
20287      if test "x$has_space" != x; then
20288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20290      fi
20291      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20292    fi
20293  fi
20294
20295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20298  # "foo.exe" is OK but "foo" is an error.
20299  #
20300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20301  # It is also a way to make sure we got the proper file name for the real test later on.
20302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20303  if test "x$test_shortpath" = x; then
20304    # Short path failed, file does not exist as specified.
20305    # Try adding .exe or .cmd
20306    if test -f "${new_path}.exe"; then
20307       input_to_shortpath="${new_path}.exe"
20308    elif test -f "${new_path}.cmd"; then
20309       input_to_shortpath="${new_path}.cmd"
20310    else
20311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20312$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20315      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20316    fi
20317  else
20318    input_to_shortpath="$new_path"
20319  fi
20320
20321  # Call helper function which possibly converts this using DOS-style short mode.
20322  # If so, the updated path is stored in $new_path.
20323  new_path="$input_to_shortpath"
20324
20325  input_path="$input_to_shortpath"
20326  # Check if we need to convert this using DOS-style short mode. If the path
20327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20328  # take no chances and rewrite it.
20329  # Note: m4 eats our [], so we need to use [ and ] instead.
20330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20331  if test "x$has_forbidden_chars" != x; then
20332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20336      # Going to short mode and back again did indeed matter. Since short mode is
20337      # case insensitive, let's make it lowercase to improve readability.
20338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20339      # Now convert it back to Unix-stile (cygpath)
20340      input_path=`$CYGPATH -u "$shortmode_path"`
20341      new_path="$input_path"
20342    fi
20343  fi
20344
20345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20346  if test "x$test_cygdrive_prefix" = x; then
20347    # As a simple fix, exclude /usr/bin since it's not a real path.
20348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20350      # a path prefixed by /cygdrive for fixpath to work.
20351      new_path="$CYGWIN_ROOT_PATH$input_path"
20352    fi
20353  fi
20354
20355  # remove trailing .exe if any
20356  new_path="${new_path/%.exe/}"
20357
20358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20359
20360  # First separate the path from the arguments. This will split at the first
20361  # space.
20362  complete="$PROPER_COMPILER_CXX"
20363  path="${complete%% *}"
20364  tmp="$complete EOL"
20365  arguments="${tmp#* }"
20366
20367  # Input might be given as Windows format, start by converting to
20368  # unix format.
20369  new_path="$path"
20370
20371  windows_path="$new_path"
20372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20373    unix_path=`$CYGPATH -u "$windows_path"`
20374    new_path="$unix_path"
20375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20377    new_path="$unix_path"
20378  fi
20379
20380
20381  # Now try to locate executable using which
20382  new_path=`$WHICH "$new_path" 2> /dev/null`
20383
20384  if test "x$new_path" = x; then
20385    # Oops. Which didn't find the executable.
20386    # The splitting of arguments from the executable at a space might have been incorrect,
20387    # since paths with space are more likely in Windows. Give it another try with the whole
20388    # argument.
20389    path="$complete"
20390    arguments="EOL"
20391    new_path="$path"
20392
20393  windows_path="$new_path"
20394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20395    unix_path=`$CYGPATH -u "$windows_path"`
20396    new_path="$unix_path"
20397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20399    new_path="$unix_path"
20400  fi
20401
20402
20403    new_path=`$WHICH "$new_path" 2> /dev/null`
20404
20405    if test "x$new_path" = x; then
20406      # It's still not found. Now this is an unrecoverable error.
20407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20408$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20409      has_space=`$ECHO "$complete" | $GREP " "`
20410      if test "x$has_space" != x; then
20411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20413      fi
20414      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20415    fi
20416  fi
20417
20418  # Now new_path has a complete unix path to the binary
20419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20420    # Keep paths in /bin as-is, but remove trailing .exe if any
20421    new_path="${new_path/%.exe/}"
20422    # Do not save /bin paths to all_fixpath_prefixes!
20423  else
20424    # Not in mixed or Windows style, start by that.
20425    new_path=`cmd //c echo $new_path`
20426
20427  input_path="$new_path"
20428  # Check if we need to convert this using DOS-style short mode. If the path
20429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20430  # take no chances and rewrite it.
20431  # Note: m4 eats our [], so we need to use [ and ] instead.
20432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20433  if test "x$has_forbidden_chars" != x; then
20434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20436  fi
20437
20438    # Output is in $new_path
20439
20440  windows_path="$new_path"
20441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20442    unix_path=`$CYGPATH -u "$windows_path"`
20443    new_path="$unix_path"
20444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20446    new_path="$unix_path"
20447  fi
20448
20449    # remove trailing .exe if any
20450    new_path="${new_path/%.exe/}"
20451
20452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20454  fi
20455
20456  else
20457    # We're on a posix platform. Hooray! :)
20458    # First separate the path from the arguments. This will split at the first
20459    # space.
20460    complete="$PROPER_COMPILER_CXX"
20461    path="${complete%% *}"
20462    tmp="$complete EOL"
20463    arguments="${tmp#* }"
20464
20465    # Cannot rely on the command "which" here since it doesn't always work.
20466    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20467    if test -z "$is_absolute_path"; then
20468      # Path to executable is not absolute. Find it.
20469      IFS_save="$IFS"
20470      IFS=:
20471      for p in $PATH; do
20472        if test -f "$p/$path" && test -x "$p/$path"; then
20473          new_path="$p/$path"
20474          break
20475        fi
20476      done
20477      IFS="$IFS_save"
20478    else
20479      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20480$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20481      new_path="$path"
20482    fi
20483
20484    if test "x$new_path" = x; then
20485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20486$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20487        has_space=`$ECHO "$complete" | $GREP " "`
20488        if test "x$has_space" != x; then
20489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20491        fi
20492        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20493      fi
20494  fi
20495
20496      # Now join together the path and the arguments once again
20497      if test "x$arguments" != xEOL; then
20498        new_complete="$new_path ${arguments% *}"
20499      else
20500        new_complete="$new_path"
20501      fi
20502
20503  if test "x$complete" != "x$new_complete"; then
20504      PROPER_COMPILER_CXX="$new_complete"
20505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20506$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20507    fi
20508
20509    PATH="$RETRY_COMPILER_SAVED_PATH"
20510
20511    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20512$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20513
20514    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20515        # Follow a chain of symbolic links. Use readlink
20516        # where it exists, else fall back to horribly
20517        # complicated shell code.
20518        if test "x$READLINK_TESTED" != yes; then
20519            # On MacOSX there is a readlink tool with a different
20520            # purpose than the GNU readlink tool. Check the found readlink.
20521            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20522            if test "x$ISGNU" = x; then
20523                 # A readlink that we do not know how to use.
20524                 # Are there other non-GNU readlinks out there?
20525                 READLINK_TESTED=yes
20526                 READLINK=
20527            fi
20528        fi
20529
20530        if test "x$READLINK" != x; then
20531            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20532        else
20533            # Save the current directory for restoring afterwards
20534            STARTDIR=$PWD
20535            COUNTER=0
20536            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20537            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20538            # Use the system pwd and not the shell builtin to resolve directory symlinks
20539            cd $sym_link_dir
20540            cd `$THEPWDCMD`
20541            sym_link_dir=`$THEPWDCMD`
20542            # Resolve file symlinks
20543            while test $COUNTER -lt 20; do
20544                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20545                if test "x$ISLINK" == x; then
20546                    # This is not a symbolic link! We are done!
20547                    break
20548                fi
20549                # Again resolve directory symlinks since the target of the just found
20550                # link could be in a different directory
20551                cd `$DIRNAME $ISLINK`
20552                sym_link_dir=`$THEPWDCMD`
20553                sym_link_file=`$BASENAME $ISLINK`
20554                let COUNTER=COUNTER+1
20555            done
20556            cd $STARTDIR
20557            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20558        fi
20559    fi
20560
20561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20562$as_echo "$PROPER_COMPILER_CXX" >&6; }
20563    CXX="$PROPER_COMPILER_CXX"
20564  else
20565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20566$as_echo "no, keeping CXX" >&6; }
20567    CXX="$TEST_COMPILER"
20568  fi
20569
20570  COMPILER=$CXX
20571  COMPILER_NAME=$COMPILER_NAME
20572
20573  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20574    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20575    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20576    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20577    if test $? -ne 0; then
20578      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20579
20580      { $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
20581$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20582      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20583$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20584      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20585    else
20586      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20587      COMPILER_VENDOR="Sun Studio"
20588    fi
20589  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20590    # First line typically looks something like:
20591    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20592    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20593    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20594    COMPILER_VENDOR="Microsoft CL.EXE"
20595    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20596    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20597      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20598        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20599      fi
20600    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20601      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20602        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20603      fi
20604    fi
20605  else
20606    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20607    # Check that this is likely to be GCC.
20608    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20609    if test $? -ne 0; then
20610      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20611$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20612      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20613$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20614      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20615    fi
20616
20617    # First line typically looks something like:
20618    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20619    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20620    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20621  fi
20622  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20623  CXX_VERSION="$COMPILER_VERSION"
20624  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20625  CXX_VENDOR="$COMPILER_VENDOR"
20626
20627  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20628$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20629
20630
20631# Now that we have resolved CXX ourself, let autoconf have it's go at it
20632ac_ext=cpp
20633ac_cpp='$CXXCPP $CPPFLAGS'
20634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20637if test -z "$CXX"; then
20638  if test -n "$CCC"; then
20639    CXX=$CCC
20640  else
20641    if test -n "$ac_tool_prefix"; then
20642  for ac_prog in $CXX
20643  do
20644    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20645set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20647$as_echo_n "checking for $ac_word... " >&6; }
20648if ${ac_cv_prog_CXX+:} false; then :
20649  $as_echo_n "(cached) " >&6
20650else
20651  if test -n "$CXX"; then
20652  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20653else
20654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20655for as_dir in $PATH
20656do
20657  IFS=$as_save_IFS
20658  test -z "$as_dir" && as_dir=.
20659    for ac_exec_ext in '' $ac_executable_extensions; do
20660  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20661    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20663    break 2
20664  fi
20665done
20666  done
20667IFS=$as_save_IFS
20668
20669fi
20670fi
20671CXX=$ac_cv_prog_CXX
20672if test -n "$CXX"; then
20673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20674$as_echo "$CXX" >&6; }
20675else
20676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20677$as_echo "no" >&6; }
20678fi
20679
20680
20681    test -n "$CXX" && break
20682  done
20683fi
20684if test -z "$CXX"; then
20685  ac_ct_CXX=$CXX
20686  for ac_prog in $CXX
20687do
20688  # Extract the first word of "$ac_prog", so it can be a program name with args.
20689set dummy $ac_prog; ac_word=$2
20690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20691$as_echo_n "checking for $ac_word... " >&6; }
20692if ${ac_cv_prog_ac_ct_CXX+:} false; then :
20693  $as_echo_n "(cached) " >&6
20694else
20695  if test -n "$ac_ct_CXX"; then
20696  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20697else
20698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20699for as_dir in $PATH
20700do
20701  IFS=$as_save_IFS
20702  test -z "$as_dir" && as_dir=.
20703    for ac_exec_ext in '' $ac_executable_extensions; do
20704  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20705    ac_cv_prog_ac_ct_CXX="$ac_prog"
20706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20707    break 2
20708  fi
20709done
20710  done
20711IFS=$as_save_IFS
20712
20713fi
20714fi
20715ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20716if test -n "$ac_ct_CXX"; then
20717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20718$as_echo "$ac_ct_CXX" >&6; }
20719else
20720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20721$as_echo "no" >&6; }
20722fi
20723
20724
20725  test -n "$ac_ct_CXX" && break
20726done
20727
20728  if test "x$ac_ct_CXX" = x; then
20729    CXX="g++"
20730  else
20731    case $cross_compiling:$ac_tool_warned in
20732yes:)
20733{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20734$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20735ac_tool_warned=yes ;;
20736esac
20737    CXX=$ac_ct_CXX
20738  fi
20739fi
20740
20741  fi
20742fi
20743# Provide some information about the compiler.
20744$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20745set X $ac_compile
20746ac_compiler=$2
20747for ac_option in --version -v -V -qversion; do
20748  { { ac_try="$ac_compiler $ac_option >&5"
20749case "(($ac_try" in
20750  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20751  *) ac_try_echo=$ac_try;;
20752esac
20753eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20754$as_echo "$ac_try_echo"; } >&5
20755  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20756  ac_status=$?
20757  if test -s conftest.err; then
20758    sed '10a\
20759... rest of stderr output deleted ...
20760         10q' conftest.err >conftest.er1
20761    cat conftest.er1 >&5
20762  fi
20763  rm -f conftest.er1 conftest.err
20764  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20765  test $ac_status = 0; }
20766done
20767
20768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20769$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20770if ${ac_cv_cxx_compiler_gnu+:} false; then :
20771  $as_echo_n "(cached) " >&6
20772else
20773  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20774/* end confdefs.h.  */
20775
20776int
20777main ()
20778{
20779#ifndef __GNUC__
20780       choke me
20781#endif
20782
20783  ;
20784  return 0;
20785}
20786_ACEOF
20787if ac_fn_cxx_try_compile "$LINENO"; then :
20788  ac_compiler_gnu=yes
20789else
20790  ac_compiler_gnu=no
20791fi
20792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20793ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20794
20795fi
20796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20797$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20798if test $ac_compiler_gnu = yes; then
20799  GXX=yes
20800else
20801  GXX=
20802fi
20803ac_test_CXXFLAGS=${CXXFLAGS+set}
20804ac_save_CXXFLAGS=$CXXFLAGS
20805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20806$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20807if ${ac_cv_prog_cxx_g+:} false; then :
20808  $as_echo_n "(cached) " >&6
20809else
20810  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20811   ac_cxx_werror_flag=yes
20812   ac_cv_prog_cxx_g=no
20813   CXXFLAGS="-g"
20814   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20815/* end confdefs.h.  */
20816
20817int
20818main ()
20819{
20820
20821  ;
20822  return 0;
20823}
20824_ACEOF
20825if ac_fn_cxx_try_compile "$LINENO"; then :
20826  ac_cv_prog_cxx_g=yes
20827else
20828  CXXFLAGS=""
20829      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20830/* end confdefs.h.  */
20831
20832int
20833main ()
20834{
20835
20836  ;
20837  return 0;
20838}
20839_ACEOF
20840if ac_fn_cxx_try_compile "$LINENO"; then :
20841
20842else
20843  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20844	 CXXFLAGS="-g"
20845	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20846/* end confdefs.h.  */
20847
20848int
20849main ()
20850{
20851
20852  ;
20853  return 0;
20854}
20855_ACEOF
20856if ac_fn_cxx_try_compile "$LINENO"; then :
20857  ac_cv_prog_cxx_g=yes
20858fi
20859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20860fi
20861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20862fi
20863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20864   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20865fi
20866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20867$as_echo "$ac_cv_prog_cxx_g" >&6; }
20868if test "$ac_test_CXXFLAGS" = set; then
20869  CXXFLAGS=$ac_save_CXXFLAGS
20870elif test $ac_cv_prog_cxx_g = yes; then
20871  if test "$GXX" = yes; then
20872    CXXFLAGS="-g -O2"
20873  else
20874    CXXFLAGS="-g"
20875  fi
20876else
20877  if test "$GXX" = yes; then
20878    CXXFLAGS="-O2"
20879  else
20880    CXXFLAGS=
20881  fi
20882fi
20883ac_ext=cpp
20884ac_cpp='$CXXCPP $CPPFLAGS'
20885ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20886ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20887ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20888
20889
20890### Locate other tools
20891
20892if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20893    ac_ext=m
20894ac_cpp='$OBJCPP $CPPFLAGS'
20895ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20896ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20897ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20898if test -n "$ac_tool_prefix"; then
20899  for ac_prog in gcc objcc objc cc CC
20900  do
20901    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20902set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20904$as_echo_n "checking for $ac_word... " >&6; }
20905if ${ac_cv_prog_OBJC+:} false; then :
20906  $as_echo_n "(cached) " >&6
20907else
20908  if test -n "$OBJC"; then
20909  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20910else
20911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20912for as_dir in $PATH
20913do
20914  IFS=$as_save_IFS
20915  test -z "$as_dir" && as_dir=.
20916    for ac_exec_ext in '' $ac_executable_extensions; do
20917  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20918    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20920    break 2
20921  fi
20922done
20923  done
20924IFS=$as_save_IFS
20925
20926fi
20927fi
20928OBJC=$ac_cv_prog_OBJC
20929if test -n "$OBJC"; then
20930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20931$as_echo "$OBJC" >&6; }
20932else
20933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20934$as_echo "no" >&6; }
20935fi
20936
20937
20938    test -n "$OBJC" && break
20939  done
20940fi
20941if test -z "$OBJC"; then
20942  ac_ct_OBJC=$OBJC
20943  for ac_prog in gcc objcc objc cc CC
20944do
20945  # Extract the first word of "$ac_prog", so it can be a program name with args.
20946set dummy $ac_prog; ac_word=$2
20947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20948$as_echo_n "checking for $ac_word... " >&6; }
20949if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
20950  $as_echo_n "(cached) " >&6
20951else
20952  if test -n "$ac_ct_OBJC"; then
20953  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20954else
20955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20956for as_dir in $PATH
20957do
20958  IFS=$as_save_IFS
20959  test -z "$as_dir" && as_dir=.
20960    for ac_exec_ext in '' $ac_executable_extensions; do
20961  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20962    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20964    break 2
20965  fi
20966done
20967  done
20968IFS=$as_save_IFS
20969
20970fi
20971fi
20972ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20973if test -n "$ac_ct_OBJC"; then
20974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20975$as_echo "$ac_ct_OBJC" >&6; }
20976else
20977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20978$as_echo "no" >&6; }
20979fi
20980
20981
20982  test -n "$ac_ct_OBJC" && break
20983done
20984
20985  if test "x$ac_ct_OBJC" = x; then
20986    OBJC="gcc"
20987  else
20988    case $cross_compiling:$ac_tool_warned in
20989yes:)
20990{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20991$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20992ac_tool_warned=yes ;;
20993esac
20994    OBJC=$ac_ct_OBJC
20995  fi
20996fi
20997
20998# Provide some information about the compiler.
20999$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21000set X $ac_compile
21001ac_compiler=$2
21002for ac_option in --version -v -V -qversion; do
21003  { { ac_try="$ac_compiler $ac_option >&5"
21004case "(($ac_try" in
21005  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21006  *) ac_try_echo=$ac_try;;
21007esac
21008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21009$as_echo "$ac_try_echo"; } >&5
21010  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21011  ac_status=$?
21012  if test -s conftest.err; then
21013    sed '10a\
21014... rest of stderr output deleted ...
21015         10q' conftest.err >conftest.er1
21016    cat conftest.er1 >&5
21017  fi
21018  rm -f conftest.er1 conftest.err
21019  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21020  test $ac_status = 0; }
21021done
21022
21023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21024$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21025if ${ac_cv_objc_compiler_gnu+:} false; then :
21026  $as_echo_n "(cached) " >&6
21027else
21028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21029/* end confdefs.h.  */
21030
21031int
21032main ()
21033{
21034#ifndef __GNUC__
21035       choke me
21036#endif
21037
21038  ;
21039  return 0;
21040}
21041_ACEOF
21042if ac_fn_objc_try_compile "$LINENO"; then :
21043  ac_compiler_gnu=yes
21044else
21045  ac_compiler_gnu=no
21046fi
21047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21048ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21049
21050fi
21051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21052$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21053if test $ac_compiler_gnu = yes; then
21054  GOBJC=yes
21055else
21056  GOBJC=
21057fi
21058ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21059ac_save_OBJCFLAGS=$OBJCFLAGS
21060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21061$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21062if ${ac_cv_prog_objc_g+:} false; then :
21063  $as_echo_n "(cached) " >&6
21064else
21065  ac_save_objc_werror_flag=$ac_objc_werror_flag
21066   ac_objc_werror_flag=yes
21067   ac_cv_prog_objc_g=no
21068   OBJCFLAGS="-g"
21069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21070/* end confdefs.h.  */
21071
21072int
21073main ()
21074{
21075
21076  ;
21077  return 0;
21078}
21079_ACEOF
21080if ac_fn_objc_try_compile "$LINENO"; then :
21081  ac_cv_prog_objc_g=yes
21082else
21083  OBJCFLAGS=""
21084      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21085/* end confdefs.h.  */
21086
21087int
21088main ()
21089{
21090
21091  ;
21092  return 0;
21093}
21094_ACEOF
21095if ac_fn_objc_try_compile "$LINENO"; then :
21096
21097else
21098  ac_objc_werror_flag=$ac_save_objc_werror_flag
21099	 OBJCFLAGS="-g"
21100	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21101/* end confdefs.h.  */
21102
21103int
21104main ()
21105{
21106
21107  ;
21108  return 0;
21109}
21110_ACEOF
21111if ac_fn_objc_try_compile "$LINENO"; then :
21112  ac_cv_prog_objc_g=yes
21113fi
21114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21115fi
21116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21117fi
21118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21119   ac_objc_werror_flag=$ac_save_objc_werror_flag
21120fi
21121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21122$as_echo "$ac_cv_prog_objc_g" >&6; }
21123if test "$ac_test_OBJCFLAGS" = set; then
21124  OBJCFLAGS=$ac_save_OBJCFLAGS
21125elif test $ac_cv_prog_objc_g = yes; then
21126  if test "$GOBJC" = yes; then
21127    OBJCFLAGS="-g -O2"
21128  else
21129    OBJCFLAGS="-g"
21130  fi
21131else
21132  if test "$GOBJC" = yes; then
21133    OBJCFLAGS="-O2"
21134  else
21135    OBJCFLAGS=
21136  fi
21137fi
21138ac_ext=cpp
21139ac_cpp='$CXXCPP $CPPFLAGS'
21140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21143
21144
21145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21146
21147  # First separate the path from the arguments. This will split at the first
21148  # space.
21149  complete="$OBJC"
21150  path="${complete%% *}"
21151  tmp="$complete EOL"
21152  arguments="${tmp#* }"
21153
21154  # Input might be given as Windows format, start by converting to
21155  # unix format.
21156  new_path=`$CYGPATH -u "$path"`
21157
21158  # Now try to locate executable using which
21159  new_path=`$WHICH "$new_path" 2> /dev/null`
21160  # bat and cmd files are not always considered executable in cygwin causing which
21161  # to not find them
21162  if test "x$new_path" = x \
21163           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21164           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21165    new_path=`$CYGPATH -u "$path"`
21166  fi
21167  if test "x$new_path" = x; then
21168    # Oops. Which didn't find the executable.
21169    # The splitting of arguments from the executable at a space might have been incorrect,
21170    # since paths with space are more likely in Windows. Give it another try with the whole
21171    # argument.
21172    path="$complete"
21173    arguments="EOL"
21174    new_path=`$CYGPATH -u "$path"`
21175    new_path=`$WHICH "$new_path" 2> /dev/null`
21176    # bat and cmd files are not always considered executable in cygwin causing which
21177    # to not find them
21178    if test "x$new_path" = x \
21179             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21180             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21181      new_path=`$CYGPATH -u "$path"`
21182    fi
21183    if test "x$new_path" = x; then
21184      # It's still not found. Now this is an unrecoverable error.
21185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21186$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21187      has_space=`$ECHO "$complete" | $GREP " "`
21188      if test "x$has_space" != x; then
21189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21191      fi
21192      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21193    fi
21194  fi
21195
21196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21199  # "foo.exe" is OK but "foo" is an error.
21200  #
21201  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21202  # It is also a way to make sure we got the proper file name for the real test later on.
21203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21204  if test "x$test_shortpath" = x; then
21205    # Short path failed, file does not exist as specified.
21206    # Try adding .exe or .cmd
21207    if test -f "${new_path}.exe"; then
21208       input_to_shortpath="${new_path}.exe"
21209    elif test -f "${new_path}.cmd"; then
21210       input_to_shortpath="${new_path}.cmd"
21211    else
21212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21213$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21214      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21215$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21216      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21217    fi
21218  else
21219    input_to_shortpath="$new_path"
21220  fi
21221
21222  # Call helper function which possibly converts this using DOS-style short mode.
21223  # If so, the updated path is stored in $new_path.
21224  new_path="$input_to_shortpath"
21225
21226  input_path="$input_to_shortpath"
21227  # Check if we need to convert this using DOS-style short mode. If the path
21228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21229  # take no chances and rewrite it.
21230  # Note: m4 eats our [], so we need to use [ and ] instead.
21231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21232  if test "x$has_forbidden_chars" != x; then
21233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21237      # Going to short mode and back again did indeed matter. Since short mode is
21238      # case insensitive, let's make it lowercase to improve readability.
21239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21240      # Now convert it back to Unix-stile (cygpath)
21241      input_path=`$CYGPATH -u "$shortmode_path"`
21242      new_path="$input_path"
21243    fi
21244  fi
21245
21246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21247  if test "x$test_cygdrive_prefix" = x; then
21248    # As a simple fix, exclude /usr/bin since it's not a real path.
21249    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21251      # a path prefixed by /cygdrive for fixpath to work.
21252      new_path="$CYGWIN_ROOT_PATH$input_path"
21253    fi
21254  fi
21255
21256  # remove trailing .exe if any
21257  new_path="${new_path/%.exe/}"
21258
21259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21260
21261  # First separate the path from the arguments. This will split at the first
21262  # space.
21263  complete="$OBJC"
21264  path="${complete%% *}"
21265  tmp="$complete EOL"
21266  arguments="${tmp#* }"
21267
21268  # Input might be given as Windows format, start by converting to
21269  # unix format.
21270  new_path="$path"
21271
21272  windows_path="$new_path"
21273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21274    unix_path=`$CYGPATH -u "$windows_path"`
21275    new_path="$unix_path"
21276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21278    new_path="$unix_path"
21279  fi
21280
21281
21282  # Now try to locate executable using which
21283  new_path=`$WHICH "$new_path" 2> /dev/null`
21284
21285  if test "x$new_path" = x; then
21286    # Oops. Which didn't find the executable.
21287    # The splitting of arguments from the executable at a space might have been incorrect,
21288    # since paths with space are more likely in Windows. Give it another try with the whole
21289    # argument.
21290    path="$complete"
21291    arguments="EOL"
21292    new_path="$path"
21293
21294  windows_path="$new_path"
21295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21296    unix_path=`$CYGPATH -u "$windows_path"`
21297    new_path="$unix_path"
21298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21300    new_path="$unix_path"
21301  fi
21302
21303
21304    new_path=`$WHICH "$new_path" 2> /dev/null`
21305
21306    if test "x$new_path" = x; then
21307      # It's still not found. Now this is an unrecoverable error.
21308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21309$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21310      has_space=`$ECHO "$complete" | $GREP " "`
21311      if test "x$has_space" != x; then
21312        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21313$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21314      fi
21315      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21316    fi
21317  fi
21318
21319  # Now new_path has a complete unix path to the binary
21320  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21321    # Keep paths in /bin as-is, but remove trailing .exe if any
21322    new_path="${new_path/%.exe/}"
21323    # Do not save /bin paths to all_fixpath_prefixes!
21324  else
21325    # Not in mixed or Windows style, start by that.
21326    new_path=`cmd //c echo $new_path`
21327
21328  input_path="$new_path"
21329  # Check if we need to convert this using DOS-style short mode. If the path
21330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21331  # take no chances and rewrite it.
21332  # Note: m4 eats our [], so we need to use [ and ] instead.
21333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21334  if test "x$has_forbidden_chars" != x; then
21335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21337  fi
21338
21339    # Output is in $new_path
21340
21341  windows_path="$new_path"
21342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21343    unix_path=`$CYGPATH -u "$windows_path"`
21344    new_path="$unix_path"
21345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21347    new_path="$unix_path"
21348  fi
21349
21350    # remove trailing .exe if any
21351    new_path="${new_path/%.exe/}"
21352
21353    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21354    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21355  fi
21356
21357  else
21358    # We're on a posix platform. Hooray! :)
21359    # First separate the path from the arguments. This will split at the first
21360    # space.
21361    complete="$OBJC"
21362    path="${complete%% *}"
21363    tmp="$complete EOL"
21364    arguments="${tmp#* }"
21365
21366    # Cannot rely on the command "which" here since it doesn't always work.
21367    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21368    if test -z "$is_absolute_path"; then
21369      # Path to executable is not absolute. Find it.
21370      IFS_save="$IFS"
21371      IFS=:
21372      for p in $PATH; do
21373        if test -f "$p/$path" && test -x "$p/$path"; then
21374          new_path="$p/$path"
21375          break
21376        fi
21377      done
21378      IFS="$IFS_save"
21379    else
21380      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21381$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21382      new_path="$path"
21383    fi
21384
21385    if test "x$new_path" = x; then
21386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21387$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21388        has_space=`$ECHO "$complete" | $GREP " "`
21389        if test "x$has_space" != x; then
21390          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21391$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21392        fi
21393        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21394      fi
21395  fi
21396
21397      # Now join together the path and the arguments once again
21398      if test "x$arguments" != xEOL; then
21399        new_complete="$new_path ${arguments% *}"
21400      else
21401        new_complete="$new_path"
21402      fi
21403
21404  if test "x$complete" != "x$new_complete"; then
21405      OBJC="$new_complete"
21406      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21407$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21408    fi
21409
21410else
21411    OBJC=
21412fi
21413
21414# Restore the flags to the user specified values.
21415# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21416CFLAGS="$ORG_CFLAGS"
21417CXXFLAGS="$ORG_CXXFLAGS"
21418OBJCFLAGS="$ORG_OBJCFLAGS"
21419
21420LD="$CC"
21421LDEXE="$CC"
21422LDCXX="$CXX"
21423LDEXECXX="$CXX"
21424
21425# LDEXE is the linker to use, when creating executables.
21426
21427# Linking C++ libraries.
21428
21429# Linking C++ executables.
21430
21431
21432if test "x$OPENJDK_TARGET_OS" != xwindows; then
21433    if test -n "$ac_tool_prefix"; then
21434  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21435set dummy ${ac_tool_prefix}ar; ac_word=$2
21436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21437$as_echo_n "checking for $ac_word... " >&6; }
21438if ${ac_cv_prog_AR+:} false; then :
21439  $as_echo_n "(cached) " >&6
21440else
21441  if test -n "$AR"; then
21442  ac_cv_prog_AR="$AR" # Let the user override the test.
21443else
21444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21445for as_dir in $PATH
21446do
21447  IFS=$as_save_IFS
21448  test -z "$as_dir" && as_dir=.
21449    for ac_exec_ext in '' $ac_executable_extensions; do
21450  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21451    ac_cv_prog_AR="${ac_tool_prefix}ar"
21452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21453    break 2
21454  fi
21455done
21456  done
21457IFS=$as_save_IFS
21458
21459fi
21460fi
21461AR=$ac_cv_prog_AR
21462if test -n "$AR"; then
21463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21464$as_echo "$AR" >&6; }
21465else
21466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21467$as_echo "no" >&6; }
21468fi
21469
21470
21471fi
21472if test -z "$ac_cv_prog_AR"; then
21473  ac_ct_AR=$AR
21474  # Extract the first word of "ar", so it can be a program name with args.
21475set dummy ar; ac_word=$2
21476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21477$as_echo_n "checking for $ac_word... " >&6; }
21478if ${ac_cv_prog_ac_ct_AR+:} false; then :
21479  $as_echo_n "(cached) " >&6
21480else
21481  if test -n "$ac_ct_AR"; then
21482  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21483else
21484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21485for as_dir in $PATH
21486do
21487  IFS=$as_save_IFS
21488  test -z "$as_dir" && as_dir=.
21489    for ac_exec_ext in '' $ac_executable_extensions; do
21490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21491    ac_cv_prog_ac_ct_AR="ar"
21492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21493    break 2
21494  fi
21495done
21496  done
21497IFS=$as_save_IFS
21498
21499fi
21500fi
21501ac_ct_AR=$ac_cv_prog_ac_ct_AR
21502if test -n "$ac_ct_AR"; then
21503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21504$as_echo "$ac_ct_AR" >&6; }
21505else
21506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21507$as_echo "no" >&6; }
21508fi
21509
21510  if test "x$ac_ct_AR" = x; then
21511    AR=""
21512  else
21513    case $cross_compiling:$ac_tool_warned in
21514yes:)
21515{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21516$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21517ac_tool_warned=yes ;;
21518esac
21519    AR=$ac_ct_AR
21520  fi
21521else
21522  AR="$ac_cv_prog_AR"
21523fi
21524
21525
21526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21527
21528  # First separate the path from the arguments. This will split at the first
21529  # space.
21530  complete="$AR"
21531  path="${complete%% *}"
21532  tmp="$complete EOL"
21533  arguments="${tmp#* }"
21534
21535  # Input might be given as Windows format, start by converting to
21536  # unix format.
21537  new_path=`$CYGPATH -u "$path"`
21538
21539  # Now try to locate executable using which
21540  new_path=`$WHICH "$new_path" 2> /dev/null`
21541  # bat and cmd files are not always considered executable in cygwin causing which
21542  # to not find them
21543  if test "x$new_path" = x \
21544           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21545           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21546    new_path=`$CYGPATH -u "$path"`
21547  fi
21548  if test "x$new_path" = x; then
21549    # Oops. Which didn't find the executable.
21550    # The splitting of arguments from the executable at a space might have been incorrect,
21551    # since paths with space are more likely in Windows. Give it another try with the whole
21552    # argument.
21553    path="$complete"
21554    arguments="EOL"
21555    new_path=`$CYGPATH -u "$path"`
21556    new_path=`$WHICH "$new_path" 2> /dev/null`
21557    # bat and cmd files are not always considered executable in cygwin causing which
21558    # to not find them
21559    if test "x$new_path" = x \
21560             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21561             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21562      new_path=`$CYGPATH -u "$path"`
21563    fi
21564    if test "x$new_path" = x; then
21565      # It's still not found. Now this is an unrecoverable error.
21566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21567$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21568      has_space=`$ECHO "$complete" | $GREP " "`
21569      if test "x$has_space" != x; then
21570        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21571$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21572      fi
21573      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21574    fi
21575  fi
21576
21577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21580  # "foo.exe" is OK but "foo" is an error.
21581  #
21582  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21583  # It is also a way to make sure we got the proper file name for the real test later on.
21584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21585  if test "x$test_shortpath" = x; then
21586    # Short path failed, file does not exist as specified.
21587    # Try adding .exe or .cmd
21588    if test -f "${new_path}.exe"; then
21589       input_to_shortpath="${new_path}.exe"
21590    elif test -f "${new_path}.cmd"; then
21591       input_to_shortpath="${new_path}.cmd"
21592    else
21593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21594$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21595      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21596$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21597      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21598    fi
21599  else
21600    input_to_shortpath="$new_path"
21601  fi
21602
21603  # Call helper function which possibly converts this using DOS-style short mode.
21604  # If so, the updated path is stored in $new_path.
21605  new_path="$input_to_shortpath"
21606
21607  input_path="$input_to_shortpath"
21608  # Check if we need to convert this using DOS-style short mode. If the path
21609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21610  # take no chances and rewrite it.
21611  # Note: m4 eats our [], so we need to use [ and ] instead.
21612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21613  if test "x$has_forbidden_chars" != x; then
21614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21618      # Going to short mode and back again did indeed matter. Since short mode is
21619      # case insensitive, let's make it lowercase to improve readability.
21620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21621      # Now convert it back to Unix-stile (cygpath)
21622      input_path=`$CYGPATH -u "$shortmode_path"`
21623      new_path="$input_path"
21624    fi
21625  fi
21626
21627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21628  if test "x$test_cygdrive_prefix" = x; then
21629    # As a simple fix, exclude /usr/bin since it's not a real path.
21630    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21632      # a path prefixed by /cygdrive for fixpath to work.
21633      new_path="$CYGWIN_ROOT_PATH$input_path"
21634    fi
21635  fi
21636
21637  # remove trailing .exe if any
21638  new_path="${new_path/%.exe/}"
21639
21640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21641
21642  # First separate the path from the arguments. This will split at the first
21643  # space.
21644  complete="$AR"
21645  path="${complete%% *}"
21646  tmp="$complete EOL"
21647  arguments="${tmp#* }"
21648
21649  # Input might be given as Windows format, start by converting to
21650  # unix format.
21651  new_path="$path"
21652
21653  windows_path="$new_path"
21654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21655    unix_path=`$CYGPATH -u "$windows_path"`
21656    new_path="$unix_path"
21657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21659    new_path="$unix_path"
21660  fi
21661
21662
21663  # Now try to locate executable using which
21664  new_path=`$WHICH "$new_path" 2> /dev/null`
21665
21666  if test "x$new_path" = x; then
21667    # Oops. Which didn't find the executable.
21668    # The splitting of arguments from the executable at a space might have been incorrect,
21669    # since paths with space are more likely in Windows. Give it another try with the whole
21670    # argument.
21671    path="$complete"
21672    arguments="EOL"
21673    new_path="$path"
21674
21675  windows_path="$new_path"
21676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21677    unix_path=`$CYGPATH -u "$windows_path"`
21678    new_path="$unix_path"
21679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21681    new_path="$unix_path"
21682  fi
21683
21684
21685    new_path=`$WHICH "$new_path" 2> /dev/null`
21686
21687    if test "x$new_path" = x; then
21688      # It's still not found. Now this is an unrecoverable error.
21689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21690$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21691      has_space=`$ECHO "$complete" | $GREP " "`
21692      if test "x$has_space" != x; then
21693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21695      fi
21696      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21697    fi
21698  fi
21699
21700  # Now new_path has a complete unix path to the binary
21701  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21702    # Keep paths in /bin as-is, but remove trailing .exe if any
21703    new_path="${new_path/%.exe/}"
21704    # Do not save /bin paths to all_fixpath_prefixes!
21705  else
21706    # Not in mixed or Windows style, start by that.
21707    new_path=`cmd //c echo $new_path`
21708
21709  input_path="$new_path"
21710  # Check if we need to convert this using DOS-style short mode. If the path
21711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21712  # take no chances and rewrite it.
21713  # Note: m4 eats our [], so we need to use [ and ] instead.
21714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21715  if test "x$has_forbidden_chars" != x; then
21716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21718  fi
21719
21720    # Output is in $new_path
21721
21722  windows_path="$new_path"
21723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21724    unix_path=`$CYGPATH -u "$windows_path"`
21725    new_path="$unix_path"
21726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21728    new_path="$unix_path"
21729  fi
21730
21731    # remove trailing .exe if any
21732    new_path="${new_path/%.exe/}"
21733
21734    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21735    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21736  fi
21737
21738  else
21739    # We're on a posix platform. Hooray! :)
21740    # First separate the path from the arguments. This will split at the first
21741    # space.
21742    complete="$AR"
21743    path="${complete%% *}"
21744    tmp="$complete EOL"
21745    arguments="${tmp#* }"
21746
21747    # Cannot rely on the command "which" here since it doesn't always work.
21748    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21749    if test -z "$is_absolute_path"; then
21750      # Path to executable is not absolute. Find it.
21751      IFS_save="$IFS"
21752      IFS=:
21753      for p in $PATH; do
21754        if test -f "$p/$path" && test -x "$p/$path"; then
21755          new_path="$p/$path"
21756          break
21757        fi
21758      done
21759      IFS="$IFS_save"
21760    else
21761      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21762$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21763      new_path="$path"
21764    fi
21765
21766    if test "x$new_path" = x; then
21767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21768$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21769        has_space=`$ECHO "$complete" | $GREP " "`
21770        if test "x$has_space" != x; then
21771          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21772$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21773        fi
21774        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21775      fi
21776  fi
21777
21778      # Now join together the path and the arguments once again
21779      if test "x$arguments" != xEOL; then
21780        new_complete="$new_path ${arguments% *}"
21781      else
21782        new_complete="$new_path"
21783      fi
21784
21785  if test "x$complete" != "x$new_complete"; then
21786      AR="$new_complete"
21787      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21788$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21789    fi
21790
21791fi
21792if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21793    ARFLAGS="-r"
21794else
21795    ARFLAGS=""
21796fi
21797
21798
21799# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21800HOTSPOT_CXX="$CXX"
21801HOTSPOT_LD="$LD"
21802
21803
21804
21805COMPILER_NAME=gcc
21806COMPILER_TYPE=CC
21807if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21808
21809    # For now, assume that we are always compiling using cl.exe.
21810    CC_OUT_OPTION=-Fo
21811    EXE_OUT_OPTION=-out:
21812    LD_OUT_OPTION=-out:
21813    AR_OUT_OPTION=-out:
21814    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21815    # program for something completely different.
21816    # Extract the first word of "link", so it can be a program name with args.
21817set dummy link; ac_word=$2
21818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21819$as_echo_n "checking for $ac_word... " >&6; }
21820if ${ac_cv_prog_WINLD+:} false; then :
21821  $as_echo_n "(cached) " >&6
21822else
21823  if test -n "$WINLD"; then
21824  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21825else
21826  ac_prog_rejected=no
21827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21828for as_dir in $PATH
21829do
21830  IFS=$as_save_IFS
21831  test -z "$as_dir" && as_dir=.
21832    for ac_exec_ext in '' $ac_executable_extensions; do
21833  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21834    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21835       ac_prog_rejected=yes
21836       continue
21837     fi
21838    ac_cv_prog_WINLD="link"
21839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21840    break 2
21841  fi
21842done
21843  done
21844IFS=$as_save_IFS
21845
21846if test $ac_prog_rejected = yes; then
21847  # We found a bogon in the path, so make sure we never use it.
21848  set dummy $ac_cv_prog_WINLD
21849  shift
21850  if test $# != 0; then
21851    # We chose a different compiler from the bogus one.
21852    # However, it has the same basename, so the bogon will be chosen
21853    # first if we set WINLD to just the basename; use the full file name.
21854    shift
21855    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21856  fi
21857fi
21858fi
21859fi
21860WINLD=$ac_cv_prog_WINLD
21861if test -n "$WINLD"; then
21862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21863$as_echo "$WINLD" >&6; }
21864else
21865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21866$as_echo "no" >&6; }
21867fi
21868
21869
21870    # Since we must ignore the first found link, WINLD will contain
21871    # the full path to the link.exe program.
21872
21873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21874
21875  # First separate the path from the arguments. This will split at the first
21876  # space.
21877  complete="$WINLD"
21878  path="${complete%% *}"
21879  tmp="$complete EOL"
21880  arguments="${tmp#* }"
21881
21882  # Input might be given as Windows format, start by converting to
21883  # unix format.
21884  new_path=`$CYGPATH -u "$path"`
21885
21886  # Now try to locate executable using which
21887  new_path=`$WHICH "$new_path" 2> /dev/null`
21888  # bat and cmd files are not always considered executable in cygwin causing which
21889  # to not find them
21890  if test "x$new_path" = x \
21891           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21892           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21893    new_path=`$CYGPATH -u "$path"`
21894  fi
21895  if test "x$new_path" = x; then
21896    # Oops. Which didn't find the executable.
21897    # The splitting of arguments from the executable at a space might have been incorrect,
21898    # since paths with space are more likely in Windows. Give it another try with the whole
21899    # argument.
21900    path="$complete"
21901    arguments="EOL"
21902    new_path=`$CYGPATH -u "$path"`
21903    new_path=`$WHICH "$new_path" 2> /dev/null`
21904    # bat and cmd files are not always considered executable in cygwin causing which
21905    # to not find them
21906    if test "x$new_path" = x \
21907             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21908             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21909      new_path=`$CYGPATH -u "$path"`
21910    fi
21911    if test "x$new_path" = x; then
21912      # It's still not found. Now this is an unrecoverable error.
21913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21914$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21915      has_space=`$ECHO "$complete" | $GREP " "`
21916      if test "x$has_space" != x; then
21917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21919      fi
21920      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21921    fi
21922  fi
21923
21924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21927  # "foo.exe" is OK but "foo" is an error.
21928  #
21929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21930  # It is also a way to make sure we got the proper file name for the real test later on.
21931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21932  if test "x$test_shortpath" = x; then
21933    # Short path failed, file does not exist as specified.
21934    # Try adding .exe or .cmd
21935    if test -f "${new_path}.exe"; then
21936       input_to_shortpath="${new_path}.exe"
21937    elif test -f "${new_path}.cmd"; then
21938       input_to_shortpath="${new_path}.cmd"
21939    else
21940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21941$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21942      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21943$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21944      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21945    fi
21946  else
21947    input_to_shortpath="$new_path"
21948  fi
21949
21950  # Call helper function which possibly converts this using DOS-style short mode.
21951  # If so, the updated path is stored in $new_path.
21952  new_path="$input_to_shortpath"
21953
21954  input_path="$input_to_shortpath"
21955  # Check if we need to convert this using DOS-style short mode. If the path
21956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21957  # take no chances and rewrite it.
21958  # Note: m4 eats our [], so we need to use [ and ] instead.
21959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21960  if test "x$has_forbidden_chars" != x; then
21961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21965      # Going to short mode and back again did indeed matter. Since short mode is
21966      # case insensitive, let's make it lowercase to improve readability.
21967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21968      # Now convert it back to Unix-stile (cygpath)
21969      input_path=`$CYGPATH -u "$shortmode_path"`
21970      new_path="$input_path"
21971    fi
21972  fi
21973
21974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21975  if test "x$test_cygdrive_prefix" = x; then
21976    # As a simple fix, exclude /usr/bin since it's not a real path.
21977    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21979      # a path prefixed by /cygdrive for fixpath to work.
21980      new_path="$CYGWIN_ROOT_PATH$input_path"
21981    fi
21982  fi
21983
21984  # remove trailing .exe if any
21985  new_path="${new_path/%.exe/}"
21986
21987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21988
21989  # First separate the path from the arguments. This will split at the first
21990  # space.
21991  complete="$WINLD"
21992  path="${complete%% *}"
21993  tmp="$complete EOL"
21994  arguments="${tmp#* }"
21995
21996  # Input might be given as Windows format, start by converting to
21997  # unix format.
21998  new_path="$path"
21999
22000  windows_path="$new_path"
22001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22002    unix_path=`$CYGPATH -u "$windows_path"`
22003    new_path="$unix_path"
22004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22006    new_path="$unix_path"
22007  fi
22008
22009
22010  # Now try to locate executable using which
22011  new_path=`$WHICH "$new_path" 2> /dev/null`
22012
22013  if test "x$new_path" = x; then
22014    # Oops. Which didn't find the executable.
22015    # The splitting of arguments from the executable at a space might have been incorrect,
22016    # since paths with space are more likely in Windows. Give it another try with the whole
22017    # argument.
22018    path="$complete"
22019    arguments="EOL"
22020    new_path="$path"
22021
22022  windows_path="$new_path"
22023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22024    unix_path=`$CYGPATH -u "$windows_path"`
22025    new_path="$unix_path"
22026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22028    new_path="$unix_path"
22029  fi
22030
22031
22032    new_path=`$WHICH "$new_path" 2> /dev/null`
22033
22034    if test "x$new_path" = x; then
22035      # It's still not found. Now this is an unrecoverable error.
22036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22037$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22038      has_space=`$ECHO "$complete" | $GREP " "`
22039      if test "x$has_space" != x; then
22040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22042      fi
22043      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22044    fi
22045  fi
22046
22047  # Now new_path has a complete unix path to the binary
22048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22049    # Keep paths in /bin as-is, but remove trailing .exe if any
22050    new_path="${new_path/%.exe/}"
22051    # Do not save /bin paths to all_fixpath_prefixes!
22052  else
22053    # Not in mixed or Windows style, start by that.
22054    new_path=`cmd //c echo $new_path`
22055
22056  input_path="$new_path"
22057  # Check if we need to convert this using DOS-style short mode. If the path
22058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22059  # take no chances and rewrite it.
22060  # Note: m4 eats our [], so we need to use [ and ] instead.
22061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22062  if test "x$has_forbidden_chars" != x; then
22063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22065  fi
22066
22067    # Output is in $new_path
22068
22069  windows_path="$new_path"
22070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22071    unix_path=`$CYGPATH -u "$windows_path"`
22072    new_path="$unix_path"
22073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22075    new_path="$unix_path"
22076  fi
22077
22078    # remove trailing .exe if any
22079    new_path="${new_path/%.exe/}"
22080
22081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22083  fi
22084
22085  else
22086    # We're on a posix platform. Hooray! :)
22087    # First separate the path from the arguments. This will split at the first
22088    # space.
22089    complete="$WINLD"
22090    path="${complete%% *}"
22091    tmp="$complete EOL"
22092    arguments="${tmp#* }"
22093
22094    # Cannot rely on the command "which" here since it doesn't always work.
22095    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22096    if test -z "$is_absolute_path"; then
22097      # Path to executable is not absolute. Find it.
22098      IFS_save="$IFS"
22099      IFS=:
22100      for p in $PATH; do
22101        if test -f "$p/$path" && test -x "$p/$path"; then
22102          new_path="$p/$path"
22103          break
22104        fi
22105      done
22106      IFS="$IFS_save"
22107    else
22108      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22109$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22110      new_path="$path"
22111    fi
22112
22113    if test "x$new_path" = x; then
22114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22115$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22116        has_space=`$ECHO "$complete" | $GREP " "`
22117        if test "x$has_space" != x; then
22118          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22119$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22120        fi
22121        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22122      fi
22123  fi
22124
22125      # Now join together the path and the arguments once again
22126      if test "x$arguments" != xEOL; then
22127        new_complete="$new_path ${arguments% *}"
22128      else
22129        new_complete="$new_path"
22130      fi
22131
22132  if test "x$complete" != "x$new_complete"; then
22133      WINLD="$new_complete"
22134      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22135$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22136    fi
22137
22138    printf "Windows linker was found at $WINLD\n"
22139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22140$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22141    "$WINLD" --version > /dev/null
22142    if test $? -eq 0 ; then
22143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22144$as_echo "no" >&6; }
22145      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22146    else
22147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22148$as_echo "yes" >&6; }
22149    fi
22150    LD="$WINLD"
22151    LDEXE="$WINLD"
22152    LDCXX="$WINLD"
22153    LDEXECXX="$WINLD"
22154
22155    # Extract the first word of "mt", so it can be a program name with args.
22156set dummy mt; ac_word=$2
22157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22158$as_echo_n "checking for $ac_word... " >&6; }
22159if ${ac_cv_prog_MT+:} false; then :
22160  $as_echo_n "(cached) " >&6
22161else
22162  if test -n "$MT"; then
22163  ac_cv_prog_MT="$MT" # Let the user override the test.
22164else
22165  ac_prog_rejected=no
22166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22167for as_dir in $PATH
22168do
22169  IFS=$as_save_IFS
22170  test -z "$as_dir" && as_dir=.
22171    for ac_exec_ext in '' $ac_executable_extensions; do
22172  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22173    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22174       ac_prog_rejected=yes
22175       continue
22176     fi
22177    ac_cv_prog_MT="mt"
22178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22179    break 2
22180  fi
22181done
22182  done
22183IFS=$as_save_IFS
22184
22185if test $ac_prog_rejected = yes; then
22186  # We found a bogon in the path, so make sure we never use it.
22187  set dummy $ac_cv_prog_MT
22188  shift
22189  if test $# != 0; then
22190    # We chose a different compiler from the bogus one.
22191    # However, it has the same basename, so the bogon will be chosen
22192    # first if we set MT to just the basename; use the full file name.
22193    shift
22194    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22195  fi
22196fi
22197fi
22198fi
22199MT=$ac_cv_prog_MT
22200if test -n "$MT"; then
22201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22202$as_echo "$MT" >&6; }
22203else
22204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22205$as_echo "no" >&6; }
22206fi
22207
22208
22209
22210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22211
22212  # First separate the path from the arguments. This will split at the first
22213  # space.
22214  complete="$MT"
22215  path="${complete%% *}"
22216  tmp="$complete EOL"
22217  arguments="${tmp#* }"
22218
22219  # Input might be given as Windows format, start by converting to
22220  # unix format.
22221  new_path=`$CYGPATH -u "$path"`
22222
22223  # Now try to locate executable using which
22224  new_path=`$WHICH "$new_path" 2> /dev/null`
22225  # bat and cmd files are not always considered executable in cygwin causing which
22226  # to not find them
22227  if test "x$new_path" = x \
22228           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22229           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22230    new_path=`$CYGPATH -u "$path"`
22231  fi
22232  if test "x$new_path" = x; then
22233    # Oops. Which didn't find the executable.
22234    # The splitting of arguments from the executable at a space might have been incorrect,
22235    # since paths with space are more likely in Windows. Give it another try with the whole
22236    # argument.
22237    path="$complete"
22238    arguments="EOL"
22239    new_path=`$CYGPATH -u "$path"`
22240    new_path=`$WHICH "$new_path" 2> /dev/null`
22241    # bat and cmd files are not always considered executable in cygwin causing which
22242    # to not find them
22243    if test "x$new_path" = x \
22244             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22245             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22246      new_path=`$CYGPATH -u "$path"`
22247    fi
22248    if test "x$new_path" = x; then
22249      # It's still not found. Now this is an unrecoverable error.
22250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22251$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22252      has_space=`$ECHO "$complete" | $GREP " "`
22253      if test "x$has_space" != x; then
22254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22256      fi
22257      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22258    fi
22259  fi
22260
22261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22264  # "foo.exe" is OK but "foo" is an error.
22265  #
22266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22267  # It is also a way to make sure we got the proper file name for the real test later on.
22268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22269  if test "x$test_shortpath" = x; then
22270    # Short path failed, file does not exist as specified.
22271    # Try adding .exe or .cmd
22272    if test -f "${new_path}.exe"; then
22273       input_to_shortpath="${new_path}.exe"
22274    elif test -f "${new_path}.cmd"; then
22275       input_to_shortpath="${new_path}.cmd"
22276    else
22277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22278$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22279      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22280$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22281      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22282    fi
22283  else
22284    input_to_shortpath="$new_path"
22285  fi
22286
22287  # Call helper function which possibly converts this using DOS-style short mode.
22288  # If so, the updated path is stored in $new_path.
22289  new_path="$input_to_shortpath"
22290
22291  input_path="$input_to_shortpath"
22292  # Check if we need to convert this using DOS-style short mode. If the path
22293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22294  # take no chances and rewrite it.
22295  # Note: m4 eats our [], so we need to use [ and ] instead.
22296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22297  if test "x$has_forbidden_chars" != x; then
22298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22302      # Going to short mode and back again did indeed matter. Since short mode is
22303      # case insensitive, let's make it lowercase to improve readability.
22304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22305      # Now convert it back to Unix-stile (cygpath)
22306      input_path=`$CYGPATH -u "$shortmode_path"`
22307      new_path="$input_path"
22308    fi
22309  fi
22310
22311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22312  if test "x$test_cygdrive_prefix" = x; then
22313    # As a simple fix, exclude /usr/bin since it's not a real path.
22314    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22316      # a path prefixed by /cygdrive for fixpath to work.
22317      new_path="$CYGWIN_ROOT_PATH$input_path"
22318    fi
22319  fi
22320
22321  # remove trailing .exe if any
22322  new_path="${new_path/%.exe/}"
22323
22324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22325
22326  # First separate the path from the arguments. This will split at the first
22327  # space.
22328  complete="$MT"
22329  path="${complete%% *}"
22330  tmp="$complete EOL"
22331  arguments="${tmp#* }"
22332
22333  # Input might be given as Windows format, start by converting to
22334  # unix format.
22335  new_path="$path"
22336
22337  windows_path="$new_path"
22338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22339    unix_path=`$CYGPATH -u "$windows_path"`
22340    new_path="$unix_path"
22341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22343    new_path="$unix_path"
22344  fi
22345
22346
22347  # Now try to locate executable using which
22348  new_path=`$WHICH "$new_path" 2> /dev/null`
22349
22350  if test "x$new_path" = x; then
22351    # Oops. Which didn't find the executable.
22352    # The splitting of arguments from the executable at a space might have been incorrect,
22353    # since paths with space are more likely in Windows. Give it another try with the whole
22354    # argument.
22355    path="$complete"
22356    arguments="EOL"
22357    new_path="$path"
22358
22359  windows_path="$new_path"
22360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22361    unix_path=`$CYGPATH -u "$windows_path"`
22362    new_path="$unix_path"
22363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22365    new_path="$unix_path"
22366  fi
22367
22368
22369    new_path=`$WHICH "$new_path" 2> /dev/null`
22370
22371    if test "x$new_path" = x; then
22372      # It's still not found. Now this is an unrecoverable error.
22373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22374$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22375      has_space=`$ECHO "$complete" | $GREP " "`
22376      if test "x$has_space" != x; then
22377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22379      fi
22380      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22381    fi
22382  fi
22383
22384  # Now new_path has a complete unix path to the binary
22385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22386    # Keep paths in /bin as-is, but remove trailing .exe if any
22387    new_path="${new_path/%.exe/}"
22388    # Do not save /bin paths to all_fixpath_prefixes!
22389  else
22390    # Not in mixed or Windows style, start by that.
22391    new_path=`cmd //c echo $new_path`
22392
22393  input_path="$new_path"
22394  # Check if we need to convert this using DOS-style short mode. If the path
22395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22396  # take no chances and rewrite it.
22397  # Note: m4 eats our [], so we need to use [ and ] instead.
22398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22399  if test "x$has_forbidden_chars" != x; then
22400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22402  fi
22403
22404    # Output is in $new_path
22405
22406  windows_path="$new_path"
22407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22408    unix_path=`$CYGPATH -u "$windows_path"`
22409    new_path="$unix_path"
22410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22412    new_path="$unix_path"
22413  fi
22414
22415    # remove trailing .exe if any
22416    new_path="${new_path/%.exe/}"
22417
22418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22420  fi
22421
22422  else
22423    # We're on a posix platform. Hooray! :)
22424    # First separate the path from the arguments. This will split at the first
22425    # space.
22426    complete="$MT"
22427    path="${complete%% *}"
22428    tmp="$complete EOL"
22429    arguments="${tmp#* }"
22430
22431    # Cannot rely on the command "which" here since it doesn't always work.
22432    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22433    if test -z "$is_absolute_path"; then
22434      # Path to executable is not absolute. Find it.
22435      IFS_save="$IFS"
22436      IFS=:
22437      for p in $PATH; do
22438        if test -f "$p/$path" && test -x "$p/$path"; then
22439          new_path="$p/$path"
22440          break
22441        fi
22442      done
22443      IFS="$IFS_save"
22444    else
22445      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22446$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22447      new_path="$path"
22448    fi
22449
22450    if test "x$new_path" = x; then
22451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22452$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22453        has_space=`$ECHO "$complete" | $GREP " "`
22454        if test "x$has_space" != x; then
22455          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22457        fi
22458        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22459      fi
22460  fi
22461
22462      # Now join together the path and the arguments once again
22463      if test "x$arguments" != xEOL; then
22464        new_complete="$new_path ${arguments% *}"
22465      else
22466        new_complete="$new_path"
22467      fi
22468
22469  if test "x$complete" != "x$new_complete"; then
22470      MT="$new_complete"
22471      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22472$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22473    fi
22474
22475    # The resource compiler
22476    # Extract the first word of "rc", so it can be a program name with args.
22477set dummy rc; ac_word=$2
22478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22479$as_echo_n "checking for $ac_word... " >&6; }
22480if ${ac_cv_prog_RC+:} false; then :
22481  $as_echo_n "(cached) " >&6
22482else
22483  if test -n "$RC"; then
22484  ac_cv_prog_RC="$RC" # Let the user override the test.
22485else
22486  ac_prog_rejected=no
22487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22488for as_dir in $PATH
22489do
22490  IFS=$as_save_IFS
22491  test -z "$as_dir" && as_dir=.
22492    for ac_exec_ext in '' $ac_executable_extensions; do
22493  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22494    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22495       ac_prog_rejected=yes
22496       continue
22497     fi
22498    ac_cv_prog_RC="rc"
22499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22500    break 2
22501  fi
22502done
22503  done
22504IFS=$as_save_IFS
22505
22506if test $ac_prog_rejected = yes; then
22507  # We found a bogon in the path, so make sure we never use it.
22508  set dummy $ac_cv_prog_RC
22509  shift
22510  if test $# != 0; then
22511    # We chose a different compiler from the bogus one.
22512    # However, it has the same basename, so the bogon will be chosen
22513    # first if we set RC to just the basename; use the full file name.
22514    shift
22515    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22516  fi
22517fi
22518fi
22519fi
22520RC=$ac_cv_prog_RC
22521if test -n "$RC"; then
22522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22523$as_echo "$RC" >&6; }
22524else
22525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22526$as_echo "no" >&6; }
22527fi
22528
22529
22530
22531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22532
22533  # First separate the path from the arguments. This will split at the first
22534  # space.
22535  complete="$RC"
22536  path="${complete%% *}"
22537  tmp="$complete EOL"
22538  arguments="${tmp#* }"
22539
22540  # Input might be given as Windows format, start by converting to
22541  # unix format.
22542  new_path=`$CYGPATH -u "$path"`
22543
22544  # Now try to locate executable using which
22545  new_path=`$WHICH "$new_path" 2> /dev/null`
22546  # bat and cmd files are not always considered executable in cygwin causing which
22547  # to not find them
22548  if test "x$new_path" = x \
22549           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22550           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22551    new_path=`$CYGPATH -u "$path"`
22552  fi
22553  if test "x$new_path" = x; then
22554    # Oops. Which didn't find the executable.
22555    # The splitting of arguments from the executable at a space might have been incorrect,
22556    # since paths with space are more likely in Windows. Give it another try with the whole
22557    # argument.
22558    path="$complete"
22559    arguments="EOL"
22560    new_path=`$CYGPATH -u "$path"`
22561    new_path=`$WHICH "$new_path" 2> /dev/null`
22562    # bat and cmd files are not always considered executable in cygwin causing which
22563    # to not find them
22564    if test "x$new_path" = x \
22565             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22566             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22567      new_path=`$CYGPATH -u "$path"`
22568    fi
22569    if test "x$new_path" = x; then
22570      # It's still not found. Now this is an unrecoverable error.
22571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22572$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22573      has_space=`$ECHO "$complete" | $GREP " "`
22574      if test "x$has_space" != x; then
22575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22577      fi
22578      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22579    fi
22580  fi
22581
22582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22585  # "foo.exe" is OK but "foo" is an error.
22586  #
22587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22588  # It is also a way to make sure we got the proper file name for the real test later on.
22589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22590  if test "x$test_shortpath" = x; then
22591    # Short path failed, file does not exist as specified.
22592    # Try adding .exe or .cmd
22593    if test -f "${new_path}.exe"; then
22594       input_to_shortpath="${new_path}.exe"
22595    elif test -f "${new_path}.cmd"; then
22596       input_to_shortpath="${new_path}.cmd"
22597    else
22598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22599$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22600      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22601$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22602      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22603    fi
22604  else
22605    input_to_shortpath="$new_path"
22606  fi
22607
22608  # Call helper function which possibly converts this using DOS-style short mode.
22609  # If so, the updated path is stored in $new_path.
22610  new_path="$input_to_shortpath"
22611
22612  input_path="$input_to_shortpath"
22613  # Check if we need to convert this using DOS-style short mode. If the path
22614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22615  # take no chances and rewrite it.
22616  # Note: m4 eats our [], so we need to use [ and ] instead.
22617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22618  if test "x$has_forbidden_chars" != x; then
22619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22623      # Going to short mode and back again did indeed matter. Since short mode is
22624      # case insensitive, let's make it lowercase to improve readability.
22625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22626      # Now convert it back to Unix-stile (cygpath)
22627      input_path=`$CYGPATH -u "$shortmode_path"`
22628      new_path="$input_path"
22629    fi
22630  fi
22631
22632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22633  if test "x$test_cygdrive_prefix" = x; then
22634    # As a simple fix, exclude /usr/bin since it's not a real path.
22635    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22637      # a path prefixed by /cygdrive for fixpath to work.
22638      new_path="$CYGWIN_ROOT_PATH$input_path"
22639    fi
22640  fi
22641
22642  # remove trailing .exe if any
22643  new_path="${new_path/%.exe/}"
22644
22645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22646
22647  # First separate the path from the arguments. This will split at the first
22648  # space.
22649  complete="$RC"
22650  path="${complete%% *}"
22651  tmp="$complete EOL"
22652  arguments="${tmp#* }"
22653
22654  # Input might be given as Windows format, start by converting to
22655  # unix format.
22656  new_path="$path"
22657
22658  windows_path="$new_path"
22659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22660    unix_path=`$CYGPATH -u "$windows_path"`
22661    new_path="$unix_path"
22662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22664    new_path="$unix_path"
22665  fi
22666
22667
22668  # Now try to locate executable using which
22669  new_path=`$WHICH "$new_path" 2> /dev/null`
22670
22671  if test "x$new_path" = x; then
22672    # Oops. Which didn't find the executable.
22673    # The splitting of arguments from the executable at a space might have been incorrect,
22674    # since paths with space are more likely in Windows. Give it another try with the whole
22675    # argument.
22676    path="$complete"
22677    arguments="EOL"
22678    new_path="$path"
22679
22680  windows_path="$new_path"
22681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22682    unix_path=`$CYGPATH -u "$windows_path"`
22683    new_path="$unix_path"
22684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22686    new_path="$unix_path"
22687  fi
22688
22689
22690    new_path=`$WHICH "$new_path" 2> /dev/null`
22691
22692    if test "x$new_path" = x; then
22693      # It's still not found. Now this is an unrecoverable error.
22694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22695$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22696      has_space=`$ECHO "$complete" | $GREP " "`
22697      if test "x$has_space" != x; then
22698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22700      fi
22701      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22702    fi
22703  fi
22704
22705  # Now new_path has a complete unix path to the binary
22706  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22707    # Keep paths in /bin as-is, but remove trailing .exe if any
22708    new_path="${new_path/%.exe/}"
22709    # Do not save /bin paths to all_fixpath_prefixes!
22710  else
22711    # Not in mixed or Windows style, start by that.
22712    new_path=`cmd //c echo $new_path`
22713
22714  input_path="$new_path"
22715  # Check if we need to convert this using DOS-style short mode. If the path
22716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22717  # take no chances and rewrite it.
22718  # Note: m4 eats our [], so we need to use [ and ] instead.
22719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22720  if test "x$has_forbidden_chars" != x; then
22721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22723  fi
22724
22725    # Output is in $new_path
22726
22727  windows_path="$new_path"
22728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22729    unix_path=`$CYGPATH -u "$windows_path"`
22730    new_path="$unix_path"
22731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22733    new_path="$unix_path"
22734  fi
22735
22736    # remove trailing .exe if any
22737    new_path="${new_path/%.exe/}"
22738
22739    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22740    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22741  fi
22742
22743  else
22744    # We're on a posix platform. Hooray! :)
22745    # First separate the path from the arguments. This will split at the first
22746    # space.
22747    complete="$RC"
22748    path="${complete%% *}"
22749    tmp="$complete EOL"
22750    arguments="${tmp#* }"
22751
22752    # Cannot rely on the command "which" here since it doesn't always work.
22753    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22754    if test -z "$is_absolute_path"; then
22755      # Path to executable is not absolute. Find it.
22756      IFS_save="$IFS"
22757      IFS=:
22758      for p in $PATH; do
22759        if test -f "$p/$path" && test -x "$p/$path"; then
22760          new_path="$p/$path"
22761          break
22762        fi
22763      done
22764      IFS="$IFS_save"
22765    else
22766      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22767$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22768      new_path="$path"
22769    fi
22770
22771    if test "x$new_path" = x; then
22772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22773$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22774        has_space=`$ECHO "$complete" | $GREP " "`
22775        if test "x$has_space" != x; then
22776          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22777$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22778        fi
22779        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22780      fi
22781  fi
22782
22783      # Now join together the path and the arguments once again
22784      if test "x$arguments" != xEOL; then
22785        new_complete="$new_path ${arguments% *}"
22786      else
22787        new_complete="$new_path"
22788      fi
22789
22790  if test "x$complete" != "x$new_complete"; then
22791      RC="$new_complete"
22792      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22793$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22794    fi
22795
22796
22797    # For hotspot, we need these in Windows mixed path,
22798    # so rewrite them all. Need added .exe suffix.
22799    HOTSPOT_CXX="$CXX.exe"
22800    HOTSPOT_LD="$LD.exe"
22801    HOTSPOT_MT="$MT.exe"
22802    HOTSPOT_RC="$RC.exe"
22803
22804  unix_path="$HOTSPOT_CXX"
22805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22806    windows_path=`$CYGPATH -m "$unix_path"`
22807    HOTSPOT_CXX="$windows_path"
22808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22809    windows_path=`cmd //c echo $unix_path`
22810    HOTSPOT_CXX="$windows_path"
22811  fi
22812
22813
22814  unix_path="$HOTSPOT_LD"
22815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22816    windows_path=`$CYGPATH -m "$unix_path"`
22817    HOTSPOT_LD="$windows_path"
22818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22819    windows_path=`cmd //c echo $unix_path`
22820    HOTSPOT_LD="$windows_path"
22821  fi
22822
22823
22824  unix_path="$HOTSPOT_MT"
22825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22826    windows_path=`$CYGPATH -m "$unix_path"`
22827    HOTSPOT_MT="$windows_path"
22828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22829    windows_path=`cmd //c echo $unix_path`
22830    HOTSPOT_MT="$windows_path"
22831  fi
22832
22833
22834  unix_path="$HOTSPOT_RC"
22835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22836    windows_path=`$CYGPATH -m "$unix_path"`
22837    HOTSPOT_RC="$windows_path"
22838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22839    windows_path=`cmd //c echo $unix_path`
22840    HOTSPOT_RC="$windows_path"
22841  fi
22842
22843
22844
22845
22846    RC_FLAGS="-nologo -l 0x409 -r"
22847    if test "x$VARIANT" = xOPT; then :
22848
22849        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22850
22851fi
22852    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22853    if test "x$JDK_UPDATE_VERSION" = x; then :
22854
22855        JDK_UPDATE_VERSION_NOTNULL=0
22856
22857fi
22858    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22859    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22860    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22861    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22862    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22863    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22864    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22865
22866    # lib.exe is used to create static libraries.
22867    # Extract the first word of "lib", so it can be a program name with args.
22868set dummy lib; ac_word=$2
22869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22870$as_echo_n "checking for $ac_word... " >&6; }
22871if ${ac_cv_prog_WINAR+:} false; then :
22872  $as_echo_n "(cached) " >&6
22873else
22874  if test -n "$WINAR"; then
22875  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22876else
22877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22878for as_dir in $PATH
22879do
22880  IFS=$as_save_IFS
22881  test -z "$as_dir" && as_dir=.
22882    for ac_exec_ext in '' $ac_executable_extensions; do
22883  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22884    ac_cv_prog_WINAR="lib"
22885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22886    break 2
22887  fi
22888done
22889  done
22890IFS=$as_save_IFS
22891
22892fi
22893fi
22894WINAR=$ac_cv_prog_WINAR
22895if test -n "$WINAR"; then
22896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22897$as_echo "$WINAR" >&6; }
22898else
22899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22900$as_echo "no" >&6; }
22901fi
22902
22903
22904
22905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22906
22907  # First separate the path from the arguments. This will split at the first
22908  # space.
22909  complete="$WINAR"
22910  path="${complete%% *}"
22911  tmp="$complete EOL"
22912  arguments="${tmp#* }"
22913
22914  # Input might be given as Windows format, start by converting to
22915  # unix format.
22916  new_path=`$CYGPATH -u "$path"`
22917
22918  # Now try to locate executable using which
22919  new_path=`$WHICH "$new_path" 2> /dev/null`
22920  # bat and cmd files are not always considered executable in cygwin causing which
22921  # to not find them
22922  if test "x$new_path" = x \
22923           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22924           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22925    new_path=`$CYGPATH -u "$path"`
22926  fi
22927  if test "x$new_path" = x; then
22928    # Oops. Which didn't find the executable.
22929    # The splitting of arguments from the executable at a space might have been incorrect,
22930    # since paths with space are more likely in Windows. Give it another try with the whole
22931    # argument.
22932    path="$complete"
22933    arguments="EOL"
22934    new_path=`$CYGPATH -u "$path"`
22935    new_path=`$WHICH "$new_path" 2> /dev/null`
22936    # bat and cmd files are not always considered executable in cygwin causing which
22937    # to not find them
22938    if test "x$new_path" = x \
22939             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22940             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22941      new_path=`$CYGPATH -u "$path"`
22942    fi
22943    if test "x$new_path" = x; then
22944      # It's still not found. Now this is an unrecoverable error.
22945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22946$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22947      has_space=`$ECHO "$complete" | $GREP " "`
22948      if test "x$has_space" != x; then
22949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22951      fi
22952      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22953    fi
22954  fi
22955
22956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22959  # "foo.exe" is OK but "foo" is an error.
22960  #
22961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22962  # It is also a way to make sure we got the proper file name for the real test later on.
22963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22964  if test "x$test_shortpath" = x; then
22965    # Short path failed, file does not exist as specified.
22966    # Try adding .exe or .cmd
22967    if test -f "${new_path}.exe"; then
22968       input_to_shortpath="${new_path}.exe"
22969    elif test -f "${new_path}.cmd"; then
22970       input_to_shortpath="${new_path}.cmd"
22971    else
22972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22973$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22974      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22975$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22976      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22977    fi
22978  else
22979    input_to_shortpath="$new_path"
22980  fi
22981
22982  # Call helper function which possibly converts this using DOS-style short mode.
22983  # If so, the updated path is stored in $new_path.
22984  new_path="$input_to_shortpath"
22985
22986  input_path="$input_to_shortpath"
22987  # Check if we need to convert this using DOS-style short mode. If the path
22988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22989  # take no chances and rewrite it.
22990  # Note: m4 eats our [], so we need to use [ and ] instead.
22991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22992  if test "x$has_forbidden_chars" != x; then
22993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22997      # Going to short mode and back again did indeed matter. Since short mode is
22998      # case insensitive, let's make it lowercase to improve readability.
22999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23000      # Now convert it back to Unix-stile (cygpath)
23001      input_path=`$CYGPATH -u "$shortmode_path"`
23002      new_path="$input_path"
23003    fi
23004  fi
23005
23006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23007  if test "x$test_cygdrive_prefix" = x; then
23008    # As a simple fix, exclude /usr/bin since it's not a real path.
23009    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23011      # a path prefixed by /cygdrive for fixpath to work.
23012      new_path="$CYGWIN_ROOT_PATH$input_path"
23013    fi
23014  fi
23015
23016  # remove trailing .exe if any
23017  new_path="${new_path/%.exe/}"
23018
23019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23020
23021  # First separate the path from the arguments. This will split at the first
23022  # space.
23023  complete="$WINAR"
23024  path="${complete%% *}"
23025  tmp="$complete EOL"
23026  arguments="${tmp#* }"
23027
23028  # Input might be given as Windows format, start by converting to
23029  # unix format.
23030  new_path="$path"
23031
23032  windows_path="$new_path"
23033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23034    unix_path=`$CYGPATH -u "$windows_path"`
23035    new_path="$unix_path"
23036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23038    new_path="$unix_path"
23039  fi
23040
23041
23042  # Now try to locate executable using which
23043  new_path=`$WHICH "$new_path" 2> /dev/null`
23044
23045  if test "x$new_path" = x; then
23046    # Oops. Which didn't find the executable.
23047    # The splitting of arguments from the executable at a space might have been incorrect,
23048    # since paths with space are more likely in Windows. Give it another try with the whole
23049    # argument.
23050    path="$complete"
23051    arguments="EOL"
23052    new_path="$path"
23053
23054  windows_path="$new_path"
23055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23056    unix_path=`$CYGPATH -u "$windows_path"`
23057    new_path="$unix_path"
23058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23060    new_path="$unix_path"
23061  fi
23062
23063
23064    new_path=`$WHICH "$new_path" 2> /dev/null`
23065
23066    if test "x$new_path" = x; then
23067      # It's still not found. Now this is an unrecoverable error.
23068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23069$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23070      has_space=`$ECHO "$complete" | $GREP " "`
23071      if test "x$has_space" != x; then
23072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23074      fi
23075      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23076    fi
23077  fi
23078
23079  # Now new_path has a complete unix path to the binary
23080  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23081    # Keep paths in /bin as-is, but remove trailing .exe if any
23082    new_path="${new_path/%.exe/}"
23083    # Do not save /bin paths to all_fixpath_prefixes!
23084  else
23085    # Not in mixed or Windows style, start by that.
23086    new_path=`cmd //c echo $new_path`
23087
23088  input_path="$new_path"
23089  # Check if we need to convert this using DOS-style short mode. If the path
23090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23091  # take no chances and rewrite it.
23092  # Note: m4 eats our [], so we need to use [ and ] instead.
23093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23094  if test "x$has_forbidden_chars" != x; then
23095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23097  fi
23098
23099    # Output is in $new_path
23100
23101  windows_path="$new_path"
23102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23103    unix_path=`$CYGPATH -u "$windows_path"`
23104    new_path="$unix_path"
23105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23107    new_path="$unix_path"
23108  fi
23109
23110    # remove trailing .exe if any
23111    new_path="${new_path/%.exe/}"
23112
23113    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23114    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23115  fi
23116
23117  else
23118    # We're on a posix platform. Hooray! :)
23119    # First separate the path from the arguments. This will split at the first
23120    # space.
23121    complete="$WINAR"
23122    path="${complete%% *}"
23123    tmp="$complete EOL"
23124    arguments="${tmp#* }"
23125
23126    # Cannot rely on the command "which" here since it doesn't always work.
23127    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23128    if test -z "$is_absolute_path"; then
23129      # Path to executable is not absolute. Find it.
23130      IFS_save="$IFS"
23131      IFS=:
23132      for p in $PATH; do
23133        if test -f "$p/$path" && test -x "$p/$path"; then
23134          new_path="$p/$path"
23135          break
23136        fi
23137      done
23138      IFS="$IFS_save"
23139    else
23140      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23141$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23142      new_path="$path"
23143    fi
23144
23145    if test "x$new_path" = x; then
23146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23147$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23148        has_space=`$ECHO "$complete" | $GREP " "`
23149        if test "x$has_space" != x; then
23150          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23151$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23152        fi
23153        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23154      fi
23155  fi
23156
23157      # Now join together the path and the arguments once again
23158      if test "x$arguments" != xEOL; then
23159        new_complete="$new_path ${arguments% *}"
23160      else
23161        new_complete="$new_path"
23162      fi
23163
23164  if test "x$complete" != "x$new_complete"; then
23165      WINAR="$new_complete"
23166      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23167$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23168    fi
23169
23170    AR="$WINAR"
23171    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23172
23173    # Extract the first word of "dumpbin", so it can be a program name with args.
23174set dummy dumpbin; ac_word=$2
23175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23176$as_echo_n "checking for $ac_word... " >&6; }
23177if ${ac_cv_prog_DUMPBIN+:} false; then :
23178  $as_echo_n "(cached) " >&6
23179else
23180  if test -n "$DUMPBIN"; then
23181  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23182else
23183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23184for as_dir in $PATH
23185do
23186  IFS=$as_save_IFS
23187  test -z "$as_dir" && as_dir=.
23188    for ac_exec_ext in '' $ac_executable_extensions; do
23189  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23190    ac_cv_prog_DUMPBIN="dumpbin"
23191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23192    break 2
23193  fi
23194done
23195  done
23196IFS=$as_save_IFS
23197
23198fi
23199fi
23200DUMPBIN=$ac_cv_prog_DUMPBIN
23201if test -n "$DUMPBIN"; then
23202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23203$as_echo "$DUMPBIN" >&6; }
23204else
23205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23206$as_echo "no" >&6; }
23207fi
23208
23209
23210
23211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23212
23213  # First separate the path from the arguments. This will split at the first
23214  # space.
23215  complete="$DUMPBIN"
23216  path="${complete%% *}"
23217  tmp="$complete EOL"
23218  arguments="${tmp#* }"
23219
23220  # Input might be given as Windows format, start by converting to
23221  # unix format.
23222  new_path=`$CYGPATH -u "$path"`
23223
23224  # Now try to locate executable using which
23225  new_path=`$WHICH "$new_path" 2> /dev/null`
23226  # bat and cmd files are not always considered executable in cygwin causing which
23227  # to not find them
23228  if test "x$new_path" = x \
23229           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23230           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23231    new_path=`$CYGPATH -u "$path"`
23232  fi
23233  if test "x$new_path" = x; then
23234    # Oops. Which didn't find the executable.
23235    # The splitting of arguments from the executable at a space might have been incorrect,
23236    # since paths with space are more likely in Windows. Give it another try with the whole
23237    # argument.
23238    path="$complete"
23239    arguments="EOL"
23240    new_path=`$CYGPATH -u "$path"`
23241    new_path=`$WHICH "$new_path" 2> /dev/null`
23242    # bat and cmd files are not always considered executable in cygwin causing which
23243    # to not find them
23244    if test "x$new_path" = x \
23245             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23246             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23247      new_path=`$CYGPATH -u "$path"`
23248    fi
23249    if test "x$new_path" = x; then
23250      # It's still not found. Now this is an unrecoverable error.
23251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23252$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23253      has_space=`$ECHO "$complete" | $GREP " "`
23254      if test "x$has_space" != x; then
23255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23257      fi
23258      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23259    fi
23260  fi
23261
23262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23265  # "foo.exe" is OK but "foo" is an error.
23266  #
23267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23268  # It is also a way to make sure we got the proper file name for the real test later on.
23269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23270  if test "x$test_shortpath" = x; then
23271    # Short path failed, file does not exist as specified.
23272    # Try adding .exe or .cmd
23273    if test -f "${new_path}.exe"; then
23274       input_to_shortpath="${new_path}.exe"
23275    elif test -f "${new_path}.cmd"; then
23276       input_to_shortpath="${new_path}.cmd"
23277    else
23278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23279$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23280      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23281$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23282      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23283    fi
23284  else
23285    input_to_shortpath="$new_path"
23286  fi
23287
23288  # Call helper function which possibly converts this using DOS-style short mode.
23289  # If so, the updated path is stored in $new_path.
23290  new_path="$input_to_shortpath"
23291
23292  input_path="$input_to_shortpath"
23293  # Check if we need to convert this using DOS-style short mode. If the path
23294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23295  # take no chances and rewrite it.
23296  # Note: m4 eats our [], so we need to use [ and ] instead.
23297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23298  if test "x$has_forbidden_chars" != x; then
23299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23303      # Going to short mode and back again did indeed matter. Since short mode is
23304      # case insensitive, let's make it lowercase to improve readability.
23305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23306      # Now convert it back to Unix-stile (cygpath)
23307      input_path=`$CYGPATH -u "$shortmode_path"`
23308      new_path="$input_path"
23309    fi
23310  fi
23311
23312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23313  if test "x$test_cygdrive_prefix" = x; then
23314    # As a simple fix, exclude /usr/bin since it's not a real path.
23315    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23317      # a path prefixed by /cygdrive for fixpath to work.
23318      new_path="$CYGWIN_ROOT_PATH$input_path"
23319    fi
23320  fi
23321
23322  # remove trailing .exe if any
23323  new_path="${new_path/%.exe/}"
23324
23325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23326
23327  # First separate the path from the arguments. This will split at the first
23328  # space.
23329  complete="$DUMPBIN"
23330  path="${complete%% *}"
23331  tmp="$complete EOL"
23332  arguments="${tmp#* }"
23333
23334  # Input might be given as Windows format, start by converting to
23335  # unix format.
23336  new_path="$path"
23337
23338  windows_path="$new_path"
23339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23340    unix_path=`$CYGPATH -u "$windows_path"`
23341    new_path="$unix_path"
23342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23344    new_path="$unix_path"
23345  fi
23346
23347
23348  # Now try to locate executable using which
23349  new_path=`$WHICH "$new_path" 2> /dev/null`
23350
23351  if test "x$new_path" = x; then
23352    # Oops. Which didn't find the executable.
23353    # The splitting of arguments from the executable at a space might have been incorrect,
23354    # since paths with space are more likely in Windows. Give it another try with the whole
23355    # argument.
23356    path="$complete"
23357    arguments="EOL"
23358    new_path="$path"
23359
23360  windows_path="$new_path"
23361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23362    unix_path=`$CYGPATH -u "$windows_path"`
23363    new_path="$unix_path"
23364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23366    new_path="$unix_path"
23367  fi
23368
23369
23370    new_path=`$WHICH "$new_path" 2> /dev/null`
23371
23372    if test "x$new_path" = x; then
23373      # It's still not found. Now this is an unrecoverable error.
23374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23375$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23376      has_space=`$ECHO "$complete" | $GREP " "`
23377      if test "x$has_space" != x; then
23378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23380      fi
23381      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23382    fi
23383  fi
23384
23385  # Now new_path has a complete unix path to the binary
23386  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23387    # Keep paths in /bin as-is, but remove trailing .exe if any
23388    new_path="${new_path/%.exe/}"
23389    # Do not save /bin paths to all_fixpath_prefixes!
23390  else
23391    # Not in mixed or Windows style, start by that.
23392    new_path=`cmd //c echo $new_path`
23393
23394  input_path="$new_path"
23395  # Check if we need to convert this using DOS-style short mode. If the path
23396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23397  # take no chances and rewrite it.
23398  # Note: m4 eats our [], so we need to use [ and ] instead.
23399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23400  if test "x$has_forbidden_chars" != x; then
23401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23403  fi
23404
23405    # Output is in $new_path
23406
23407  windows_path="$new_path"
23408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23409    unix_path=`$CYGPATH -u "$windows_path"`
23410    new_path="$unix_path"
23411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23413    new_path="$unix_path"
23414  fi
23415
23416    # remove trailing .exe if any
23417    new_path="${new_path/%.exe/}"
23418
23419    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23420    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23421  fi
23422
23423  else
23424    # We're on a posix platform. Hooray! :)
23425    # First separate the path from the arguments. This will split at the first
23426    # space.
23427    complete="$DUMPBIN"
23428    path="${complete%% *}"
23429    tmp="$complete EOL"
23430    arguments="${tmp#* }"
23431
23432    # Cannot rely on the command "which" here since it doesn't always work.
23433    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23434    if test -z "$is_absolute_path"; then
23435      # Path to executable is not absolute. Find it.
23436      IFS_save="$IFS"
23437      IFS=:
23438      for p in $PATH; do
23439        if test -f "$p/$path" && test -x "$p/$path"; then
23440          new_path="$p/$path"
23441          break
23442        fi
23443      done
23444      IFS="$IFS_save"
23445    else
23446      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23447$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23448      new_path="$path"
23449    fi
23450
23451    if test "x$new_path" = x; then
23452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23453$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23454        has_space=`$ECHO "$complete" | $GREP " "`
23455        if test "x$has_space" != x; then
23456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23458        fi
23459        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23460      fi
23461  fi
23462
23463      # Now join together the path and the arguments once again
23464      if test "x$arguments" != xEOL; then
23465        new_complete="$new_path ${arguments% *}"
23466      else
23467        new_complete="$new_path"
23468      fi
23469
23470  if test "x$complete" != "x$new_complete"; then
23471      DUMPBIN="$new_complete"
23472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23473$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23474    fi
23475
23476
23477    COMPILER_TYPE=CL
23478    CCXXFLAGS="$CCXXFLAGS -nologo"
23479
23480fi
23481
23482
23483
23484ac_ext=c
23485ac_cpp='$CPP $CPPFLAGS'
23486ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23487ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23488ac_compiler_gnu=$ac_cv_c_compiler_gnu
23489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23490$as_echo_n "checking how to run the C preprocessor... " >&6; }
23491# On Suns, sometimes $CPP names a directory.
23492if test -n "$CPP" && test -d "$CPP"; then
23493  CPP=
23494fi
23495if test -z "$CPP"; then
23496  if ${ac_cv_prog_CPP+:} false; then :
23497  $as_echo_n "(cached) " >&6
23498else
23499      # Double quotes because CPP needs to be expanded
23500    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23501    do
23502      ac_preproc_ok=false
23503for ac_c_preproc_warn_flag in '' yes
23504do
23505  # Use a header file that comes with gcc, so configuring glibc
23506  # with a fresh cross-compiler works.
23507  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23508  # <limits.h> exists even on freestanding compilers.
23509  # On the NeXT, cc -E runs the code through the compiler's parser,
23510  # not just through cpp. "Syntax error" is here to catch this case.
23511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23512/* end confdefs.h.  */
23513#ifdef __STDC__
23514# include <limits.h>
23515#else
23516# include <assert.h>
23517#endif
23518		     Syntax error
23519_ACEOF
23520if ac_fn_c_try_cpp "$LINENO"; then :
23521
23522else
23523  # Broken: fails on valid input.
23524continue
23525fi
23526rm -f conftest.err conftest.i conftest.$ac_ext
23527
23528  # OK, works on sane cases.  Now check whether nonexistent headers
23529  # can be detected and how.
23530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23531/* end confdefs.h.  */
23532#include <ac_nonexistent.h>
23533_ACEOF
23534if ac_fn_c_try_cpp "$LINENO"; then :
23535  # Broken: success on invalid input.
23536continue
23537else
23538  # Passes both tests.
23539ac_preproc_ok=:
23540break
23541fi
23542rm -f conftest.err conftest.i conftest.$ac_ext
23543
23544done
23545# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23546rm -f conftest.i conftest.err conftest.$ac_ext
23547if $ac_preproc_ok; then :
23548  break
23549fi
23550
23551    done
23552    ac_cv_prog_CPP=$CPP
23553
23554fi
23555  CPP=$ac_cv_prog_CPP
23556else
23557  ac_cv_prog_CPP=$CPP
23558fi
23559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23560$as_echo "$CPP" >&6; }
23561ac_preproc_ok=false
23562for ac_c_preproc_warn_flag in '' yes
23563do
23564  # Use a header file that comes with gcc, so configuring glibc
23565  # with a fresh cross-compiler works.
23566  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23567  # <limits.h> exists even on freestanding compilers.
23568  # On the NeXT, cc -E runs the code through the compiler's parser,
23569  # not just through cpp. "Syntax error" is here to catch this case.
23570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23571/* end confdefs.h.  */
23572#ifdef __STDC__
23573# include <limits.h>
23574#else
23575# include <assert.h>
23576#endif
23577		     Syntax error
23578_ACEOF
23579if ac_fn_c_try_cpp "$LINENO"; then :
23580
23581else
23582  # Broken: fails on valid input.
23583continue
23584fi
23585rm -f conftest.err conftest.i conftest.$ac_ext
23586
23587  # OK, works on sane cases.  Now check whether nonexistent headers
23588  # can be detected and how.
23589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23590/* end confdefs.h.  */
23591#include <ac_nonexistent.h>
23592_ACEOF
23593if ac_fn_c_try_cpp "$LINENO"; then :
23594  # Broken: success on invalid input.
23595continue
23596else
23597  # Passes both tests.
23598ac_preproc_ok=:
23599break
23600fi
23601rm -f conftest.err conftest.i conftest.$ac_ext
23602
23603done
23604# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23605rm -f conftest.i conftest.err conftest.$ac_ext
23606if $ac_preproc_ok; then :
23607
23608else
23609  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23611as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23612See \`config.log' for more details" "$LINENO" 5; }
23613fi
23614
23615ac_ext=cpp
23616ac_cpp='$CXXCPP $CPPFLAGS'
23617ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23618ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23619ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23620
23621
23622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23623
23624  # First separate the path from the arguments. This will split at the first
23625  # space.
23626  complete="$CPP"
23627  path="${complete%% *}"
23628  tmp="$complete EOL"
23629  arguments="${tmp#* }"
23630
23631  # Input might be given as Windows format, start by converting to
23632  # unix format.
23633  new_path=`$CYGPATH -u "$path"`
23634
23635  # Now try to locate executable using which
23636  new_path=`$WHICH "$new_path" 2> /dev/null`
23637  # bat and cmd files are not always considered executable in cygwin causing which
23638  # to not find them
23639  if test "x$new_path" = x \
23640           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23641           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23642    new_path=`$CYGPATH -u "$path"`
23643  fi
23644  if test "x$new_path" = x; then
23645    # Oops. Which didn't find the executable.
23646    # The splitting of arguments from the executable at a space might have been incorrect,
23647    # since paths with space are more likely in Windows. Give it another try with the whole
23648    # argument.
23649    path="$complete"
23650    arguments="EOL"
23651    new_path=`$CYGPATH -u "$path"`
23652    new_path=`$WHICH "$new_path" 2> /dev/null`
23653    # bat and cmd files are not always considered executable in cygwin causing which
23654    # to not find them
23655    if test "x$new_path" = x \
23656             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23657             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23658      new_path=`$CYGPATH -u "$path"`
23659    fi
23660    if test "x$new_path" = x; then
23661      # It's still not found. Now this is an unrecoverable error.
23662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23663$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23664      has_space=`$ECHO "$complete" | $GREP " "`
23665      if test "x$has_space" != x; then
23666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23668      fi
23669      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23670    fi
23671  fi
23672
23673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23676  # "foo.exe" is OK but "foo" is an error.
23677  #
23678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23679  # It is also a way to make sure we got the proper file name for the real test later on.
23680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23681  if test "x$test_shortpath" = x; then
23682    # Short path failed, file does not exist as specified.
23683    # Try adding .exe or .cmd
23684    if test -f "${new_path}.exe"; then
23685       input_to_shortpath="${new_path}.exe"
23686    elif test -f "${new_path}.cmd"; then
23687       input_to_shortpath="${new_path}.cmd"
23688    else
23689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23690$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23693      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23694    fi
23695  else
23696    input_to_shortpath="$new_path"
23697  fi
23698
23699  # Call helper function which possibly converts this using DOS-style short mode.
23700  # If so, the updated path is stored in $new_path.
23701  new_path="$input_to_shortpath"
23702
23703  input_path="$input_to_shortpath"
23704  # Check if we need to convert this using DOS-style short mode. If the path
23705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23706  # take no chances and rewrite it.
23707  # Note: m4 eats our [], so we need to use [ and ] instead.
23708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23709  if test "x$has_forbidden_chars" != x; then
23710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23714      # Going to short mode and back again did indeed matter. Since short mode is
23715      # case insensitive, let's make it lowercase to improve readability.
23716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23717      # Now convert it back to Unix-stile (cygpath)
23718      input_path=`$CYGPATH -u "$shortmode_path"`
23719      new_path="$input_path"
23720    fi
23721  fi
23722
23723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23724  if test "x$test_cygdrive_prefix" = x; then
23725    # As a simple fix, exclude /usr/bin since it's not a real path.
23726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23728      # a path prefixed by /cygdrive for fixpath to work.
23729      new_path="$CYGWIN_ROOT_PATH$input_path"
23730    fi
23731  fi
23732
23733  # remove trailing .exe if any
23734  new_path="${new_path/%.exe/}"
23735
23736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23737
23738  # First separate the path from the arguments. This will split at the first
23739  # space.
23740  complete="$CPP"
23741  path="${complete%% *}"
23742  tmp="$complete EOL"
23743  arguments="${tmp#* }"
23744
23745  # Input might be given as Windows format, start by converting to
23746  # unix format.
23747  new_path="$path"
23748
23749  windows_path="$new_path"
23750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23751    unix_path=`$CYGPATH -u "$windows_path"`
23752    new_path="$unix_path"
23753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23755    new_path="$unix_path"
23756  fi
23757
23758
23759  # Now try to locate executable using which
23760  new_path=`$WHICH "$new_path" 2> /dev/null`
23761
23762  if test "x$new_path" = x; then
23763    # Oops. Which didn't find the executable.
23764    # The splitting of arguments from the executable at a space might have been incorrect,
23765    # since paths with space are more likely in Windows. Give it another try with the whole
23766    # argument.
23767    path="$complete"
23768    arguments="EOL"
23769    new_path="$path"
23770
23771  windows_path="$new_path"
23772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23773    unix_path=`$CYGPATH -u "$windows_path"`
23774    new_path="$unix_path"
23775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23777    new_path="$unix_path"
23778  fi
23779
23780
23781    new_path=`$WHICH "$new_path" 2> /dev/null`
23782
23783    if test "x$new_path" = x; then
23784      # It's still not found. Now this is an unrecoverable error.
23785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23786$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23787      has_space=`$ECHO "$complete" | $GREP " "`
23788      if test "x$has_space" != x; then
23789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23791      fi
23792      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23793    fi
23794  fi
23795
23796  # Now new_path has a complete unix path to the binary
23797  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23798    # Keep paths in /bin as-is, but remove trailing .exe if any
23799    new_path="${new_path/%.exe/}"
23800    # Do not save /bin paths to all_fixpath_prefixes!
23801  else
23802    # Not in mixed or Windows style, start by that.
23803    new_path=`cmd //c echo $new_path`
23804
23805  input_path="$new_path"
23806  # Check if we need to convert this using DOS-style short mode. If the path
23807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23808  # take no chances and rewrite it.
23809  # Note: m4 eats our [], so we need to use [ and ] instead.
23810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23811  if test "x$has_forbidden_chars" != x; then
23812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23814  fi
23815
23816    # Output is in $new_path
23817
23818  windows_path="$new_path"
23819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23820    unix_path=`$CYGPATH -u "$windows_path"`
23821    new_path="$unix_path"
23822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23824    new_path="$unix_path"
23825  fi
23826
23827    # remove trailing .exe if any
23828    new_path="${new_path/%.exe/}"
23829
23830    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23831    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23832  fi
23833
23834  else
23835    # We're on a posix platform. Hooray! :)
23836    # First separate the path from the arguments. This will split at the first
23837    # space.
23838    complete="$CPP"
23839    path="${complete%% *}"
23840    tmp="$complete EOL"
23841    arguments="${tmp#* }"
23842
23843    # Cannot rely on the command "which" here since it doesn't always work.
23844    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23845    if test -z "$is_absolute_path"; then
23846      # Path to executable is not absolute. Find it.
23847      IFS_save="$IFS"
23848      IFS=:
23849      for p in $PATH; do
23850        if test -f "$p/$path" && test -x "$p/$path"; then
23851          new_path="$p/$path"
23852          break
23853        fi
23854      done
23855      IFS="$IFS_save"
23856    else
23857      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23858$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23859      new_path="$path"
23860    fi
23861
23862    if test "x$new_path" = x; then
23863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23864$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23865        has_space=`$ECHO "$complete" | $GREP " "`
23866        if test "x$has_space" != x; then
23867          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23868$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23869        fi
23870        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23871      fi
23872  fi
23873
23874      # Now join together the path and the arguments once again
23875      if test "x$arguments" != xEOL; then
23876        new_complete="$new_path ${arguments% *}"
23877      else
23878        new_complete="$new_path"
23879      fi
23880
23881  if test "x$complete" != "x$new_complete"; then
23882      CPP="$new_complete"
23883      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23884$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23885    fi
23886
23887
23888ac_ext=cpp
23889ac_cpp='$CXXCPP $CPPFLAGS'
23890ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23891ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23892ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23894$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23895if test -z "$CXXCPP"; then
23896  if ${ac_cv_prog_CXXCPP+:} false; then :
23897  $as_echo_n "(cached) " >&6
23898else
23899      # Double quotes because CXXCPP needs to be expanded
23900    for CXXCPP in "$CXX -E" "/lib/cpp"
23901    do
23902      ac_preproc_ok=false
23903for ac_cxx_preproc_warn_flag in '' yes
23904do
23905  # Use a header file that comes with gcc, so configuring glibc
23906  # with a fresh cross-compiler works.
23907  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23908  # <limits.h> exists even on freestanding compilers.
23909  # On the NeXT, cc -E runs the code through the compiler's parser,
23910  # not just through cpp. "Syntax error" is here to catch this case.
23911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23912/* end confdefs.h.  */
23913#ifdef __STDC__
23914# include <limits.h>
23915#else
23916# include <assert.h>
23917#endif
23918		     Syntax error
23919_ACEOF
23920if ac_fn_cxx_try_cpp "$LINENO"; then :
23921
23922else
23923  # Broken: fails on valid input.
23924continue
23925fi
23926rm -f conftest.err conftest.i conftest.$ac_ext
23927
23928  # OK, works on sane cases.  Now check whether nonexistent headers
23929  # can be detected and how.
23930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23931/* end confdefs.h.  */
23932#include <ac_nonexistent.h>
23933_ACEOF
23934if ac_fn_cxx_try_cpp "$LINENO"; then :
23935  # Broken: success on invalid input.
23936continue
23937else
23938  # Passes both tests.
23939ac_preproc_ok=:
23940break
23941fi
23942rm -f conftest.err conftest.i conftest.$ac_ext
23943
23944done
23945# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23946rm -f conftest.i conftest.err conftest.$ac_ext
23947if $ac_preproc_ok; then :
23948  break
23949fi
23950
23951    done
23952    ac_cv_prog_CXXCPP=$CXXCPP
23953
23954fi
23955  CXXCPP=$ac_cv_prog_CXXCPP
23956else
23957  ac_cv_prog_CXXCPP=$CXXCPP
23958fi
23959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23960$as_echo "$CXXCPP" >&6; }
23961ac_preproc_ok=false
23962for ac_cxx_preproc_warn_flag in '' yes
23963do
23964  # Use a header file that comes with gcc, so configuring glibc
23965  # with a fresh cross-compiler works.
23966  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23967  # <limits.h> exists even on freestanding compilers.
23968  # On the NeXT, cc -E runs the code through the compiler's parser,
23969  # not just through cpp. "Syntax error" is here to catch this case.
23970  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23971/* end confdefs.h.  */
23972#ifdef __STDC__
23973# include <limits.h>
23974#else
23975# include <assert.h>
23976#endif
23977		     Syntax error
23978_ACEOF
23979if ac_fn_cxx_try_cpp "$LINENO"; then :
23980
23981else
23982  # Broken: fails on valid input.
23983continue
23984fi
23985rm -f conftest.err conftest.i conftest.$ac_ext
23986
23987  # OK, works on sane cases.  Now check whether nonexistent headers
23988  # can be detected and how.
23989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23990/* end confdefs.h.  */
23991#include <ac_nonexistent.h>
23992_ACEOF
23993if ac_fn_cxx_try_cpp "$LINENO"; then :
23994  # Broken: success on invalid input.
23995continue
23996else
23997  # Passes both tests.
23998ac_preproc_ok=:
23999break
24000fi
24001rm -f conftest.err conftest.i conftest.$ac_ext
24002
24003done
24004# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24005rm -f conftest.i conftest.err conftest.$ac_ext
24006if $ac_preproc_ok; then :
24007
24008else
24009  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24011as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24012See \`config.log' for more details" "$LINENO" 5; }
24013fi
24014
24015ac_ext=cpp
24016ac_cpp='$CXXCPP $CPPFLAGS'
24017ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24018ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24019ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24020
24021
24022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24023
24024  # First separate the path from the arguments. This will split at the first
24025  # space.
24026  complete="$CXXCPP"
24027  path="${complete%% *}"
24028  tmp="$complete EOL"
24029  arguments="${tmp#* }"
24030
24031  # Input might be given as Windows format, start by converting to
24032  # unix format.
24033  new_path=`$CYGPATH -u "$path"`
24034
24035  # Now try to locate executable using which
24036  new_path=`$WHICH "$new_path" 2> /dev/null`
24037  # bat and cmd files are not always considered executable in cygwin causing which
24038  # to not find them
24039  if test "x$new_path" = x \
24040           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24041           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24042    new_path=`$CYGPATH -u "$path"`
24043  fi
24044  if test "x$new_path" = x; then
24045    # Oops. Which didn't find the executable.
24046    # The splitting of arguments from the executable at a space might have been incorrect,
24047    # since paths with space are more likely in Windows. Give it another try with the whole
24048    # argument.
24049    path="$complete"
24050    arguments="EOL"
24051    new_path=`$CYGPATH -u "$path"`
24052    new_path=`$WHICH "$new_path" 2> /dev/null`
24053    # bat and cmd files are not always considered executable in cygwin causing which
24054    # to not find them
24055    if test "x$new_path" = x \
24056             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24057             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24058      new_path=`$CYGPATH -u "$path"`
24059    fi
24060    if test "x$new_path" = x; then
24061      # It's still not found. Now this is an unrecoverable error.
24062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24063$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24064      has_space=`$ECHO "$complete" | $GREP " "`
24065      if test "x$has_space" != x; then
24066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24068      fi
24069      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24070    fi
24071  fi
24072
24073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24076  # "foo.exe" is OK but "foo" is an error.
24077  #
24078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24079  # It is also a way to make sure we got the proper file name for the real test later on.
24080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24081  if test "x$test_shortpath" = x; then
24082    # Short path failed, file does not exist as specified.
24083    # Try adding .exe or .cmd
24084    if test -f "${new_path}.exe"; then
24085       input_to_shortpath="${new_path}.exe"
24086    elif test -f "${new_path}.cmd"; then
24087       input_to_shortpath="${new_path}.cmd"
24088    else
24089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24090$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24093      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24094    fi
24095  else
24096    input_to_shortpath="$new_path"
24097  fi
24098
24099  # Call helper function which possibly converts this using DOS-style short mode.
24100  # If so, the updated path is stored in $new_path.
24101  new_path="$input_to_shortpath"
24102
24103  input_path="$input_to_shortpath"
24104  # Check if we need to convert this using DOS-style short mode. If the path
24105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24106  # take no chances and rewrite it.
24107  # Note: m4 eats our [], so we need to use [ and ] instead.
24108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24109  if test "x$has_forbidden_chars" != x; then
24110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24114      # Going to short mode and back again did indeed matter. Since short mode is
24115      # case insensitive, let's make it lowercase to improve readability.
24116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24117      # Now convert it back to Unix-stile (cygpath)
24118      input_path=`$CYGPATH -u "$shortmode_path"`
24119      new_path="$input_path"
24120    fi
24121  fi
24122
24123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24124  if test "x$test_cygdrive_prefix" = x; then
24125    # As a simple fix, exclude /usr/bin since it's not a real path.
24126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24128      # a path prefixed by /cygdrive for fixpath to work.
24129      new_path="$CYGWIN_ROOT_PATH$input_path"
24130    fi
24131  fi
24132
24133  # remove trailing .exe if any
24134  new_path="${new_path/%.exe/}"
24135
24136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24137
24138  # First separate the path from the arguments. This will split at the first
24139  # space.
24140  complete="$CXXCPP"
24141  path="${complete%% *}"
24142  tmp="$complete EOL"
24143  arguments="${tmp#* }"
24144
24145  # Input might be given as Windows format, start by converting to
24146  # unix format.
24147  new_path="$path"
24148
24149  windows_path="$new_path"
24150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24151    unix_path=`$CYGPATH -u "$windows_path"`
24152    new_path="$unix_path"
24153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24155    new_path="$unix_path"
24156  fi
24157
24158
24159  # Now try to locate executable using which
24160  new_path=`$WHICH "$new_path" 2> /dev/null`
24161
24162  if test "x$new_path" = x; then
24163    # Oops. Which didn't find the executable.
24164    # The splitting of arguments from the executable at a space might have been incorrect,
24165    # since paths with space are more likely in Windows. Give it another try with the whole
24166    # argument.
24167    path="$complete"
24168    arguments="EOL"
24169    new_path="$path"
24170
24171  windows_path="$new_path"
24172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24173    unix_path=`$CYGPATH -u "$windows_path"`
24174    new_path="$unix_path"
24175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24177    new_path="$unix_path"
24178  fi
24179
24180
24181    new_path=`$WHICH "$new_path" 2> /dev/null`
24182
24183    if test "x$new_path" = x; then
24184      # It's still not found. Now this is an unrecoverable error.
24185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24186$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24187      has_space=`$ECHO "$complete" | $GREP " "`
24188      if test "x$has_space" != x; then
24189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24191      fi
24192      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24193    fi
24194  fi
24195
24196  # Now new_path has a complete unix path to the binary
24197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24198    # Keep paths in /bin as-is, but remove trailing .exe if any
24199    new_path="${new_path/%.exe/}"
24200    # Do not save /bin paths to all_fixpath_prefixes!
24201  else
24202    # Not in mixed or Windows style, start by that.
24203    new_path=`cmd //c echo $new_path`
24204
24205  input_path="$new_path"
24206  # Check if we need to convert this using DOS-style short mode. If the path
24207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24208  # take no chances and rewrite it.
24209  # Note: m4 eats our [], so we need to use [ and ] instead.
24210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24211  if test "x$has_forbidden_chars" != x; then
24212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24214  fi
24215
24216    # Output is in $new_path
24217
24218  windows_path="$new_path"
24219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24220    unix_path=`$CYGPATH -u "$windows_path"`
24221    new_path="$unix_path"
24222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24224    new_path="$unix_path"
24225  fi
24226
24227    # remove trailing .exe if any
24228    new_path="${new_path/%.exe/}"
24229
24230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24232  fi
24233
24234  else
24235    # We're on a posix platform. Hooray! :)
24236    # First separate the path from the arguments. This will split at the first
24237    # space.
24238    complete="$CXXCPP"
24239    path="${complete%% *}"
24240    tmp="$complete EOL"
24241    arguments="${tmp#* }"
24242
24243    # Cannot rely on the command "which" here since it doesn't always work.
24244    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24245    if test -z "$is_absolute_path"; then
24246      # Path to executable is not absolute. Find it.
24247      IFS_save="$IFS"
24248      IFS=:
24249      for p in $PATH; do
24250        if test -f "$p/$path" && test -x "$p/$path"; then
24251          new_path="$p/$path"
24252          break
24253        fi
24254      done
24255      IFS="$IFS_save"
24256    else
24257      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24258$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24259      new_path="$path"
24260    fi
24261
24262    if test "x$new_path" = x; then
24263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24264$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24265        has_space=`$ECHO "$complete" | $GREP " "`
24266        if test "x$has_space" != x; then
24267          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24268$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24269        fi
24270        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24271      fi
24272  fi
24273
24274      # Now join together the path and the arguments once again
24275      if test "x$arguments" != xEOL; then
24276        new_complete="$new_path ${arguments% *}"
24277      else
24278        new_complete="$new_path"
24279      fi
24280
24281  if test "x$complete" != "x$new_complete"; then
24282      CXXCPP="$new_complete"
24283      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24284$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24285    fi
24286
24287
24288if test "x$COMPILE_TYPE" != "xcross"; then
24289    # If we are not cross compiling, use the same compilers for
24290    # building the build platform executables. The cross-compilation
24291    # case needed to be done earlier, but this can only be done after
24292    # the native tools have been localized.
24293    BUILD_CC="$CC"
24294    BUILD_CXX="$CXX"
24295    BUILD_LD="$LD"
24296fi
24297
24298# for solaris we really need solaris tools, and not gnu equivalent
24299#   these seems to normally reside in /usr/ccs/bin so add that to path before
24300#   starting to probe
24301#
24302#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24303#         so that it can be overriden --with-tools-dir
24304if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24305    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24306fi
24307
24308# Find the right assembler.
24309if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24310    # Extract the first word of "as", so it can be a program name with args.
24311set dummy as; ac_word=$2
24312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24313$as_echo_n "checking for $ac_word... " >&6; }
24314if ${ac_cv_path_AS+:} false; then :
24315  $as_echo_n "(cached) " >&6
24316else
24317  case $AS in
24318  [\\/]* | ?:[\\/]*)
24319  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24320  ;;
24321  *)
24322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24323for as_dir in $PATH
24324do
24325  IFS=$as_save_IFS
24326  test -z "$as_dir" && as_dir=.
24327    for ac_exec_ext in '' $ac_executable_extensions; do
24328  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24329    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24331    break 2
24332  fi
24333done
24334  done
24335IFS=$as_save_IFS
24336
24337  ;;
24338esac
24339fi
24340AS=$ac_cv_path_AS
24341if test -n "$AS"; then
24342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24343$as_echo "$AS" >&6; }
24344else
24345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24346$as_echo "no" >&6; }
24347fi
24348
24349
24350
24351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24352
24353  # First separate the path from the arguments. This will split at the first
24354  # space.
24355  complete="$AS"
24356  path="${complete%% *}"
24357  tmp="$complete EOL"
24358  arguments="${tmp#* }"
24359
24360  # Input might be given as Windows format, start by converting to
24361  # unix format.
24362  new_path=`$CYGPATH -u "$path"`
24363
24364  # Now try to locate executable using which
24365  new_path=`$WHICH "$new_path" 2> /dev/null`
24366  # bat and cmd files are not always considered executable in cygwin causing which
24367  # to not find them
24368  if test "x$new_path" = x \
24369           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24370           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24371    new_path=`$CYGPATH -u "$path"`
24372  fi
24373  if test "x$new_path" = x; then
24374    # Oops. Which didn't find the executable.
24375    # The splitting of arguments from the executable at a space might have been incorrect,
24376    # since paths with space are more likely in Windows. Give it another try with the whole
24377    # argument.
24378    path="$complete"
24379    arguments="EOL"
24380    new_path=`$CYGPATH -u "$path"`
24381    new_path=`$WHICH "$new_path" 2> /dev/null`
24382    # bat and cmd files are not always considered executable in cygwin causing which
24383    # to not find them
24384    if test "x$new_path" = x \
24385             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24386             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24387      new_path=`$CYGPATH -u "$path"`
24388    fi
24389    if test "x$new_path" = x; then
24390      # It's still not found. Now this is an unrecoverable error.
24391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24392$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24393      has_space=`$ECHO "$complete" | $GREP " "`
24394      if test "x$has_space" != x; then
24395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24397      fi
24398      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24399    fi
24400  fi
24401
24402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24405  # "foo.exe" is OK but "foo" is an error.
24406  #
24407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24408  # It is also a way to make sure we got the proper file name for the real test later on.
24409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24410  if test "x$test_shortpath" = x; then
24411    # Short path failed, file does not exist as specified.
24412    # Try adding .exe or .cmd
24413    if test -f "${new_path}.exe"; then
24414       input_to_shortpath="${new_path}.exe"
24415    elif test -f "${new_path}.cmd"; then
24416       input_to_shortpath="${new_path}.cmd"
24417    else
24418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24419$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24422      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24423    fi
24424  else
24425    input_to_shortpath="$new_path"
24426  fi
24427
24428  # Call helper function which possibly converts this using DOS-style short mode.
24429  # If so, the updated path is stored in $new_path.
24430  new_path="$input_to_shortpath"
24431
24432  input_path="$input_to_shortpath"
24433  # Check if we need to convert this using DOS-style short mode. If the path
24434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24435  # take no chances and rewrite it.
24436  # Note: m4 eats our [], so we need to use [ and ] instead.
24437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24438  if test "x$has_forbidden_chars" != x; then
24439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24443      # Going to short mode and back again did indeed matter. Since short mode is
24444      # case insensitive, let's make it lowercase to improve readability.
24445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24446      # Now convert it back to Unix-stile (cygpath)
24447      input_path=`$CYGPATH -u "$shortmode_path"`
24448      new_path="$input_path"
24449    fi
24450  fi
24451
24452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24453  if test "x$test_cygdrive_prefix" = x; then
24454    # As a simple fix, exclude /usr/bin since it's not a real path.
24455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24457      # a path prefixed by /cygdrive for fixpath to work.
24458      new_path="$CYGWIN_ROOT_PATH$input_path"
24459    fi
24460  fi
24461
24462  # remove trailing .exe if any
24463  new_path="${new_path/%.exe/}"
24464
24465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24466
24467  # First separate the path from the arguments. This will split at the first
24468  # space.
24469  complete="$AS"
24470  path="${complete%% *}"
24471  tmp="$complete EOL"
24472  arguments="${tmp#* }"
24473
24474  # Input might be given as Windows format, start by converting to
24475  # unix format.
24476  new_path="$path"
24477
24478  windows_path="$new_path"
24479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24480    unix_path=`$CYGPATH -u "$windows_path"`
24481    new_path="$unix_path"
24482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24484    new_path="$unix_path"
24485  fi
24486
24487
24488  # Now try to locate executable using which
24489  new_path=`$WHICH "$new_path" 2> /dev/null`
24490
24491  if test "x$new_path" = x; then
24492    # Oops. Which didn't find the executable.
24493    # The splitting of arguments from the executable at a space might have been incorrect,
24494    # since paths with space are more likely in Windows. Give it another try with the whole
24495    # argument.
24496    path="$complete"
24497    arguments="EOL"
24498    new_path="$path"
24499
24500  windows_path="$new_path"
24501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24502    unix_path=`$CYGPATH -u "$windows_path"`
24503    new_path="$unix_path"
24504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24506    new_path="$unix_path"
24507  fi
24508
24509
24510    new_path=`$WHICH "$new_path" 2> /dev/null`
24511
24512    if test "x$new_path" = x; then
24513      # It's still not found. Now this is an unrecoverable error.
24514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24515$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24516      has_space=`$ECHO "$complete" | $GREP " "`
24517      if test "x$has_space" != x; then
24518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24520      fi
24521      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24522    fi
24523  fi
24524
24525  # Now new_path has a complete unix path to the binary
24526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24527    # Keep paths in /bin as-is, but remove trailing .exe if any
24528    new_path="${new_path/%.exe/}"
24529    # Do not save /bin paths to all_fixpath_prefixes!
24530  else
24531    # Not in mixed or Windows style, start by that.
24532    new_path=`cmd //c echo $new_path`
24533
24534  input_path="$new_path"
24535  # Check if we need to convert this using DOS-style short mode. If the path
24536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24537  # take no chances and rewrite it.
24538  # Note: m4 eats our [], so we need to use [ and ] instead.
24539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24540  if test "x$has_forbidden_chars" != x; then
24541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24543  fi
24544
24545    # Output is in $new_path
24546
24547  windows_path="$new_path"
24548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24549    unix_path=`$CYGPATH -u "$windows_path"`
24550    new_path="$unix_path"
24551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24553    new_path="$unix_path"
24554  fi
24555
24556    # remove trailing .exe if any
24557    new_path="${new_path/%.exe/}"
24558
24559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24561  fi
24562
24563  else
24564    # We're on a posix platform. Hooray! :)
24565    # First separate the path from the arguments. This will split at the first
24566    # space.
24567    complete="$AS"
24568    path="${complete%% *}"
24569    tmp="$complete EOL"
24570    arguments="${tmp#* }"
24571
24572    # Cannot rely on the command "which" here since it doesn't always work.
24573    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24574    if test -z "$is_absolute_path"; then
24575      # Path to executable is not absolute. Find it.
24576      IFS_save="$IFS"
24577      IFS=:
24578      for p in $PATH; do
24579        if test -f "$p/$path" && test -x "$p/$path"; then
24580          new_path="$p/$path"
24581          break
24582        fi
24583      done
24584      IFS="$IFS_save"
24585    else
24586      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24587$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24588      new_path="$path"
24589    fi
24590
24591    if test "x$new_path" = x; then
24592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24593$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24594        has_space=`$ECHO "$complete" | $GREP " "`
24595        if test "x$has_space" != x; then
24596          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24597$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24598        fi
24599        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24600      fi
24601  fi
24602
24603      # Now join together the path and the arguments once again
24604      if test "x$arguments" != xEOL; then
24605        new_complete="$new_path ${arguments% *}"
24606      else
24607        new_complete="$new_path"
24608      fi
24609
24610  if test "x$complete" != "x$new_complete"; then
24611      AS="$new_complete"
24612      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24613$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24614    fi
24615
24616else
24617    AS="$CC -c"
24618fi
24619
24620
24621if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24622    for ac_prog in gnm nm
24623do
24624  # Extract the first word of "$ac_prog", so it can be a program name with args.
24625set dummy $ac_prog; ac_word=$2
24626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24627$as_echo_n "checking for $ac_word... " >&6; }
24628if ${ac_cv_path_NM+:} false; then :
24629  $as_echo_n "(cached) " >&6
24630else
24631  case $NM in
24632  [\\/]* | ?:[\\/]*)
24633  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24634  ;;
24635  *)
24636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24637for as_dir in $PATH
24638do
24639  IFS=$as_save_IFS
24640  test -z "$as_dir" && as_dir=.
24641    for ac_exec_ext in '' $ac_executable_extensions; do
24642  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24643    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24645    break 2
24646  fi
24647done
24648  done
24649IFS=$as_save_IFS
24650
24651  ;;
24652esac
24653fi
24654NM=$ac_cv_path_NM
24655if test -n "$NM"; then
24656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24657$as_echo "$NM" >&6; }
24658else
24659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24660$as_echo "no" >&6; }
24661fi
24662
24663
24664  test -n "$NM" && break
24665done
24666
24667
24668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24669
24670  # First separate the path from the arguments. This will split at the first
24671  # space.
24672  complete="$NM"
24673  path="${complete%% *}"
24674  tmp="$complete EOL"
24675  arguments="${tmp#* }"
24676
24677  # Input might be given as Windows format, start by converting to
24678  # unix format.
24679  new_path=`$CYGPATH -u "$path"`
24680
24681  # Now try to locate executable using which
24682  new_path=`$WHICH "$new_path" 2> /dev/null`
24683  # bat and cmd files are not always considered executable in cygwin causing which
24684  # to not find them
24685  if test "x$new_path" = x \
24686           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24687           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24688    new_path=`$CYGPATH -u "$path"`
24689  fi
24690  if test "x$new_path" = x; then
24691    # Oops. Which didn't find the executable.
24692    # The splitting of arguments from the executable at a space might have been incorrect,
24693    # since paths with space are more likely in Windows. Give it another try with the whole
24694    # argument.
24695    path="$complete"
24696    arguments="EOL"
24697    new_path=`$CYGPATH -u "$path"`
24698    new_path=`$WHICH "$new_path" 2> /dev/null`
24699    # bat and cmd files are not always considered executable in cygwin causing which
24700    # to not find them
24701    if test "x$new_path" = x \
24702             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24703             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24704      new_path=`$CYGPATH -u "$path"`
24705    fi
24706    if test "x$new_path" = x; then
24707      # It's still not found. Now this is an unrecoverable error.
24708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24709$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24710      has_space=`$ECHO "$complete" | $GREP " "`
24711      if test "x$has_space" != x; then
24712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24714      fi
24715      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24716    fi
24717  fi
24718
24719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24722  # "foo.exe" is OK but "foo" is an error.
24723  #
24724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24725  # It is also a way to make sure we got the proper file name for the real test later on.
24726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24727  if test "x$test_shortpath" = x; then
24728    # Short path failed, file does not exist as specified.
24729    # Try adding .exe or .cmd
24730    if test -f "${new_path}.exe"; then
24731       input_to_shortpath="${new_path}.exe"
24732    elif test -f "${new_path}.cmd"; then
24733       input_to_shortpath="${new_path}.cmd"
24734    else
24735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24736$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24737      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24738$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24739      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24740    fi
24741  else
24742    input_to_shortpath="$new_path"
24743  fi
24744
24745  # Call helper function which possibly converts this using DOS-style short mode.
24746  # If so, the updated path is stored in $new_path.
24747  new_path="$input_to_shortpath"
24748
24749  input_path="$input_to_shortpath"
24750  # Check if we need to convert this using DOS-style short mode. If the path
24751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24752  # take no chances and rewrite it.
24753  # Note: m4 eats our [], so we need to use [ and ] instead.
24754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24755  if test "x$has_forbidden_chars" != x; then
24756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24760      # Going to short mode and back again did indeed matter. Since short mode is
24761      # case insensitive, let's make it lowercase to improve readability.
24762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24763      # Now convert it back to Unix-stile (cygpath)
24764      input_path=`$CYGPATH -u "$shortmode_path"`
24765      new_path="$input_path"
24766    fi
24767  fi
24768
24769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24770  if test "x$test_cygdrive_prefix" = x; then
24771    # As a simple fix, exclude /usr/bin since it's not a real path.
24772    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24774      # a path prefixed by /cygdrive for fixpath to work.
24775      new_path="$CYGWIN_ROOT_PATH$input_path"
24776    fi
24777  fi
24778
24779  # remove trailing .exe if any
24780  new_path="${new_path/%.exe/}"
24781
24782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24783
24784  # First separate the path from the arguments. This will split at the first
24785  # space.
24786  complete="$NM"
24787  path="${complete%% *}"
24788  tmp="$complete EOL"
24789  arguments="${tmp#* }"
24790
24791  # Input might be given as Windows format, start by converting to
24792  # unix format.
24793  new_path="$path"
24794
24795  windows_path="$new_path"
24796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24797    unix_path=`$CYGPATH -u "$windows_path"`
24798    new_path="$unix_path"
24799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24801    new_path="$unix_path"
24802  fi
24803
24804
24805  # Now try to locate executable using which
24806  new_path=`$WHICH "$new_path" 2> /dev/null`
24807
24808  if test "x$new_path" = x; then
24809    # Oops. Which didn't find the executable.
24810    # The splitting of arguments from the executable at a space might have been incorrect,
24811    # since paths with space are more likely in Windows. Give it another try with the whole
24812    # argument.
24813    path="$complete"
24814    arguments="EOL"
24815    new_path="$path"
24816
24817  windows_path="$new_path"
24818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24819    unix_path=`$CYGPATH -u "$windows_path"`
24820    new_path="$unix_path"
24821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24823    new_path="$unix_path"
24824  fi
24825
24826
24827    new_path=`$WHICH "$new_path" 2> /dev/null`
24828
24829    if test "x$new_path" = x; then
24830      # It's still not found. Now this is an unrecoverable error.
24831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24832$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24833      has_space=`$ECHO "$complete" | $GREP " "`
24834      if test "x$has_space" != x; then
24835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24837      fi
24838      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24839    fi
24840  fi
24841
24842  # Now new_path has a complete unix path to the binary
24843  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24844    # Keep paths in /bin as-is, but remove trailing .exe if any
24845    new_path="${new_path/%.exe/}"
24846    # Do not save /bin paths to all_fixpath_prefixes!
24847  else
24848    # Not in mixed or Windows style, start by that.
24849    new_path=`cmd //c echo $new_path`
24850
24851  input_path="$new_path"
24852  # Check if we need to convert this using DOS-style short mode. If the path
24853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24854  # take no chances and rewrite it.
24855  # Note: m4 eats our [], so we need to use [ and ] instead.
24856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24857  if test "x$has_forbidden_chars" != x; then
24858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24860  fi
24861
24862    # Output is in $new_path
24863
24864  windows_path="$new_path"
24865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24866    unix_path=`$CYGPATH -u "$windows_path"`
24867    new_path="$unix_path"
24868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24870    new_path="$unix_path"
24871  fi
24872
24873    # remove trailing .exe if any
24874    new_path="${new_path/%.exe/}"
24875
24876    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24877    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24878  fi
24879
24880  else
24881    # We're on a posix platform. Hooray! :)
24882    # First separate the path from the arguments. This will split at the first
24883    # space.
24884    complete="$NM"
24885    path="${complete%% *}"
24886    tmp="$complete EOL"
24887    arguments="${tmp#* }"
24888
24889    # Cannot rely on the command "which" here since it doesn't always work.
24890    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24891    if test -z "$is_absolute_path"; then
24892      # Path to executable is not absolute. Find it.
24893      IFS_save="$IFS"
24894      IFS=:
24895      for p in $PATH; do
24896        if test -f "$p/$path" && test -x "$p/$path"; then
24897          new_path="$p/$path"
24898          break
24899        fi
24900      done
24901      IFS="$IFS_save"
24902    else
24903      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24904$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24905      new_path="$path"
24906    fi
24907
24908    if test "x$new_path" = x; then
24909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24910$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24911        has_space=`$ECHO "$complete" | $GREP " "`
24912        if test "x$has_space" != x; then
24913          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24914$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24915        fi
24916        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24917      fi
24918  fi
24919
24920      # Now join together the path and the arguments once again
24921      if test "x$arguments" != xEOL; then
24922        new_complete="$new_path ${arguments% *}"
24923      else
24924        new_complete="$new_path"
24925      fi
24926
24927  if test "x$complete" != "x$new_complete"; then
24928      NM="$new_complete"
24929      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24930$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24931    fi
24932
24933    # Extract the first word of "strip", so it can be a program name with args.
24934set dummy strip; ac_word=$2
24935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24936$as_echo_n "checking for $ac_word... " >&6; }
24937if ${ac_cv_path_STRIP+:} false; then :
24938  $as_echo_n "(cached) " >&6
24939else
24940  case $STRIP in
24941  [\\/]* | ?:[\\/]*)
24942  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24943  ;;
24944  *)
24945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24946for as_dir in $PATH
24947do
24948  IFS=$as_save_IFS
24949  test -z "$as_dir" && as_dir=.
24950    for ac_exec_ext in '' $ac_executable_extensions; do
24951  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24952    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24954    break 2
24955  fi
24956done
24957  done
24958IFS=$as_save_IFS
24959
24960  ;;
24961esac
24962fi
24963STRIP=$ac_cv_path_STRIP
24964if test -n "$STRIP"; then
24965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24966$as_echo "$STRIP" >&6; }
24967else
24968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24969$as_echo "no" >&6; }
24970fi
24971
24972
24973
24974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24975
24976  # First separate the path from the arguments. This will split at the first
24977  # space.
24978  complete="$STRIP"
24979  path="${complete%% *}"
24980  tmp="$complete EOL"
24981  arguments="${tmp#* }"
24982
24983  # Input might be given as Windows format, start by converting to
24984  # unix format.
24985  new_path=`$CYGPATH -u "$path"`
24986
24987  # Now try to locate executable using which
24988  new_path=`$WHICH "$new_path" 2> /dev/null`
24989  # bat and cmd files are not always considered executable in cygwin causing which
24990  # to not find them
24991  if test "x$new_path" = x \
24992           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24993           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24994    new_path=`$CYGPATH -u "$path"`
24995  fi
24996  if test "x$new_path" = x; then
24997    # Oops. Which didn't find the executable.
24998    # The splitting of arguments from the executable at a space might have been incorrect,
24999    # since paths with space are more likely in Windows. Give it another try with the whole
25000    # argument.
25001    path="$complete"
25002    arguments="EOL"
25003    new_path=`$CYGPATH -u "$path"`
25004    new_path=`$WHICH "$new_path" 2> /dev/null`
25005    # bat and cmd files are not always considered executable in cygwin causing which
25006    # to not find them
25007    if test "x$new_path" = x \
25008             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25009             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25010      new_path=`$CYGPATH -u "$path"`
25011    fi
25012    if test "x$new_path" = x; then
25013      # It's still not found. Now this is an unrecoverable error.
25014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25015$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25016      has_space=`$ECHO "$complete" | $GREP " "`
25017      if test "x$has_space" != x; then
25018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25020      fi
25021      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25022    fi
25023  fi
25024
25025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25028  # "foo.exe" is OK but "foo" is an error.
25029  #
25030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25031  # It is also a way to make sure we got the proper file name for the real test later on.
25032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25033  if test "x$test_shortpath" = x; then
25034    # Short path failed, file does not exist as specified.
25035    # Try adding .exe or .cmd
25036    if test -f "${new_path}.exe"; then
25037       input_to_shortpath="${new_path}.exe"
25038    elif test -f "${new_path}.cmd"; then
25039       input_to_shortpath="${new_path}.cmd"
25040    else
25041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25042$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25045      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25046    fi
25047  else
25048    input_to_shortpath="$new_path"
25049  fi
25050
25051  # Call helper function which possibly converts this using DOS-style short mode.
25052  # If so, the updated path is stored in $new_path.
25053  new_path="$input_to_shortpath"
25054
25055  input_path="$input_to_shortpath"
25056  # Check if we need to convert this using DOS-style short mode. If the path
25057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25058  # take no chances and rewrite it.
25059  # Note: m4 eats our [], so we need to use [ and ] instead.
25060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25061  if test "x$has_forbidden_chars" != x; then
25062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25066      # Going to short mode and back again did indeed matter. Since short mode is
25067      # case insensitive, let's make it lowercase to improve readability.
25068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25069      # Now convert it back to Unix-stile (cygpath)
25070      input_path=`$CYGPATH -u "$shortmode_path"`
25071      new_path="$input_path"
25072    fi
25073  fi
25074
25075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25076  if test "x$test_cygdrive_prefix" = x; then
25077    # As a simple fix, exclude /usr/bin since it's not a real path.
25078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25080      # a path prefixed by /cygdrive for fixpath to work.
25081      new_path="$CYGWIN_ROOT_PATH$input_path"
25082    fi
25083  fi
25084
25085  # remove trailing .exe if any
25086  new_path="${new_path/%.exe/}"
25087
25088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25089
25090  # First separate the path from the arguments. This will split at the first
25091  # space.
25092  complete="$STRIP"
25093  path="${complete%% *}"
25094  tmp="$complete EOL"
25095  arguments="${tmp#* }"
25096
25097  # Input might be given as Windows format, start by converting to
25098  # unix format.
25099  new_path="$path"
25100
25101  windows_path="$new_path"
25102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25103    unix_path=`$CYGPATH -u "$windows_path"`
25104    new_path="$unix_path"
25105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25107    new_path="$unix_path"
25108  fi
25109
25110
25111  # Now try to locate executable using which
25112  new_path=`$WHICH "$new_path" 2> /dev/null`
25113
25114  if test "x$new_path" = x; then
25115    # Oops. Which didn't find the executable.
25116    # The splitting of arguments from the executable at a space might have been incorrect,
25117    # since paths with space are more likely in Windows. Give it another try with the whole
25118    # argument.
25119    path="$complete"
25120    arguments="EOL"
25121    new_path="$path"
25122
25123  windows_path="$new_path"
25124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25125    unix_path=`$CYGPATH -u "$windows_path"`
25126    new_path="$unix_path"
25127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25129    new_path="$unix_path"
25130  fi
25131
25132
25133    new_path=`$WHICH "$new_path" 2> /dev/null`
25134
25135    if test "x$new_path" = x; then
25136      # It's still not found. Now this is an unrecoverable error.
25137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25138$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25139      has_space=`$ECHO "$complete" | $GREP " "`
25140      if test "x$has_space" != x; then
25141        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25142$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25143      fi
25144      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25145    fi
25146  fi
25147
25148  # Now new_path has a complete unix path to the binary
25149  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25150    # Keep paths in /bin as-is, but remove trailing .exe if any
25151    new_path="${new_path/%.exe/}"
25152    # Do not save /bin paths to all_fixpath_prefixes!
25153  else
25154    # Not in mixed or Windows style, start by that.
25155    new_path=`cmd //c echo $new_path`
25156
25157  input_path="$new_path"
25158  # Check if we need to convert this using DOS-style short mode. If the path
25159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25160  # take no chances and rewrite it.
25161  # Note: m4 eats our [], so we need to use [ and ] instead.
25162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25163  if test "x$has_forbidden_chars" != x; then
25164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25166  fi
25167
25168    # Output is in $new_path
25169
25170  windows_path="$new_path"
25171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25172    unix_path=`$CYGPATH -u "$windows_path"`
25173    new_path="$unix_path"
25174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25176    new_path="$unix_path"
25177  fi
25178
25179    # remove trailing .exe if any
25180    new_path="${new_path/%.exe/}"
25181
25182    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25183    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25184  fi
25185
25186  else
25187    # We're on a posix platform. Hooray! :)
25188    # First separate the path from the arguments. This will split at the first
25189    # space.
25190    complete="$STRIP"
25191    path="${complete%% *}"
25192    tmp="$complete EOL"
25193    arguments="${tmp#* }"
25194
25195    # Cannot rely on the command "which" here since it doesn't always work.
25196    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25197    if test -z "$is_absolute_path"; then
25198      # Path to executable is not absolute. Find it.
25199      IFS_save="$IFS"
25200      IFS=:
25201      for p in $PATH; do
25202        if test -f "$p/$path" && test -x "$p/$path"; then
25203          new_path="$p/$path"
25204          break
25205        fi
25206      done
25207      IFS="$IFS_save"
25208    else
25209      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25210$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25211      new_path="$path"
25212    fi
25213
25214    if test "x$new_path" = x; then
25215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25216$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25217        has_space=`$ECHO "$complete" | $GREP " "`
25218        if test "x$has_space" != x; then
25219          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25221        fi
25222        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25223      fi
25224  fi
25225
25226      # Now join together the path and the arguments once again
25227      if test "x$arguments" != xEOL; then
25228        new_complete="$new_path ${arguments% *}"
25229      else
25230        new_complete="$new_path"
25231      fi
25232
25233  if test "x$complete" != "x$new_complete"; then
25234      STRIP="$new_complete"
25235      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25236$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25237    fi
25238
25239    # Extract the first word of "mcs", so it can be a program name with args.
25240set dummy mcs; ac_word=$2
25241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25242$as_echo_n "checking for $ac_word... " >&6; }
25243if ${ac_cv_path_MCS+:} false; then :
25244  $as_echo_n "(cached) " >&6
25245else
25246  case $MCS in
25247  [\\/]* | ?:[\\/]*)
25248  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25249  ;;
25250  *)
25251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25252for as_dir in $PATH
25253do
25254  IFS=$as_save_IFS
25255  test -z "$as_dir" && as_dir=.
25256    for ac_exec_ext in '' $ac_executable_extensions; do
25257  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25258    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25260    break 2
25261  fi
25262done
25263  done
25264IFS=$as_save_IFS
25265
25266  ;;
25267esac
25268fi
25269MCS=$ac_cv_path_MCS
25270if test -n "$MCS"; then
25271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25272$as_echo "$MCS" >&6; }
25273else
25274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25275$as_echo "no" >&6; }
25276fi
25277
25278
25279
25280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25281
25282  # First separate the path from the arguments. This will split at the first
25283  # space.
25284  complete="$MCS"
25285  path="${complete%% *}"
25286  tmp="$complete EOL"
25287  arguments="${tmp#* }"
25288
25289  # Input might be given as Windows format, start by converting to
25290  # unix format.
25291  new_path=`$CYGPATH -u "$path"`
25292
25293  # Now try to locate executable using which
25294  new_path=`$WHICH "$new_path" 2> /dev/null`
25295  # bat and cmd files are not always considered executable in cygwin causing which
25296  # to not find them
25297  if test "x$new_path" = x \
25298           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25299           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25300    new_path=`$CYGPATH -u "$path"`
25301  fi
25302  if test "x$new_path" = x; then
25303    # Oops. Which didn't find the executable.
25304    # The splitting of arguments from the executable at a space might have been incorrect,
25305    # since paths with space are more likely in Windows. Give it another try with the whole
25306    # argument.
25307    path="$complete"
25308    arguments="EOL"
25309    new_path=`$CYGPATH -u "$path"`
25310    new_path=`$WHICH "$new_path" 2> /dev/null`
25311    # bat and cmd files are not always considered executable in cygwin causing which
25312    # to not find them
25313    if test "x$new_path" = x \
25314             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25315             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25316      new_path=`$CYGPATH -u "$path"`
25317    fi
25318    if test "x$new_path" = x; then
25319      # It's still not found. Now this is an unrecoverable error.
25320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25321$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25322      has_space=`$ECHO "$complete" | $GREP " "`
25323      if test "x$has_space" != x; then
25324        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25325$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25326      fi
25327      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25328    fi
25329  fi
25330
25331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25334  # "foo.exe" is OK but "foo" is an error.
25335  #
25336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25337  # It is also a way to make sure we got the proper file name for the real test later on.
25338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25339  if test "x$test_shortpath" = x; then
25340    # Short path failed, file does not exist as specified.
25341    # Try adding .exe or .cmd
25342    if test -f "${new_path}.exe"; then
25343       input_to_shortpath="${new_path}.exe"
25344    elif test -f "${new_path}.cmd"; then
25345       input_to_shortpath="${new_path}.cmd"
25346    else
25347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25348$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25349      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25350$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25351      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25352    fi
25353  else
25354    input_to_shortpath="$new_path"
25355  fi
25356
25357  # Call helper function which possibly converts this using DOS-style short mode.
25358  # If so, the updated path is stored in $new_path.
25359  new_path="$input_to_shortpath"
25360
25361  input_path="$input_to_shortpath"
25362  # Check if we need to convert this using DOS-style short mode. If the path
25363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25364  # take no chances and rewrite it.
25365  # Note: m4 eats our [], so we need to use [ and ] instead.
25366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25367  if test "x$has_forbidden_chars" != x; then
25368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25372      # Going to short mode and back again did indeed matter. Since short mode is
25373      # case insensitive, let's make it lowercase to improve readability.
25374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25375      # Now convert it back to Unix-stile (cygpath)
25376      input_path=`$CYGPATH -u "$shortmode_path"`
25377      new_path="$input_path"
25378    fi
25379  fi
25380
25381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25382  if test "x$test_cygdrive_prefix" = x; then
25383    # As a simple fix, exclude /usr/bin since it's not a real path.
25384    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25386      # a path prefixed by /cygdrive for fixpath to work.
25387      new_path="$CYGWIN_ROOT_PATH$input_path"
25388    fi
25389  fi
25390
25391  # remove trailing .exe if any
25392  new_path="${new_path/%.exe/}"
25393
25394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25395
25396  # First separate the path from the arguments. This will split at the first
25397  # space.
25398  complete="$MCS"
25399  path="${complete%% *}"
25400  tmp="$complete EOL"
25401  arguments="${tmp#* }"
25402
25403  # Input might be given as Windows format, start by converting to
25404  # unix format.
25405  new_path="$path"
25406
25407  windows_path="$new_path"
25408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25409    unix_path=`$CYGPATH -u "$windows_path"`
25410    new_path="$unix_path"
25411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25413    new_path="$unix_path"
25414  fi
25415
25416
25417  # Now try to locate executable using which
25418  new_path=`$WHICH "$new_path" 2> /dev/null`
25419
25420  if test "x$new_path" = x; then
25421    # Oops. Which didn't find the executable.
25422    # The splitting of arguments from the executable at a space might have been incorrect,
25423    # since paths with space are more likely in Windows. Give it another try with the whole
25424    # argument.
25425    path="$complete"
25426    arguments="EOL"
25427    new_path="$path"
25428
25429  windows_path="$new_path"
25430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25431    unix_path=`$CYGPATH -u "$windows_path"`
25432    new_path="$unix_path"
25433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25435    new_path="$unix_path"
25436  fi
25437
25438
25439    new_path=`$WHICH "$new_path" 2> /dev/null`
25440
25441    if test "x$new_path" = x; then
25442      # It's still not found. Now this is an unrecoverable error.
25443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25444$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25445      has_space=`$ECHO "$complete" | $GREP " "`
25446      if test "x$has_space" != x; then
25447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25449      fi
25450      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25451    fi
25452  fi
25453
25454  # Now new_path has a complete unix path to the binary
25455  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25456    # Keep paths in /bin as-is, but remove trailing .exe if any
25457    new_path="${new_path/%.exe/}"
25458    # Do not save /bin paths to all_fixpath_prefixes!
25459  else
25460    # Not in mixed or Windows style, start by that.
25461    new_path=`cmd //c echo $new_path`
25462
25463  input_path="$new_path"
25464  # Check if we need to convert this using DOS-style short mode. If the path
25465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25466  # take no chances and rewrite it.
25467  # Note: m4 eats our [], so we need to use [ and ] instead.
25468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25469  if test "x$has_forbidden_chars" != x; then
25470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25472  fi
25473
25474    # Output is in $new_path
25475
25476  windows_path="$new_path"
25477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25478    unix_path=`$CYGPATH -u "$windows_path"`
25479    new_path="$unix_path"
25480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25482    new_path="$unix_path"
25483  fi
25484
25485    # remove trailing .exe if any
25486    new_path="${new_path/%.exe/}"
25487
25488    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25489    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25490  fi
25491
25492  else
25493    # We're on a posix platform. Hooray! :)
25494    # First separate the path from the arguments. This will split at the first
25495    # space.
25496    complete="$MCS"
25497    path="${complete%% *}"
25498    tmp="$complete EOL"
25499    arguments="${tmp#* }"
25500
25501    # Cannot rely on the command "which" here since it doesn't always work.
25502    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25503    if test -z "$is_absolute_path"; then
25504      # Path to executable is not absolute. Find it.
25505      IFS_save="$IFS"
25506      IFS=:
25507      for p in $PATH; do
25508        if test -f "$p/$path" && test -x "$p/$path"; then
25509          new_path="$p/$path"
25510          break
25511        fi
25512      done
25513      IFS="$IFS_save"
25514    else
25515      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25516$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25517      new_path="$path"
25518    fi
25519
25520    if test "x$new_path" = x; then
25521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25522$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25523        has_space=`$ECHO "$complete" | $GREP " "`
25524        if test "x$has_space" != x; then
25525          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25526$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25527        fi
25528        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25529      fi
25530  fi
25531
25532      # Now join together the path and the arguments once again
25533      if test "x$arguments" != xEOL; then
25534        new_complete="$new_path ${arguments% *}"
25535      else
25536        new_complete="$new_path"
25537      fi
25538
25539  if test "x$complete" != "x$new_complete"; then
25540      MCS="$new_complete"
25541      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25542$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25543    fi
25544
25545elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25546    if test -n "$ac_tool_prefix"; then
25547  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25548set dummy ${ac_tool_prefix}nm; ac_word=$2
25549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25550$as_echo_n "checking for $ac_word... " >&6; }
25551if ${ac_cv_prog_NM+:} false; then :
25552  $as_echo_n "(cached) " >&6
25553else
25554  if test -n "$NM"; then
25555  ac_cv_prog_NM="$NM" # Let the user override the test.
25556else
25557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25558for as_dir in $PATH
25559do
25560  IFS=$as_save_IFS
25561  test -z "$as_dir" && as_dir=.
25562    for ac_exec_ext in '' $ac_executable_extensions; do
25563  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25564    ac_cv_prog_NM="${ac_tool_prefix}nm"
25565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25566    break 2
25567  fi
25568done
25569  done
25570IFS=$as_save_IFS
25571
25572fi
25573fi
25574NM=$ac_cv_prog_NM
25575if test -n "$NM"; then
25576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25577$as_echo "$NM" >&6; }
25578else
25579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25580$as_echo "no" >&6; }
25581fi
25582
25583
25584fi
25585if test -z "$ac_cv_prog_NM"; then
25586  ac_ct_NM=$NM
25587  # Extract the first word of "nm", so it can be a program name with args.
25588set dummy nm; ac_word=$2
25589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25590$as_echo_n "checking for $ac_word... " >&6; }
25591if ${ac_cv_prog_ac_ct_NM+:} false; then :
25592  $as_echo_n "(cached) " >&6
25593else
25594  if test -n "$ac_ct_NM"; then
25595  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25596else
25597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25598for as_dir in $PATH
25599do
25600  IFS=$as_save_IFS
25601  test -z "$as_dir" && as_dir=.
25602    for ac_exec_ext in '' $ac_executable_extensions; do
25603  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25604    ac_cv_prog_ac_ct_NM="nm"
25605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25606    break 2
25607  fi
25608done
25609  done
25610IFS=$as_save_IFS
25611
25612fi
25613fi
25614ac_ct_NM=$ac_cv_prog_ac_ct_NM
25615if test -n "$ac_ct_NM"; then
25616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25617$as_echo "$ac_ct_NM" >&6; }
25618else
25619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25620$as_echo "no" >&6; }
25621fi
25622
25623  if test "x$ac_ct_NM" = x; then
25624    NM=""
25625  else
25626    case $cross_compiling:$ac_tool_warned in
25627yes:)
25628{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25629$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25630ac_tool_warned=yes ;;
25631esac
25632    NM=$ac_ct_NM
25633  fi
25634else
25635  NM="$ac_cv_prog_NM"
25636fi
25637
25638
25639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25640
25641  # First separate the path from the arguments. This will split at the first
25642  # space.
25643  complete="$NM"
25644  path="${complete%% *}"
25645  tmp="$complete EOL"
25646  arguments="${tmp#* }"
25647
25648  # Input might be given as Windows format, start by converting to
25649  # unix format.
25650  new_path=`$CYGPATH -u "$path"`
25651
25652  # Now try to locate executable using which
25653  new_path=`$WHICH "$new_path" 2> /dev/null`
25654  # bat and cmd files are not always considered executable in cygwin causing which
25655  # to not find them
25656  if test "x$new_path" = x \
25657           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25658           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25659    new_path=`$CYGPATH -u "$path"`
25660  fi
25661  if test "x$new_path" = x; then
25662    # Oops. Which didn't find the executable.
25663    # The splitting of arguments from the executable at a space might have been incorrect,
25664    # since paths with space are more likely in Windows. Give it another try with the whole
25665    # argument.
25666    path="$complete"
25667    arguments="EOL"
25668    new_path=`$CYGPATH -u "$path"`
25669    new_path=`$WHICH "$new_path" 2> /dev/null`
25670    # bat and cmd files are not always considered executable in cygwin causing which
25671    # to not find them
25672    if test "x$new_path" = x \
25673             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25674             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25675      new_path=`$CYGPATH -u "$path"`
25676    fi
25677    if test "x$new_path" = x; then
25678      # It's still not found. Now this is an unrecoverable error.
25679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25680$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25681      has_space=`$ECHO "$complete" | $GREP " "`
25682      if test "x$has_space" != x; then
25683        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25684$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25685      fi
25686      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25687    fi
25688  fi
25689
25690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25693  # "foo.exe" is OK but "foo" is an error.
25694  #
25695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25696  # It is also a way to make sure we got the proper file name for the real test later on.
25697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25698  if test "x$test_shortpath" = x; then
25699    # Short path failed, file does not exist as specified.
25700    # Try adding .exe or .cmd
25701    if test -f "${new_path}.exe"; then
25702       input_to_shortpath="${new_path}.exe"
25703    elif test -f "${new_path}.cmd"; then
25704       input_to_shortpath="${new_path}.cmd"
25705    else
25706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25707$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25708      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25709$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25710      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25711    fi
25712  else
25713    input_to_shortpath="$new_path"
25714  fi
25715
25716  # Call helper function which possibly converts this using DOS-style short mode.
25717  # If so, the updated path is stored in $new_path.
25718  new_path="$input_to_shortpath"
25719
25720  input_path="$input_to_shortpath"
25721  # Check if we need to convert this using DOS-style short mode. If the path
25722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25723  # take no chances and rewrite it.
25724  # Note: m4 eats our [], so we need to use [ and ] instead.
25725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25726  if test "x$has_forbidden_chars" != x; then
25727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25731      # Going to short mode and back again did indeed matter. Since short mode is
25732      # case insensitive, let's make it lowercase to improve readability.
25733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25734      # Now convert it back to Unix-stile (cygpath)
25735      input_path=`$CYGPATH -u "$shortmode_path"`
25736      new_path="$input_path"
25737    fi
25738  fi
25739
25740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25741  if test "x$test_cygdrive_prefix" = x; then
25742    # As a simple fix, exclude /usr/bin since it's not a real path.
25743    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25745      # a path prefixed by /cygdrive for fixpath to work.
25746      new_path="$CYGWIN_ROOT_PATH$input_path"
25747    fi
25748  fi
25749
25750  # remove trailing .exe if any
25751  new_path="${new_path/%.exe/}"
25752
25753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25754
25755  # First separate the path from the arguments. This will split at the first
25756  # space.
25757  complete="$NM"
25758  path="${complete%% *}"
25759  tmp="$complete EOL"
25760  arguments="${tmp#* }"
25761
25762  # Input might be given as Windows format, start by converting to
25763  # unix format.
25764  new_path="$path"
25765
25766  windows_path="$new_path"
25767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25768    unix_path=`$CYGPATH -u "$windows_path"`
25769    new_path="$unix_path"
25770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25772    new_path="$unix_path"
25773  fi
25774
25775
25776  # Now try to locate executable using which
25777  new_path=`$WHICH "$new_path" 2> /dev/null`
25778
25779  if test "x$new_path" = x; then
25780    # Oops. Which didn't find the executable.
25781    # The splitting of arguments from the executable at a space might have been incorrect,
25782    # since paths with space are more likely in Windows. Give it another try with the whole
25783    # argument.
25784    path="$complete"
25785    arguments="EOL"
25786    new_path="$path"
25787
25788  windows_path="$new_path"
25789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25790    unix_path=`$CYGPATH -u "$windows_path"`
25791    new_path="$unix_path"
25792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25794    new_path="$unix_path"
25795  fi
25796
25797
25798    new_path=`$WHICH "$new_path" 2> /dev/null`
25799
25800    if test "x$new_path" = x; then
25801      # It's still not found. Now this is an unrecoverable error.
25802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25803$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25804      has_space=`$ECHO "$complete" | $GREP " "`
25805      if test "x$has_space" != x; then
25806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25808      fi
25809      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25810    fi
25811  fi
25812
25813  # Now new_path has a complete unix path to the binary
25814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25815    # Keep paths in /bin as-is, but remove trailing .exe if any
25816    new_path="${new_path/%.exe/}"
25817    # Do not save /bin paths to all_fixpath_prefixes!
25818  else
25819    # Not in mixed or Windows style, start by that.
25820    new_path=`cmd //c echo $new_path`
25821
25822  input_path="$new_path"
25823  # Check if we need to convert this using DOS-style short mode. If the path
25824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25825  # take no chances and rewrite it.
25826  # Note: m4 eats our [], so we need to use [ and ] instead.
25827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25828  if test "x$has_forbidden_chars" != x; then
25829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25831  fi
25832
25833    # Output is in $new_path
25834
25835  windows_path="$new_path"
25836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25837    unix_path=`$CYGPATH -u "$windows_path"`
25838    new_path="$unix_path"
25839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25841    new_path="$unix_path"
25842  fi
25843
25844    # remove trailing .exe if any
25845    new_path="${new_path/%.exe/}"
25846
25847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25849  fi
25850
25851  else
25852    # We're on a posix platform. Hooray! :)
25853    # First separate the path from the arguments. This will split at the first
25854    # space.
25855    complete="$NM"
25856    path="${complete%% *}"
25857    tmp="$complete EOL"
25858    arguments="${tmp#* }"
25859
25860    # Cannot rely on the command "which" here since it doesn't always work.
25861    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25862    if test -z "$is_absolute_path"; then
25863      # Path to executable is not absolute. Find it.
25864      IFS_save="$IFS"
25865      IFS=:
25866      for p in $PATH; do
25867        if test -f "$p/$path" && test -x "$p/$path"; then
25868          new_path="$p/$path"
25869          break
25870        fi
25871      done
25872      IFS="$IFS_save"
25873    else
25874      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25875$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25876      new_path="$path"
25877    fi
25878
25879    if test "x$new_path" = x; then
25880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25881$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25882        has_space=`$ECHO "$complete" | $GREP " "`
25883        if test "x$has_space" != x; then
25884          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25885$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25886        fi
25887        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25888      fi
25889  fi
25890
25891      # Now join together the path and the arguments once again
25892      if test "x$arguments" != xEOL; then
25893        new_complete="$new_path ${arguments% *}"
25894      else
25895        new_complete="$new_path"
25896      fi
25897
25898  if test "x$complete" != "x$new_complete"; then
25899      NM="$new_complete"
25900      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25901$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25902    fi
25903
25904    if test -n "$ac_tool_prefix"; then
25905  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25906set dummy ${ac_tool_prefix}strip; ac_word=$2
25907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25908$as_echo_n "checking for $ac_word... " >&6; }
25909if ${ac_cv_prog_STRIP+:} false; then :
25910  $as_echo_n "(cached) " >&6
25911else
25912  if test -n "$STRIP"; then
25913  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25914else
25915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25916for as_dir in $PATH
25917do
25918  IFS=$as_save_IFS
25919  test -z "$as_dir" && as_dir=.
25920    for ac_exec_ext in '' $ac_executable_extensions; do
25921  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25922    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25924    break 2
25925  fi
25926done
25927  done
25928IFS=$as_save_IFS
25929
25930fi
25931fi
25932STRIP=$ac_cv_prog_STRIP
25933if test -n "$STRIP"; then
25934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25935$as_echo "$STRIP" >&6; }
25936else
25937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25938$as_echo "no" >&6; }
25939fi
25940
25941
25942fi
25943if test -z "$ac_cv_prog_STRIP"; then
25944  ac_ct_STRIP=$STRIP
25945  # Extract the first word of "strip", so it can be a program name with args.
25946set dummy strip; ac_word=$2
25947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25948$as_echo_n "checking for $ac_word... " >&6; }
25949if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
25950  $as_echo_n "(cached) " >&6
25951else
25952  if test -n "$ac_ct_STRIP"; then
25953  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25954else
25955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25956for as_dir in $PATH
25957do
25958  IFS=$as_save_IFS
25959  test -z "$as_dir" && as_dir=.
25960    for ac_exec_ext in '' $ac_executable_extensions; do
25961  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25962    ac_cv_prog_ac_ct_STRIP="strip"
25963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25964    break 2
25965  fi
25966done
25967  done
25968IFS=$as_save_IFS
25969
25970fi
25971fi
25972ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25973if test -n "$ac_ct_STRIP"; then
25974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25975$as_echo "$ac_ct_STRIP" >&6; }
25976else
25977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25978$as_echo "no" >&6; }
25979fi
25980
25981  if test "x$ac_ct_STRIP" = x; then
25982    STRIP=""
25983  else
25984    case $cross_compiling:$ac_tool_warned in
25985yes:)
25986{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25987$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25988ac_tool_warned=yes ;;
25989esac
25990    STRIP=$ac_ct_STRIP
25991  fi
25992else
25993  STRIP="$ac_cv_prog_STRIP"
25994fi
25995
25996
25997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25998
25999  # First separate the path from the arguments. This will split at the first
26000  # space.
26001  complete="$STRIP"
26002  path="${complete%% *}"
26003  tmp="$complete EOL"
26004  arguments="${tmp#* }"
26005
26006  # Input might be given as Windows format, start by converting to
26007  # unix format.
26008  new_path=`$CYGPATH -u "$path"`
26009
26010  # Now try to locate executable using which
26011  new_path=`$WHICH "$new_path" 2> /dev/null`
26012  # bat and cmd files are not always considered executable in cygwin causing which
26013  # to not find them
26014  if test "x$new_path" = x \
26015           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26016           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26017    new_path=`$CYGPATH -u "$path"`
26018  fi
26019  if test "x$new_path" = x; then
26020    # Oops. Which didn't find the executable.
26021    # The splitting of arguments from the executable at a space might have been incorrect,
26022    # since paths with space are more likely in Windows. Give it another try with the whole
26023    # argument.
26024    path="$complete"
26025    arguments="EOL"
26026    new_path=`$CYGPATH -u "$path"`
26027    new_path=`$WHICH "$new_path" 2> /dev/null`
26028    # bat and cmd files are not always considered executable in cygwin causing which
26029    # to not find them
26030    if test "x$new_path" = x \
26031             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26032             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26033      new_path=`$CYGPATH -u "$path"`
26034    fi
26035    if test "x$new_path" = x; then
26036      # It's still not found. Now this is an unrecoverable error.
26037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26038$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26039      has_space=`$ECHO "$complete" | $GREP " "`
26040      if test "x$has_space" != x; then
26041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26043      fi
26044      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26045    fi
26046  fi
26047
26048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26051  # "foo.exe" is OK but "foo" is an error.
26052  #
26053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26054  # It is also a way to make sure we got the proper file name for the real test later on.
26055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26056  if test "x$test_shortpath" = x; then
26057    # Short path failed, file does not exist as specified.
26058    # Try adding .exe or .cmd
26059    if test -f "${new_path}.exe"; then
26060       input_to_shortpath="${new_path}.exe"
26061    elif test -f "${new_path}.cmd"; then
26062       input_to_shortpath="${new_path}.cmd"
26063    else
26064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26065$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26066      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26067$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26068      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26069    fi
26070  else
26071    input_to_shortpath="$new_path"
26072  fi
26073
26074  # Call helper function which possibly converts this using DOS-style short mode.
26075  # If so, the updated path is stored in $new_path.
26076  new_path="$input_to_shortpath"
26077
26078  input_path="$input_to_shortpath"
26079  # Check if we need to convert this using DOS-style short mode. If the path
26080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26081  # take no chances and rewrite it.
26082  # Note: m4 eats our [], so we need to use [ and ] instead.
26083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26084  if test "x$has_forbidden_chars" != x; then
26085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26089      # Going to short mode and back again did indeed matter. Since short mode is
26090      # case insensitive, let's make it lowercase to improve readability.
26091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26092      # Now convert it back to Unix-stile (cygpath)
26093      input_path=`$CYGPATH -u "$shortmode_path"`
26094      new_path="$input_path"
26095    fi
26096  fi
26097
26098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26099  if test "x$test_cygdrive_prefix" = x; then
26100    # As a simple fix, exclude /usr/bin since it's not a real path.
26101    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26103      # a path prefixed by /cygdrive for fixpath to work.
26104      new_path="$CYGWIN_ROOT_PATH$input_path"
26105    fi
26106  fi
26107
26108  # remove trailing .exe if any
26109  new_path="${new_path/%.exe/}"
26110
26111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26112
26113  # First separate the path from the arguments. This will split at the first
26114  # space.
26115  complete="$STRIP"
26116  path="${complete%% *}"
26117  tmp="$complete EOL"
26118  arguments="${tmp#* }"
26119
26120  # Input might be given as Windows format, start by converting to
26121  # unix format.
26122  new_path="$path"
26123
26124  windows_path="$new_path"
26125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26126    unix_path=`$CYGPATH -u "$windows_path"`
26127    new_path="$unix_path"
26128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26130    new_path="$unix_path"
26131  fi
26132
26133
26134  # Now try to locate executable using which
26135  new_path=`$WHICH "$new_path" 2> /dev/null`
26136
26137  if test "x$new_path" = x; then
26138    # Oops. Which didn't find the executable.
26139    # The splitting of arguments from the executable at a space might have been incorrect,
26140    # since paths with space are more likely in Windows. Give it another try with the whole
26141    # argument.
26142    path="$complete"
26143    arguments="EOL"
26144    new_path="$path"
26145
26146  windows_path="$new_path"
26147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26148    unix_path=`$CYGPATH -u "$windows_path"`
26149    new_path="$unix_path"
26150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26152    new_path="$unix_path"
26153  fi
26154
26155
26156    new_path=`$WHICH "$new_path" 2> /dev/null`
26157
26158    if test "x$new_path" = x; then
26159      # It's still not found. Now this is an unrecoverable error.
26160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26161$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26162      has_space=`$ECHO "$complete" | $GREP " "`
26163      if test "x$has_space" != x; then
26164        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26165$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26166      fi
26167      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26168    fi
26169  fi
26170
26171  # Now new_path has a complete unix path to the binary
26172  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26173    # Keep paths in /bin as-is, but remove trailing .exe if any
26174    new_path="${new_path/%.exe/}"
26175    # Do not save /bin paths to all_fixpath_prefixes!
26176  else
26177    # Not in mixed or Windows style, start by that.
26178    new_path=`cmd //c echo $new_path`
26179
26180  input_path="$new_path"
26181  # Check if we need to convert this using DOS-style short mode. If the path
26182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26183  # take no chances and rewrite it.
26184  # Note: m4 eats our [], so we need to use [ and ] instead.
26185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26186  if test "x$has_forbidden_chars" != x; then
26187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26189  fi
26190
26191    # Output is in $new_path
26192
26193  windows_path="$new_path"
26194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26195    unix_path=`$CYGPATH -u "$windows_path"`
26196    new_path="$unix_path"
26197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26199    new_path="$unix_path"
26200  fi
26201
26202    # remove trailing .exe if any
26203    new_path="${new_path/%.exe/}"
26204
26205    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26206    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26207  fi
26208
26209  else
26210    # We're on a posix platform. Hooray! :)
26211    # First separate the path from the arguments. This will split at the first
26212    # space.
26213    complete="$STRIP"
26214    path="${complete%% *}"
26215    tmp="$complete EOL"
26216    arguments="${tmp#* }"
26217
26218    # Cannot rely on the command "which" here since it doesn't always work.
26219    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26220    if test -z "$is_absolute_path"; then
26221      # Path to executable is not absolute. Find it.
26222      IFS_save="$IFS"
26223      IFS=:
26224      for p in $PATH; do
26225        if test -f "$p/$path" && test -x "$p/$path"; then
26226          new_path="$p/$path"
26227          break
26228        fi
26229      done
26230      IFS="$IFS_save"
26231    else
26232      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26233$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26234      new_path="$path"
26235    fi
26236
26237    if test "x$new_path" = x; then
26238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26239$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26240        has_space=`$ECHO "$complete" | $GREP " "`
26241        if test "x$has_space" != x; then
26242          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26243$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26244        fi
26245        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26246      fi
26247  fi
26248
26249      # Now join together the path and the arguments once again
26250      if test "x$arguments" != xEOL; then
26251        new_complete="$new_path ${arguments% *}"
26252      else
26253        new_complete="$new_path"
26254      fi
26255
26256  if test "x$complete" != "x$new_complete"; then
26257      STRIP="$new_complete"
26258      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26259$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26260    fi
26261
26262fi
26263
26264# objcopy is used for moving debug symbols to separate files when
26265# full debug symbols are enabled.
26266if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26267    if test -n "$ac_tool_prefix"; then
26268  for ac_prog in gobjcopy objcopy
26269  do
26270    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26271set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26273$as_echo_n "checking for $ac_word... " >&6; }
26274if ${ac_cv_prog_OBJCOPY+:} false; then :
26275  $as_echo_n "(cached) " >&6
26276else
26277  if test -n "$OBJCOPY"; then
26278  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26279else
26280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26281for as_dir in $PATH
26282do
26283  IFS=$as_save_IFS
26284  test -z "$as_dir" && as_dir=.
26285    for ac_exec_ext in '' $ac_executable_extensions; do
26286  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26287    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26289    break 2
26290  fi
26291done
26292  done
26293IFS=$as_save_IFS
26294
26295fi
26296fi
26297OBJCOPY=$ac_cv_prog_OBJCOPY
26298if test -n "$OBJCOPY"; then
26299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26300$as_echo "$OBJCOPY" >&6; }
26301else
26302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26303$as_echo "no" >&6; }
26304fi
26305
26306
26307    test -n "$OBJCOPY" && break
26308  done
26309fi
26310if test -z "$OBJCOPY"; then
26311  ac_ct_OBJCOPY=$OBJCOPY
26312  for ac_prog in gobjcopy objcopy
26313do
26314  # Extract the first word of "$ac_prog", so it can be a program name with args.
26315set dummy $ac_prog; ac_word=$2
26316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26317$as_echo_n "checking for $ac_word... " >&6; }
26318if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26319  $as_echo_n "(cached) " >&6
26320else
26321  if test -n "$ac_ct_OBJCOPY"; then
26322  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26323else
26324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26325for as_dir in $PATH
26326do
26327  IFS=$as_save_IFS
26328  test -z "$as_dir" && as_dir=.
26329    for ac_exec_ext in '' $ac_executable_extensions; do
26330  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26331    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26333    break 2
26334  fi
26335done
26336  done
26337IFS=$as_save_IFS
26338
26339fi
26340fi
26341ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26342if test -n "$ac_ct_OBJCOPY"; then
26343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26344$as_echo "$ac_ct_OBJCOPY" >&6; }
26345else
26346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26347$as_echo "no" >&6; }
26348fi
26349
26350
26351  test -n "$ac_ct_OBJCOPY" && break
26352done
26353
26354  if test "x$ac_ct_OBJCOPY" = x; then
26355    OBJCOPY=""
26356  else
26357    case $cross_compiling:$ac_tool_warned in
26358yes:)
26359{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26360$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26361ac_tool_warned=yes ;;
26362esac
26363    OBJCOPY=$ac_ct_OBJCOPY
26364  fi
26365fi
26366
26367    # Only call fixup if objcopy was found.
26368    if test -n "$OBJCOPY"; then
26369
26370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26371
26372  # First separate the path from the arguments. This will split at the first
26373  # space.
26374  complete="$OBJCOPY"
26375  path="${complete%% *}"
26376  tmp="$complete EOL"
26377  arguments="${tmp#* }"
26378
26379  # Input might be given as Windows format, start by converting to
26380  # unix format.
26381  new_path=`$CYGPATH -u "$path"`
26382
26383  # Now try to locate executable using which
26384  new_path=`$WHICH "$new_path" 2> /dev/null`
26385  # bat and cmd files are not always considered executable in cygwin causing which
26386  # to not find them
26387  if test "x$new_path" = x \
26388           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26389           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26390    new_path=`$CYGPATH -u "$path"`
26391  fi
26392  if test "x$new_path" = x; then
26393    # Oops. Which didn't find the executable.
26394    # The splitting of arguments from the executable at a space might have been incorrect,
26395    # since paths with space are more likely in Windows. Give it another try with the whole
26396    # argument.
26397    path="$complete"
26398    arguments="EOL"
26399    new_path=`$CYGPATH -u "$path"`
26400    new_path=`$WHICH "$new_path" 2> /dev/null`
26401    # bat and cmd files are not always considered executable in cygwin causing which
26402    # to not find them
26403    if test "x$new_path" = x \
26404             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26405             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26406      new_path=`$CYGPATH -u "$path"`
26407    fi
26408    if test "x$new_path" = x; then
26409      # It's still not found. Now this is an unrecoverable error.
26410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26411$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26412      has_space=`$ECHO "$complete" | $GREP " "`
26413      if test "x$has_space" != x; then
26414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26416      fi
26417      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26418    fi
26419  fi
26420
26421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26424  # "foo.exe" is OK but "foo" is an error.
26425  #
26426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26427  # It is also a way to make sure we got the proper file name for the real test later on.
26428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26429  if test "x$test_shortpath" = x; then
26430    # Short path failed, file does not exist as specified.
26431    # Try adding .exe or .cmd
26432    if test -f "${new_path}.exe"; then
26433       input_to_shortpath="${new_path}.exe"
26434    elif test -f "${new_path}.cmd"; then
26435       input_to_shortpath="${new_path}.cmd"
26436    else
26437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26438$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26439      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26440$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26441      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26442    fi
26443  else
26444    input_to_shortpath="$new_path"
26445  fi
26446
26447  # Call helper function which possibly converts this using DOS-style short mode.
26448  # If so, the updated path is stored in $new_path.
26449  new_path="$input_to_shortpath"
26450
26451  input_path="$input_to_shortpath"
26452  # Check if we need to convert this using DOS-style short mode. If the path
26453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26454  # take no chances and rewrite it.
26455  # Note: m4 eats our [], so we need to use [ and ] instead.
26456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26457  if test "x$has_forbidden_chars" != x; then
26458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26462      # Going to short mode and back again did indeed matter. Since short mode is
26463      # case insensitive, let's make it lowercase to improve readability.
26464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26465      # Now convert it back to Unix-stile (cygpath)
26466      input_path=`$CYGPATH -u "$shortmode_path"`
26467      new_path="$input_path"
26468    fi
26469  fi
26470
26471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26472  if test "x$test_cygdrive_prefix" = x; then
26473    # As a simple fix, exclude /usr/bin since it's not a real path.
26474    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26476      # a path prefixed by /cygdrive for fixpath to work.
26477      new_path="$CYGWIN_ROOT_PATH$input_path"
26478    fi
26479  fi
26480
26481  # remove trailing .exe if any
26482  new_path="${new_path/%.exe/}"
26483
26484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26485
26486  # First separate the path from the arguments. This will split at the first
26487  # space.
26488  complete="$OBJCOPY"
26489  path="${complete%% *}"
26490  tmp="$complete EOL"
26491  arguments="${tmp#* }"
26492
26493  # Input might be given as Windows format, start by converting to
26494  # unix format.
26495  new_path="$path"
26496
26497  windows_path="$new_path"
26498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26499    unix_path=`$CYGPATH -u "$windows_path"`
26500    new_path="$unix_path"
26501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26503    new_path="$unix_path"
26504  fi
26505
26506
26507  # Now try to locate executable using which
26508  new_path=`$WHICH "$new_path" 2> /dev/null`
26509
26510  if test "x$new_path" = x; then
26511    # Oops. Which didn't find the executable.
26512    # The splitting of arguments from the executable at a space might have been incorrect,
26513    # since paths with space are more likely in Windows. Give it another try with the whole
26514    # argument.
26515    path="$complete"
26516    arguments="EOL"
26517    new_path="$path"
26518
26519  windows_path="$new_path"
26520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26521    unix_path=`$CYGPATH -u "$windows_path"`
26522    new_path="$unix_path"
26523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26525    new_path="$unix_path"
26526  fi
26527
26528
26529    new_path=`$WHICH "$new_path" 2> /dev/null`
26530
26531    if test "x$new_path" = x; then
26532      # It's still not found. Now this is an unrecoverable error.
26533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26534$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26535      has_space=`$ECHO "$complete" | $GREP " "`
26536      if test "x$has_space" != x; then
26537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26539      fi
26540      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26541    fi
26542  fi
26543
26544  # Now new_path has a complete unix path to the binary
26545  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26546    # Keep paths in /bin as-is, but remove trailing .exe if any
26547    new_path="${new_path/%.exe/}"
26548    # Do not save /bin paths to all_fixpath_prefixes!
26549  else
26550    # Not in mixed or Windows style, start by that.
26551    new_path=`cmd //c echo $new_path`
26552
26553  input_path="$new_path"
26554  # Check if we need to convert this using DOS-style short mode. If the path
26555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26556  # take no chances and rewrite it.
26557  # Note: m4 eats our [], so we need to use [ and ] instead.
26558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26559  if test "x$has_forbidden_chars" != x; then
26560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26562  fi
26563
26564    # Output is in $new_path
26565
26566  windows_path="$new_path"
26567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26568    unix_path=`$CYGPATH -u "$windows_path"`
26569    new_path="$unix_path"
26570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26572    new_path="$unix_path"
26573  fi
26574
26575    # remove trailing .exe if any
26576    new_path="${new_path/%.exe/}"
26577
26578    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26579    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26580  fi
26581
26582  else
26583    # We're on a posix platform. Hooray! :)
26584    # First separate the path from the arguments. This will split at the first
26585    # space.
26586    complete="$OBJCOPY"
26587    path="${complete%% *}"
26588    tmp="$complete EOL"
26589    arguments="${tmp#* }"
26590
26591    # Cannot rely on the command "which" here since it doesn't always work.
26592    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26593    if test -z "$is_absolute_path"; then
26594      # Path to executable is not absolute. Find it.
26595      IFS_save="$IFS"
26596      IFS=:
26597      for p in $PATH; do
26598        if test -f "$p/$path" && test -x "$p/$path"; then
26599          new_path="$p/$path"
26600          break
26601        fi
26602      done
26603      IFS="$IFS_save"
26604    else
26605      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26606$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26607      new_path="$path"
26608    fi
26609
26610    if test "x$new_path" = x; then
26611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26612$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26613        has_space=`$ECHO "$complete" | $GREP " "`
26614        if test "x$has_space" != x; then
26615          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26616$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26617        fi
26618        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26619      fi
26620  fi
26621
26622      # Now join together the path and the arguments once again
26623      if test "x$arguments" != xEOL; then
26624        new_complete="$new_path ${arguments% *}"
26625      else
26626        new_complete="$new_path"
26627      fi
26628
26629  if test "x$complete" != "x$new_complete"; then
26630      OBJCOPY="$new_complete"
26631      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26632$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26633    fi
26634
26635    fi
26636fi
26637
26638if test -n "$ac_tool_prefix"; then
26639  for ac_prog in gobjdump objdump
26640  do
26641    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26642set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26644$as_echo_n "checking for $ac_word... " >&6; }
26645if ${ac_cv_prog_OBJDUMP+:} false; then :
26646  $as_echo_n "(cached) " >&6
26647else
26648  if test -n "$OBJDUMP"; then
26649  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26650else
26651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26652for as_dir in $PATH
26653do
26654  IFS=$as_save_IFS
26655  test -z "$as_dir" && as_dir=.
26656    for ac_exec_ext in '' $ac_executable_extensions; do
26657  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26658    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26660    break 2
26661  fi
26662done
26663  done
26664IFS=$as_save_IFS
26665
26666fi
26667fi
26668OBJDUMP=$ac_cv_prog_OBJDUMP
26669if test -n "$OBJDUMP"; then
26670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26671$as_echo "$OBJDUMP" >&6; }
26672else
26673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26674$as_echo "no" >&6; }
26675fi
26676
26677
26678    test -n "$OBJDUMP" && break
26679  done
26680fi
26681if test -z "$OBJDUMP"; then
26682  ac_ct_OBJDUMP=$OBJDUMP
26683  for ac_prog in gobjdump objdump
26684do
26685  # Extract the first word of "$ac_prog", so it can be a program name with args.
26686set dummy $ac_prog; ac_word=$2
26687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26688$as_echo_n "checking for $ac_word... " >&6; }
26689if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
26690  $as_echo_n "(cached) " >&6
26691else
26692  if test -n "$ac_ct_OBJDUMP"; then
26693  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26694else
26695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26696for as_dir in $PATH
26697do
26698  IFS=$as_save_IFS
26699  test -z "$as_dir" && as_dir=.
26700    for ac_exec_ext in '' $ac_executable_extensions; do
26701  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26702    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26704    break 2
26705  fi
26706done
26707  done
26708IFS=$as_save_IFS
26709
26710fi
26711fi
26712ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26713if test -n "$ac_ct_OBJDUMP"; then
26714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26715$as_echo "$ac_ct_OBJDUMP" >&6; }
26716else
26717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26718$as_echo "no" >&6; }
26719fi
26720
26721
26722  test -n "$ac_ct_OBJDUMP" && break
26723done
26724
26725  if test "x$ac_ct_OBJDUMP" = x; then
26726    OBJDUMP=""
26727  else
26728    case $cross_compiling:$ac_tool_warned in
26729yes:)
26730{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26731$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26732ac_tool_warned=yes ;;
26733esac
26734    OBJDUMP=$ac_ct_OBJDUMP
26735  fi
26736fi
26737
26738if test "x$OBJDUMP" != x; then
26739  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26740
26741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26742
26743  # First separate the path from the arguments. This will split at the first
26744  # space.
26745  complete="$OBJDUMP"
26746  path="${complete%% *}"
26747  tmp="$complete EOL"
26748  arguments="${tmp#* }"
26749
26750  # Input might be given as Windows format, start by converting to
26751  # unix format.
26752  new_path=`$CYGPATH -u "$path"`
26753
26754  # Now try to locate executable using which
26755  new_path=`$WHICH "$new_path" 2> /dev/null`
26756  # bat and cmd files are not always considered executable in cygwin causing which
26757  # to not find them
26758  if test "x$new_path" = x \
26759           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26760           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26761    new_path=`$CYGPATH -u "$path"`
26762  fi
26763  if test "x$new_path" = x; then
26764    # Oops. Which didn't find the executable.
26765    # The splitting of arguments from the executable at a space might have been incorrect,
26766    # since paths with space are more likely in Windows. Give it another try with the whole
26767    # argument.
26768    path="$complete"
26769    arguments="EOL"
26770    new_path=`$CYGPATH -u "$path"`
26771    new_path=`$WHICH "$new_path" 2> /dev/null`
26772    # bat and cmd files are not always considered executable in cygwin causing which
26773    # to not find them
26774    if test "x$new_path" = x \
26775             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26776             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26777      new_path=`$CYGPATH -u "$path"`
26778    fi
26779    if test "x$new_path" = x; then
26780      # It's still not found. Now this is an unrecoverable error.
26781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26782$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26783      has_space=`$ECHO "$complete" | $GREP " "`
26784      if test "x$has_space" != x; then
26785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26787      fi
26788      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26789    fi
26790  fi
26791
26792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26795  # "foo.exe" is OK but "foo" is an error.
26796  #
26797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26798  # It is also a way to make sure we got the proper file name for the real test later on.
26799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26800  if test "x$test_shortpath" = x; then
26801    # Short path failed, file does not exist as specified.
26802    # Try adding .exe or .cmd
26803    if test -f "${new_path}.exe"; then
26804       input_to_shortpath="${new_path}.exe"
26805    elif test -f "${new_path}.cmd"; then
26806       input_to_shortpath="${new_path}.cmd"
26807    else
26808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26809$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26810      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26811$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26812      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26813    fi
26814  else
26815    input_to_shortpath="$new_path"
26816  fi
26817
26818  # Call helper function which possibly converts this using DOS-style short mode.
26819  # If so, the updated path is stored in $new_path.
26820  new_path="$input_to_shortpath"
26821
26822  input_path="$input_to_shortpath"
26823  # Check if we need to convert this using DOS-style short mode. If the path
26824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26825  # take no chances and rewrite it.
26826  # Note: m4 eats our [], so we need to use [ and ] instead.
26827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26828  if test "x$has_forbidden_chars" != x; then
26829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26833      # Going to short mode and back again did indeed matter. Since short mode is
26834      # case insensitive, let's make it lowercase to improve readability.
26835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26836      # Now convert it back to Unix-stile (cygpath)
26837      input_path=`$CYGPATH -u "$shortmode_path"`
26838      new_path="$input_path"
26839    fi
26840  fi
26841
26842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26843  if test "x$test_cygdrive_prefix" = x; then
26844    # As a simple fix, exclude /usr/bin since it's not a real path.
26845    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26847      # a path prefixed by /cygdrive for fixpath to work.
26848      new_path="$CYGWIN_ROOT_PATH$input_path"
26849    fi
26850  fi
26851
26852  # remove trailing .exe if any
26853  new_path="${new_path/%.exe/}"
26854
26855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26856
26857  # First separate the path from the arguments. This will split at the first
26858  # space.
26859  complete="$OBJDUMP"
26860  path="${complete%% *}"
26861  tmp="$complete EOL"
26862  arguments="${tmp#* }"
26863
26864  # Input might be given as Windows format, start by converting to
26865  # unix format.
26866  new_path="$path"
26867
26868  windows_path="$new_path"
26869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26870    unix_path=`$CYGPATH -u "$windows_path"`
26871    new_path="$unix_path"
26872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26874    new_path="$unix_path"
26875  fi
26876
26877
26878  # Now try to locate executable using which
26879  new_path=`$WHICH "$new_path" 2> /dev/null`
26880
26881  if test "x$new_path" = x; then
26882    # Oops. Which didn't find the executable.
26883    # The splitting of arguments from the executable at a space might have been incorrect,
26884    # since paths with space are more likely in Windows. Give it another try with the whole
26885    # argument.
26886    path="$complete"
26887    arguments="EOL"
26888    new_path="$path"
26889
26890  windows_path="$new_path"
26891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26892    unix_path=`$CYGPATH -u "$windows_path"`
26893    new_path="$unix_path"
26894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26896    new_path="$unix_path"
26897  fi
26898
26899
26900    new_path=`$WHICH "$new_path" 2> /dev/null`
26901
26902    if test "x$new_path" = x; then
26903      # It's still not found. Now this is an unrecoverable error.
26904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26905$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26906      has_space=`$ECHO "$complete" | $GREP " "`
26907      if test "x$has_space" != x; then
26908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26910      fi
26911      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26912    fi
26913  fi
26914
26915  # Now new_path has a complete unix path to the binary
26916  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26917    # Keep paths in /bin as-is, but remove trailing .exe if any
26918    new_path="${new_path/%.exe/}"
26919    # Do not save /bin paths to all_fixpath_prefixes!
26920  else
26921    # Not in mixed or Windows style, start by that.
26922    new_path=`cmd //c echo $new_path`
26923
26924  input_path="$new_path"
26925  # Check if we need to convert this using DOS-style short mode. If the path
26926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26927  # take no chances and rewrite it.
26928  # Note: m4 eats our [], so we need to use [ and ] instead.
26929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26930  if test "x$has_forbidden_chars" != x; then
26931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26933  fi
26934
26935    # Output is in $new_path
26936
26937  windows_path="$new_path"
26938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26939    unix_path=`$CYGPATH -u "$windows_path"`
26940    new_path="$unix_path"
26941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26943    new_path="$unix_path"
26944  fi
26945
26946    # remove trailing .exe if any
26947    new_path="${new_path/%.exe/}"
26948
26949    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26950    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26951  fi
26952
26953  else
26954    # We're on a posix platform. Hooray! :)
26955    # First separate the path from the arguments. This will split at the first
26956    # space.
26957    complete="$OBJDUMP"
26958    path="${complete%% *}"
26959    tmp="$complete EOL"
26960    arguments="${tmp#* }"
26961
26962    # Cannot rely on the command "which" here since it doesn't always work.
26963    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26964    if test -z "$is_absolute_path"; then
26965      # Path to executable is not absolute. Find it.
26966      IFS_save="$IFS"
26967      IFS=:
26968      for p in $PATH; do
26969        if test -f "$p/$path" && test -x "$p/$path"; then
26970          new_path="$p/$path"
26971          break
26972        fi
26973      done
26974      IFS="$IFS_save"
26975    else
26976      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26977$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26978      new_path="$path"
26979    fi
26980
26981    if test "x$new_path" = x; then
26982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26983$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26984        has_space=`$ECHO "$complete" | $GREP " "`
26985        if test "x$has_space" != x; then
26986          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26987$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26988        fi
26989        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26990      fi
26991  fi
26992
26993      # Now join together the path and the arguments once again
26994      if test "x$arguments" != xEOL; then
26995        new_complete="$new_path ${arguments% *}"
26996      else
26997        new_complete="$new_path"
26998      fi
26999
27000  if test "x$complete" != "x$new_complete"; then
27001      OBJDUMP="$new_complete"
27002      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27003$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27004    fi
27005
27006fi
27007
27008if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27009   # Extract the first word of "lipo", so it can be a program name with args.
27010set dummy lipo; ac_word=$2
27011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27012$as_echo_n "checking for $ac_word... " >&6; }
27013if ${ac_cv_path_LIPO+:} false; then :
27014  $as_echo_n "(cached) " >&6
27015else
27016  case $LIPO in
27017  [\\/]* | ?:[\\/]*)
27018  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27019  ;;
27020  *)
27021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27022for as_dir in $PATH
27023do
27024  IFS=$as_save_IFS
27025  test -z "$as_dir" && as_dir=.
27026    for ac_exec_ext in '' $ac_executable_extensions; do
27027  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27028    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27030    break 2
27031  fi
27032done
27033  done
27034IFS=$as_save_IFS
27035
27036  ;;
27037esac
27038fi
27039LIPO=$ac_cv_path_LIPO
27040if test -n "$LIPO"; then
27041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27042$as_echo "$LIPO" >&6; }
27043else
27044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27045$as_echo "no" >&6; }
27046fi
27047
27048
27049
27050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051
27052  # First separate the path from the arguments. This will split at the first
27053  # space.
27054  complete="$LIPO"
27055  path="${complete%% *}"
27056  tmp="$complete EOL"
27057  arguments="${tmp#* }"
27058
27059  # Input might be given as Windows format, start by converting to
27060  # unix format.
27061  new_path=`$CYGPATH -u "$path"`
27062
27063  # Now try to locate executable using which
27064  new_path=`$WHICH "$new_path" 2> /dev/null`
27065  # bat and cmd files are not always considered executable in cygwin causing which
27066  # to not find them
27067  if test "x$new_path" = x \
27068           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27069           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27070    new_path=`$CYGPATH -u "$path"`
27071  fi
27072  if test "x$new_path" = x; then
27073    # Oops. Which didn't find the executable.
27074    # The splitting of arguments from the executable at a space might have been incorrect,
27075    # since paths with space are more likely in Windows. Give it another try with the whole
27076    # argument.
27077    path="$complete"
27078    arguments="EOL"
27079    new_path=`$CYGPATH -u "$path"`
27080    new_path=`$WHICH "$new_path" 2> /dev/null`
27081    # bat and cmd files are not always considered executable in cygwin causing which
27082    # to not find them
27083    if test "x$new_path" = x \
27084             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27085             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27086      new_path=`$CYGPATH -u "$path"`
27087    fi
27088    if test "x$new_path" = x; then
27089      # It's still not found. Now this is an unrecoverable error.
27090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27091$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27092      has_space=`$ECHO "$complete" | $GREP " "`
27093      if test "x$has_space" != x; then
27094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27096      fi
27097      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27098    fi
27099  fi
27100
27101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27104  # "foo.exe" is OK but "foo" is an error.
27105  #
27106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27107  # It is also a way to make sure we got the proper file name for the real test later on.
27108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27109  if test "x$test_shortpath" = x; then
27110    # Short path failed, file does not exist as specified.
27111    # Try adding .exe or .cmd
27112    if test -f "${new_path}.exe"; then
27113       input_to_shortpath="${new_path}.exe"
27114    elif test -f "${new_path}.cmd"; then
27115       input_to_shortpath="${new_path}.cmd"
27116    else
27117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27118$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27119      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27120$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27121      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27122    fi
27123  else
27124    input_to_shortpath="$new_path"
27125  fi
27126
27127  # Call helper function which possibly converts this using DOS-style short mode.
27128  # If so, the updated path is stored in $new_path.
27129  new_path="$input_to_shortpath"
27130
27131  input_path="$input_to_shortpath"
27132  # Check if we need to convert this using DOS-style short mode. If the path
27133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27134  # take no chances and rewrite it.
27135  # Note: m4 eats our [], so we need to use [ and ] instead.
27136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27137  if test "x$has_forbidden_chars" != x; then
27138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27142      # Going to short mode and back again did indeed matter. Since short mode is
27143      # case insensitive, let's make it lowercase to improve readability.
27144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27145      # Now convert it back to Unix-stile (cygpath)
27146      input_path=`$CYGPATH -u "$shortmode_path"`
27147      new_path="$input_path"
27148    fi
27149  fi
27150
27151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27152  if test "x$test_cygdrive_prefix" = x; then
27153    # As a simple fix, exclude /usr/bin since it's not a real path.
27154    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27156      # a path prefixed by /cygdrive for fixpath to work.
27157      new_path="$CYGWIN_ROOT_PATH$input_path"
27158    fi
27159  fi
27160
27161  # remove trailing .exe if any
27162  new_path="${new_path/%.exe/}"
27163
27164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27165
27166  # First separate the path from the arguments. This will split at the first
27167  # space.
27168  complete="$LIPO"
27169  path="${complete%% *}"
27170  tmp="$complete EOL"
27171  arguments="${tmp#* }"
27172
27173  # Input might be given as Windows format, start by converting to
27174  # unix format.
27175  new_path="$path"
27176
27177  windows_path="$new_path"
27178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27179    unix_path=`$CYGPATH -u "$windows_path"`
27180    new_path="$unix_path"
27181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27183    new_path="$unix_path"
27184  fi
27185
27186
27187  # Now try to locate executable using which
27188  new_path=`$WHICH "$new_path" 2> /dev/null`
27189
27190  if test "x$new_path" = x; then
27191    # Oops. Which didn't find the executable.
27192    # The splitting of arguments from the executable at a space might have been incorrect,
27193    # since paths with space are more likely in Windows. Give it another try with the whole
27194    # argument.
27195    path="$complete"
27196    arguments="EOL"
27197    new_path="$path"
27198
27199  windows_path="$new_path"
27200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27201    unix_path=`$CYGPATH -u "$windows_path"`
27202    new_path="$unix_path"
27203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27205    new_path="$unix_path"
27206  fi
27207
27208
27209    new_path=`$WHICH "$new_path" 2> /dev/null`
27210
27211    if test "x$new_path" = x; then
27212      # It's still not found. Now this is an unrecoverable error.
27213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27214$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27215      has_space=`$ECHO "$complete" | $GREP " "`
27216      if test "x$has_space" != x; then
27217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27219      fi
27220      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27221    fi
27222  fi
27223
27224  # Now new_path has a complete unix path to the binary
27225  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27226    # Keep paths in /bin as-is, but remove trailing .exe if any
27227    new_path="${new_path/%.exe/}"
27228    # Do not save /bin paths to all_fixpath_prefixes!
27229  else
27230    # Not in mixed or Windows style, start by that.
27231    new_path=`cmd //c echo $new_path`
27232
27233  input_path="$new_path"
27234  # Check if we need to convert this using DOS-style short mode. If the path
27235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27236  # take no chances and rewrite it.
27237  # Note: m4 eats our [], so we need to use [ and ] instead.
27238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27239  if test "x$has_forbidden_chars" != x; then
27240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27242  fi
27243
27244    # Output is in $new_path
27245
27246  windows_path="$new_path"
27247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27248    unix_path=`$CYGPATH -u "$windows_path"`
27249    new_path="$unix_path"
27250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27252    new_path="$unix_path"
27253  fi
27254
27255    # remove trailing .exe if any
27256    new_path="${new_path/%.exe/}"
27257
27258    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27259    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27260  fi
27261
27262  else
27263    # We're on a posix platform. Hooray! :)
27264    # First separate the path from the arguments. This will split at the first
27265    # space.
27266    complete="$LIPO"
27267    path="${complete%% *}"
27268    tmp="$complete EOL"
27269    arguments="${tmp#* }"
27270
27271    # Cannot rely on the command "which" here since it doesn't always work.
27272    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27273    if test -z "$is_absolute_path"; then
27274      # Path to executable is not absolute. Find it.
27275      IFS_save="$IFS"
27276      IFS=:
27277      for p in $PATH; do
27278        if test -f "$p/$path" && test -x "$p/$path"; then
27279          new_path="$p/$path"
27280          break
27281        fi
27282      done
27283      IFS="$IFS_save"
27284    else
27285      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27286$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27287      new_path="$path"
27288    fi
27289
27290    if test "x$new_path" = x; then
27291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27292$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27293        has_space=`$ECHO "$complete" | $GREP " "`
27294        if test "x$has_space" != x; then
27295          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27296$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27297        fi
27298        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27299      fi
27300  fi
27301
27302      # Now join together the path and the arguments once again
27303      if test "x$arguments" != xEOL; then
27304        new_complete="$new_path ${arguments% *}"
27305      else
27306        new_complete="$new_path"
27307      fi
27308
27309  if test "x$complete" != "x$new_complete"; then
27310      LIPO="$new_complete"
27311      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27312$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27313    fi
27314
27315fi
27316
27317# Restore old path without tools dir
27318PATH="$OLD_PATH"
27319
27320
27321# FIXME: Currently we must test this after paths but before flags. Fix!
27322
27323# And we can test some aspects on the target using configure macros.
27324
27325
27326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27327$as_echo_n "checking for ANSI C header files... " >&6; }
27328if ${ac_cv_header_stdc+:} false; then :
27329  $as_echo_n "(cached) " >&6
27330else
27331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27332/* end confdefs.h.  */
27333#include <stdlib.h>
27334#include <stdarg.h>
27335#include <string.h>
27336#include <float.h>
27337
27338int
27339main ()
27340{
27341
27342  ;
27343  return 0;
27344}
27345_ACEOF
27346if ac_fn_cxx_try_compile "$LINENO"; then :
27347  ac_cv_header_stdc=yes
27348else
27349  ac_cv_header_stdc=no
27350fi
27351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27352
27353if test $ac_cv_header_stdc = yes; then
27354  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27355  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27356/* end confdefs.h.  */
27357#include <string.h>
27358
27359_ACEOF
27360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27361  $EGREP "memchr" >/dev/null 2>&1; then :
27362
27363else
27364  ac_cv_header_stdc=no
27365fi
27366rm -f conftest*
27367
27368fi
27369
27370if test $ac_cv_header_stdc = yes; then
27371  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27373/* end confdefs.h.  */
27374#include <stdlib.h>
27375
27376_ACEOF
27377if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27378  $EGREP "free" >/dev/null 2>&1; then :
27379
27380else
27381  ac_cv_header_stdc=no
27382fi
27383rm -f conftest*
27384
27385fi
27386
27387if test $ac_cv_header_stdc = yes; then
27388  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27389  if test "$cross_compiling" = yes; then :
27390  :
27391else
27392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27393/* end confdefs.h.  */
27394#include <ctype.h>
27395#include <stdlib.h>
27396#if ((' ' & 0x0FF) == 0x020)
27397# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27398# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27399#else
27400# define ISLOWER(c) \
27401		   (('a' <= (c) && (c) <= 'i') \
27402		     || ('j' <= (c) && (c) <= 'r') \
27403		     || ('s' <= (c) && (c) <= 'z'))
27404# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27405#endif
27406
27407#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27408int
27409main ()
27410{
27411  int i;
27412  for (i = 0; i < 256; i++)
27413    if (XOR (islower (i), ISLOWER (i))
27414	|| toupper (i) != TOUPPER (i))
27415      return 2;
27416  return 0;
27417}
27418_ACEOF
27419if ac_fn_cxx_try_run "$LINENO"; then :
27420
27421else
27422  ac_cv_header_stdc=no
27423fi
27424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27425  conftest.$ac_objext conftest.beam conftest.$ac_ext
27426fi
27427
27428fi
27429fi
27430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27431$as_echo "$ac_cv_header_stdc" >&6; }
27432if test $ac_cv_header_stdc = yes; then
27433
27434$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27435
27436fi
27437
27438# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27439for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27440		  inttypes.h stdint.h unistd.h
27441do :
27442  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27443ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27444"
27445if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27446  cat >>confdefs.h <<_ACEOF
27447#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27448_ACEOF
27449
27450fi
27451
27452done
27453
27454
27455
27456###############################################################################
27457#
27458# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27459# (The JVM can use 32 or 64 bit Java pointers but that decision
27460# is made at runtime.)
27461#
27462if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27463  # Always specify -m flags on Solaris
27464
27465  # keep track of c/cxx flags that we added outselves...
27466  #   to prevent emitting warning...
27467  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27468  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27469  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27470
27471  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27472  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27473  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27474
27475  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27476  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27477  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27478
27479elif test "x$COMPILE_TYPE" = xreduced; then
27480  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27481    # Specify -m if running reduced on other Posix platforms
27482
27483  # keep track of c/cxx flags that we added outselves...
27484  #   to prevent emitting warning...
27485  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27486  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27487  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27488
27489  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27490  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27491  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27492
27493  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27494  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27495  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27496
27497  fi
27498fi
27499
27500# Make compilation sanity check
27501for ac_header in stdio.h
27502do :
27503  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27504if test "x$ac_cv_header_stdio_h" = xyes; then :
27505  cat >>confdefs.h <<_ACEOF
27506#define HAVE_STDIO_H 1
27507_ACEOF
27508
27509else
27510
27511  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27512$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27513  if test "x$COMPILE_TYPE" = xreduced; then
27514    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27515$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27516  elif test "x$COMPILE_TYPE" = xcross; then
27517    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27518$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27519  fi
27520  as_fn_error $? "Cannot continue." "$LINENO" 5
27521
27522fi
27523
27524done
27525
27526
27527# The cast to long int works around a bug in the HP C Compiler
27528# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27529# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27530# This bug is HP SR number 8606223364.
27531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27532$as_echo_n "checking size of int *... " >&6; }
27533if ${ac_cv_sizeof_int_p+:} false; then :
27534  $as_echo_n "(cached) " >&6
27535else
27536  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27537
27538else
27539  if test "$ac_cv_type_int_p" = yes; then
27540     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27542as_fn_error 77 "cannot compute sizeof (int *)
27543See \`config.log' for more details" "$LINENO" 5; }
27544   else
27545     ac_cv_sizeof_int_p=0
27546   fi
27547fi
27548
27549fi
27550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27551$as_echo "$ac_cv_sizeof_int_p" >&6; }
27552
27553
27554
27555cat >>confdefs.h <<_ACEOF
27556#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27557_ACEOF
27558
27559
27560
27561if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27562  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27563  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27564fi
27565
27566if test "x$SIZEOF_INT_P" = x; then
27567    # The test failed, lets stick to the assumed value.
27568    { $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
27569$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27570else
27571    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27572
27573    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27574        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
27575    fi
27576fi
27577
27578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27579$as_echo_n "checking for target address size... " >&6; }
27580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27581$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27582
27583
27584###############################################################################
27585#
27586# Is the target little of big endian?
27587#
27588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27589$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27590if ${ac_cv_c_bigendian+:} false; then :
27591  $as_echo_n "(cached) " >&6
27592else
27593  ac_cv_c_bigendian=unknown
27594    # See if we're dealing with a universal compiler.
27595    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27596/* end confdefs.h.  */
27597#ifndef __APPLE_CC__
27598	       not a universal capable compiler
27599	     #endif
27600	     typedef int dummy;
27601
27602_ACEOF
27603if ac_fn_cxx_try_compile "$LINENO"; then :
27604
27605	# Check for potential -arch flags.  It is not universal unless
27606	# there are at least two -arch flags with different values.
27607	ac_arch=
27608	ac_prev=
27609	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27610	 if test -n "$ac_prev"; then
27611	   case $ac_word in
27612	     i?86 | x86_64 | ppc | ppc64)
27613	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27614		 ac_arch=$ac_word
27615	       else
27616		 ac_cv_c_bigendian=universal
27617		 break
27618	       fi
27619	       ;;
27620	   esac
27621	   ac_prev=
27622	 elif test "x$ac_word" = "x-arch"; then
27623	   ac_prev=arch
27624	 fi
27625       done
27626fi
27627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27628    if test $ac_cv_c_bigendian = unknown; then
27629      # See if sys/param.h defines the BYTE_ORDER macro.
27630      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27631/* end confdefs.h.  */
27632#include <sys/types.h>
27633	     #include <sys/param.h>
27634
27635int
27636main ()
27637{
27638#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27639		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27640		     && LITTLE_ENDIAN)
27641	      bogus endian macros
27642	     #endif
27643
27644  ;
27645  return 0;
27646}
27647_ACEOF
27648if ac_fn_cxx_try_compile "$LINENO"; then :
27649  # It does; now see whether it defined to BIG_ENDIAN or not.
27650	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27651/* end confdefs.h.  */
27652#include <sys/types.h>
27653		#include <sys/param.h>
27654
27655int
27656main ()
27657{
27658#if BYTE_ORDER != BIG_ENDIAN
27659		 not big endian
27660		#endif
27661
27662  ;
27663  return 0;
27664}
27665_ACEOF
27666if ac_fn_cxx_try_compile "$LINENO"; then :
27667  ac_cv_c_bigendian=yes
27668else
27669  ac_cv_c_bigendian=no
27670fi
27671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27672fi
27673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27674    fi
27675    if test $ac_cv_c_bigendian = unknown; then
27676      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27677      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27678/* end confdefs.h.  */
27679#include <limits.h>
27680
27681int
27682main ()
27683{
27684#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27685	      bogus endian macros
27686	     #endif
27687
27688  ;
27689  return 0;
27690}
27691_ACEOF
27692if ac_fn_cxx_try_compile "$LINENO"; then :
27693  # It does; now see whether it defined to _BIG_ENDIAN or not.
27694	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27695/* end confdefs.h.  */
27696#include <limits.h>
27697
27698int
27699main ()
27700{
27701#ifndef _BIG_ENDIAN
27702		 not big endian
27703		#endif
27704
27705  ;
27706  return 0;
27707}
27708_ACEOF
27709if ac_fn_cxx_try_compile "$LINENO"; then :
27710  ac_cv_c_bigendian=yes
27711else
27712  ac_cv_c_bigendian=no
27713fi
27714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27715fi
27716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27717    fi
27718    if test $ac_cv_c_bigendian = unknown; then
27719      # Compile a test program.
27720      if test "$cross_compiling" = yes; then :
27721  # Try to guess by grepping values from an object file.
27722	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27723/* end confdefs.h.  */
27724short int ascii_mm[] =
27725		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27726		short int ascii_ii[] =
27727		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27728		int use_ascii (int i) {
27729		  return ascii_mm[i] + ascii_ii[i];
27730		}
27731		short int ebcdic_ii[] =
27732		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27733		short int ebcdic_mm[] =
27734		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27735		int use_ebcdic (int i) {
27736		  return ebcdic_mm[i] + ebcdic_ii[i];
27737		}
27738		extern int foo;
27739
27740int
27741main ()
27742{
27743return use_ascii (foo) == use_ebcdic (foo);
27744  ;
27745  return 0;
27746}
27747_ACEOF
27748if ac_fn_cxx_try_compile "$LINENO"; then :
27749  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27750	      ac_cv_c_bigendian=yes
27751	    fi
27752	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27753	      if test "$ac_cv_c_bigendian" = unknown; then
27754		ac_cv_c_bigendian=no
27755	      else
27756		# finding both strings is unlikely to happen, but who knows?
27757		ac_cv_c_bigendian=unknown
27758	      fi
27759	    fi
27760fi
27761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27762else
27763  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27764/* end confdefs.h.  */
27765$ac_includes_default
27766int
27767main ()
27768{
27769
27770	     /* Are we little or big endian?  From Harbison&Steele.  */
27771	     union
27772	     {
27773	       long int l;
27774	       char c[sizeof (long int)];
27775	     } u;
27776	     u.l = 1;
27777	     return u.c[sizeof (long int) - 1] == 1;
27778
27779  ;
27780  return 0;
27781}
27782_ACEOF
27783if ac_fn_cxx_try_run "$LINENO"; then :
27784  ac_cv_c_bigendian=no
27785else
27786  ac_cv_c_bigendian=yes
27787fi
27788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27789  conftest.$ac_objext conftest.beam conftest.$ac_ext
27790fi
27791
27792    fi
27793fi
27794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27795$as_echo "$ac_cv_c_bigendian" >&6; }
27796 case $ac_cv_c_bigendian in #(
27797   yes)
27798     ENDIAN="big";; #(
27799   no)
27800     ENDIAN="little" ;; #(
27801   universal)
27802     ENDIAN="universal_endianness"
27803     ;; #(
27804   *)
27805     ENDIAN="unknown" ;;
27806 esac
27807
27808
27809if test "x$ENDIAN" = xuniversal_endianness; then
27810    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27811fi
27812if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27813    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
27814fi
27815
27816
27817# Configure flags for the tools
27818
27819
27820###############################################################################
27821#
27822# How to compile shared libraries.
27823#
27824
27825if test "x$GCC" = xyes; then
27826    COMPILER_NAME=gcc
27827    PICFLAG="-fPIC"
27828    LIBRARY_PREFIX=lib
27829    SHARED_LIBRARY='lib$1.so'
27830    STATIC_LIBRARY='lib$1.a'
27831    SHARED_LIBRARY_FLAGS="-shared"
27832    SHARED_LIBRARY_SUFFIX='.so'
27833    STATIC_LIBRARY_SUFFIX='.a'
27834    OBJ_SUFFIX='.o'
27835    EXE_SUFFIX=''
27836    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27837    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27838    C_FLAG_REORDER=''
27839    CXX_FLAG_REORDER=''
27840    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27841    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27842    LD="$CC"
27843    LDEXE="$CC"
27844    LDCXX="$CXX"
27845    LDEXECXX="$CXX"
27846    POST_STRIP_CMD="$STRIP -g"
27847
27848    # Linking is different on MacOSX
27849    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27850        # Might change in the future to clang.
27851        COMPILER_NAME=gcc
27852        SHARED_LIBRARY='lib$1.dylib'
27853        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27854        SHARED_LIBRARY_SUFFIX='.dylib'
27855        EXE_SUFFIX=''
27856        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27857        SET_SHARED_LIBRARY_MAPFILE=''
27858        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27859        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27860        POST_STRIP_CMD="$STRIP -S"
27861    fi
27862else
27863    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27864        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27865        COMPILER_NAME=ossc
27866        PICFLAG="-KPIC"
27867        LIBRARY_PREFIX=lib
27868        SHARED_LIBRARY='lib$1.so'
27869        STATIC_LIBRARY='lib$1.a'
27870        SHARED_LIBRARY_FLAGS="-G"
27871        SHARED_LIBRARY_SUFFIX='.so'
27872        STATIC_LIBRARY_SUFFIX='.a'
27873        OBJ_SUFFIX='.o'
27874        EXE_SUFFIX=''
27875        SET_SHARED_LIBRARY_NAME=''
27876        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27877	C_FLAG_REORDER='-xF'
27878	CXX_FLAG_REORDER='-xF'
27879        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27880        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27881        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27882        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27883        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27884        POST_STRIP_CMD="$STRIP -x"
27885        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27886    fi
27887    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27888        # If it is not gcc, then assume it is the MS Visual Studio compiler
27889        COMPILER_NAME=cl
27890        PICFLAG=""
27891        LIBRARY_PREFIX=
27892        SHARED_LIBRARY='$1.dll'
27893        STATIC_LIBRARY='$1.lib'
27894        SHARED_LIBRARY_FLAGS="-LD"
27895        SHARED_LIBRARY_SUFFIX='.dll'
27896        STATIC_LIBRARY_SUFFIX='.lib'
27897        OBJ_SUFFIX='.obj'
27898        EXE_SUFFIX='.exe'
27899        SET_SHARED_LIBRARY_NAME=''
27900        SET_SHARED_LIBRARY_MAPFILE=''
27901        SET_SHARED_LIBRARY_ORIGIN=''
27902        SET_EXECUTABLE_ORIGIN=''
27903    fi
27904fi
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923# The (cross) compiler is now configured, we can now test capabilities
27924# of the target platform.
27925
27926
27927
27928###############################################################################
27929#
27930# Setup the opt flags for different compilers
27931# and different operating systems.
27932#
27933
27934#
27935# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27936#
27937if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27938    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27939    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27940    CFLAGS="$CFLAGS -mstackrealign"
27941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27942$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27943    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27944/* end confdefs.h.  */
27945int main() { return 0; }
27946_ACEOF
27947if ac_fn_cxx_try_link "$LINENO"; then :
27948
27949		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27950$as_echo "yes" >&6; }
27951
27952else
27953
27954		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27955$as_echo "no" >&6; }
27956	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27957
27958fi
27959rm -f core conftest.err conftest.$ac_objext \
27960    conftest$ac_exeext conftest.$ac_ext
27961fi
27962
27963C_FLAG_DEPS="-MMD -MF"
27964CXX_FLAG_DEPS="-MMD -MF"
27965
27966case $COMPILER_TYPE in
27967  CC )
27968    D_FLAG="-g"
27969    case $COMPILER_NAME in
27970      gcc )
27971      	case $OPENJDK_TARGET_OS in
27972	  macosx )
27973	    # On MacOSX we optimize for size, something
27974	    # we should do for all platforms?
27975	    C_O_FLAG_HI="-Os"
27976	    C_O_FLAG_NORM="-Os"
27977	    C_O_FLAG_NONE=""
27978	    ;;
27979	  *)
27980	    C_O_FLAG_HI="-O3"
27981	    C_O_FLAG_NORM="-O2"
27982	    C_O_FLAG_NONE="-O0"
27983	    CFLAGS_DEBUG_SYMBOLS="-g"
27984	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27985	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27986	       CFLAGS_DEBUG_SYMBOLS="-g1"
27987	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27988	    fi
27989	    ;;
27990	esac
27991        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27992        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27993        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27994        ;;
27995      ossc )
27996        #
27997        # Forte has different names for this with their C++ compiler...
27998        #
27999        C_FLAG_DEPS="-xMMD -xMF"
28000        CXX_FLAG_DEPS="-xMMD -xMF"
28001
28002        # Extra options used with HIGHEST
28003        #
28004        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28005        #          done with care, there are some assumptions below that need to
28006        #          be understood about the use of pointers, and IEEE behavior.
28007        #
28008        # Use non-standard floating point mode (not IEEE 754)
28009        CC_HIGHEST="$CC_HIGHEST -fns"
28010        # Do some simplification of floating point arithmetic (not IEEE 754)
28011        CC_HIGHEST="$CC_HIGHEST -fsimple"
28012        # Use single precision floating point with 'float'
28013        CC_HIGHEST="$CC_HIGHEST -fsingle"
28014        # Assume memory references via basic pointer types do not alias
28015        #   (Source with excessing pointer casting and data access with mixed
28016        #    pointer types are not recommended)
28017        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28018        # Use intrinsic or inline versions for math/std functions
28019        #   (If you expect perfect errno behavior, do not use this)
28020        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28021        # Loop data dependency optimizations (need -xO3 or higher)
28022        CC_HIGHEST="$CC_HIGHEST -xdepend"
28023        # Pointer parameters to functions do not overlap
28024        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28025        #    If you pass in multiple pointers to the same data, do not use this)
28026        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28027        # Inline some library routines
28028        #   (If you expect perfect errno behavior, do not use this)
28029        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28030        # Use optimized math routines
28031        #   (If you expect perfect errno behavior, do not use this)
28032        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28033        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28034
28035        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28036          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28037          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28038        fi
28039
28040        case $OPENJDK_TARGET_CPU_ARCH in
28041          x86)
28042            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28043            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28044            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28045            C_O_FLAG_NONE="-xregs=no%frameptr"
28046            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28047            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28048            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28049            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28050            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28051               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28052               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28053            fi
28054            ;;
28055          sparc)
28056            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28057            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28058            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28059            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28060            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28061            C_O_FLAG_NONE=""
28062            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28063            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28064            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28065            CXX_O_FLAG_NONE=""
28066            ;;
28067        esac
28068
28069    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28070    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28071    esac
28072    ;;
28073  CL )
28074    D_FLAG=
28075    C_O_FLAG_HIGHEST="-O2"
28076    C_O_FLAG_HI="-O1"
28077    C_O_FLAG_NORM="-O1"
28078    C_O_FLAG_NONE="-Od"
28079    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28080    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28081    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28082    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28083    ;;
28084esac
28085
28086if test -z "$C_O_FLAG_HIGHEST"; then
28087   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28088fi
28089
28090if test -z "$CXX_O_FLAG_HIGHEST"; then
28091   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28092fi
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28108   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28109$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28110fi
28111
28112if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28113   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28114$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28115fi
28116
28117if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28118   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28119$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28120fi
28121
28122
28123# Check whether --with-extra-cflags was given.
28124if test "${with_extra_cflags+set}" = set; then :
28125  withval=$with_extra_cflags;
28126fi
28127
28128
28129
28130# Check whether --with-extra-cxxflags was given.
28131if test "${with_extra_cxxflags+set}" = set; then :
28132  withval=$with_extra_cxxflags;
28133fi
28134
28135
28136
28137# Check whether --with-extra-ldflags was given.
28138if test "${with_extra_ldflags+set}" = set; then :
28139  withval=$with_extra_ldflags;
28140fi
28141
28142
28143CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28144CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28145LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28146
28147# Hotspot needs these set in their legacy form
28148LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28149LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28150LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28151
28152
28153
28154
28155
28156###############################################################################
28157#
28158# Now setup the CFLAGS and LDFLAGS for the JDK build.
28159# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28160#
28161case $COMPILER_NAME in
28162      gcc )
28163      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28164                          -pipe \
28165                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28166	  case $OPENJDK_TARGET_CPU_ARCH in
28167	  arm )
28168            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28169	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28170	  ;;
28171	  ppc )
28172            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28173	  ;;
28174	  * )
28175	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28176	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28177          ;;
28178	  esac
28179          ;;
28180      ossc )
28181          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28182          case $OPENJDK_TARGET_CPU_ARCH in
28183          x86 )
28184            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28185       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28186          ;;
28187          esac
28188
28189      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28190      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28191
28192          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28193          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28194          ;;
28195      cl )
28196          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28197               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28198	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28199	       -DWIN32 -DIAL"
28200          case $OPENJDK_TARGET_CPU in
28201              x86 )
28202                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28203                  ;;
28204              x86_64 )
28205                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28206                  ;;
28207          esac
28208          ;;
28209esac
28210
28211###############################################################################
28212
28213CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28214
28215# The package path is used only on macosx?
28216PACKAGE_PATH=/opt/local
28217
28218
28219if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28220    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28221    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28222    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28223    #   Note: -Dmacro         is the same as    #define macro 1
28224    #         -Dmacro=	    is the same as    #define macro
28225    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28226        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28227    else
28228        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28229    fi
28230else
28231    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28232fi
28233if test "x$OPENJDK_TARGET_OS" = xlinux; then
28234    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28235fi
28236if test "x$OPENJDK_TARGET_OS" = xwindows; then
28237    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28238fi
28239if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28240    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28241fi
28242if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28243    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28244fi
28245if test "x$OPENJDK_TARGET_OS" = xbsd; then
28246    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28247fi
28248if test "x$DEBUG_LEVEL" = xrelease; then
28249    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28250    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28251        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28252    fi
28253else
28254    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28255fi
28256
28257CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28258CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28259
28260CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28261        -I${JDK_OUTPUTDIR}/include \
28262        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28263        -I${JDK_TOPDIR}/src/share/javavm/export \
28264        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28265        -I${JDK_TOPDIR}/src/share/native/common \
28266        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28267
28268# The shared libraries are compiled using the picflag.
28269CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28270CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28271
28272# Executable flags
28273CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28274CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28275
28276# Now this is odd. The JDK native libraries have to link against libjvm.so
28277# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28278# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28279# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28280# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28281# libraries will link to whatever is in memory. Yuck.
28282#
28283# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28284if test "x$COMPILER_NAME" = xcl; then
28285    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28286    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28287        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28288    fi
28289    # TODO: make -debug optional "--disable-full-debug-symbols"
28290    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28291    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28292    LDFLAGS_JDKLIB_SUFFIX=""
28293    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28294        LDFLAGS_STACK_SIZE=1048576
28295    else
28296        LDFLAGS_STACK_SIZE=327680
28297    fi
28298    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28299else
28300    if test "x$COMPILER_NAME" = xgcc; then
28301        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28302        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28303        if test -n "$HAS_GNU_HASH"; then
28304            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28305        fi
28306        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28307          # And since we now know that the linker is gnu, then add -z defs, to forbid
28308          # undefined symbols in object files.
28309          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28310          if test "x$DEBUG_LEVEL" = "xrelease"; then
28311              # When building release libraries, tell the linker optimize them.
28312              # Should this be supplied to the OSS linker as well?
28313              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28314          fi
28315        fi
28316    fi
28317    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28318                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28319
28320    # On some platforms (mac) the linker warns about non existing -L dirs.
28321    # Add server first if available. Linking aginst client does not always produce the same results.
28322    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28323    # Default to server for other variants.
28324    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28325        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28326    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28327        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28328    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28329        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28330    else
28331        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28332    fi
28333
28334    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28335    if test "x$COMPILER_NAME" = xossc; then
28336        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28337    fi
28338
28339    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28340    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28341        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28342    fi
28343fi
28344
28345# Adjust flags according to debug level.
28346case $DEBUG_LEVEL in
28347      fastdebug )
28348              CFLAGS="$CFLAGS $D_FLAG"
28349              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28350              ;;
28351      slowdebug )
28352              CFLAGS="$CFLAGS $D_FLAG"
28353	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28354	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28355	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28356	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28357              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28358              ;;
28359esac
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375# Setup debug symbols (need objcopy from the toolchain for that)
28376
28377#
28378# ENABLE_DEBUG_SYMBOLS
28379# This must be done after the toolchain is setup, since we're looking at objcopy.
28380#
28381# Check whether --enable-debug-symbols was given.
28382if test "${enable_debug_symbols+set}" = set; then :
28383  enableval=$enable_debug_symbols;
28384fi
28385
28386
28387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28388$as_echo_n "checking if we should generate debug symbols... " >&6; }
28389
28390if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28391   # explicit enabling of enable-debug-symbols and can't find objcopy
28392   #   this is an error
28393   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28394fi
28395
28396if test "x$enable_debug_symbols" = "xyes"; then
28397  ENABLE_DEBUG_SYMBOLS=true
28398elif test "x$enable_debug_symbols" = "xno"; then
28399  ENABLE_DEBUG_SYMBOLS=false
28400else
28401  # default on macosx is false
28402  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28403    ENABLE_DEBUG_SYMBOLS=false
28404  # Default is on if objcopy is found, otherwise off
28405  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28406    ENABLE_DEBUG_SYMBOLS=true
28407  else
28408    ENABLE_DEBUG_SYMBOLS=false
28409  fi
28410fi
28411
28412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28413$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28414
28415#
28416# ZIP_DEBUGINFO_FILES
28417#
28418# Check whether --enable-zip-debug-info was given.
28419if test "${enable_zip_debug_info+set}" = set; then :
28420  enableval=$enable_zip_debug_info;
28421fi
28422
28423
28424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28425$as_echo_n "checking if we should zip debug-info files... " >&6; }
28426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28427$as_echo "${enable_zip_debug_info}" >&6; }
28428
28429if test "x${enable_zip_debug_info}" = "xno"; then
28430   ZIP_DEBUGINFO_FILES=false
28431else
28432   ZIP_DEBUGINFO_FILES=true
28433fi
28434
28435
28436
28437
28438
28439
28440
28441###############################################################################
28442#
28443# Check dependencies for external and internal libraries.
28444#
28445###############################################################################
28446
28447
28448
28449###############################################################################
28450#
28451# OS specific settings that we never will need to probe.
28452#
28453if test "x$OPENJDK_TARGET_OS" = xlinux; then
28454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28455$as_echo_n "checking what is not needed on Linux?... " >&6; }
28456    PULSE_NOT_NEEDED=yes
28457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28458$as_echo "pulse" >&6; }
28459fi
28460
28461if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28463$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28464    ALSA_NOT_NEEDED=yes
28465    PULSE_NOT_NEEDED=yes
28466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28467$as_echo "alsa pulse" >&6; }
28468fi
28469
28470if test "x$OPENJDK_TARGET_OS" = xwindows; then
28471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28472$as_echo_n "checking what is not needed on Windows?... " >&6; }
28473    CUPS_NOT_NEEDED=yes
28474    ALSA_NOT_NEEDED=yes
28475    PULSE_NOT_NEEDED=yes
28476    X11_NOT_NEEDED=yes
28477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28478$as_echo "alsa cups pulse x11" >&6; }
28479fi
28480
28481if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28483$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28484    ALSA_NOT_NEEDED=yes
28485    PULSE_NOT_NEEDED=yes
28486    X11_NOT_NEEDED=yes
28487    FREETYPE2_NOT_NEEDED=yes
28488    # If the java runtime framework is disabled, then we need X11.
28489    # This will be adjusted below.
28490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28491$as_echo "alsa pulse x11" >&6; }
28492fi
28493
28494if test "x$OPENJDK_TARGET_OS" = xbsd; then
28495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28496$as_echo_n "checking what is not needed on bsd?... " >&6; }
28497    ALSA_NOT_NEEDED=yes
28498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28499$as_echo "alsa" >&6; }
28500fi
28501
28502if test "x$OPENJDK" = "xfalse"; then
28503    FREETYPE2_NOT_NEEDED=yes
28504fi
28505
28506if test "x$SUPPORT_HEADFUL" = xno; then
28507    X11_NOT_NEEDED=yes
28508fi
28509
28510###############################################################################
28511#
28512# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28513# that uses this API.
28514#
28515# Check whether --enable-macosx-runtime-support was given.
28516if test "${enable_macosx_runtime_support+set}" = set; then :
28517  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28518else
28519  MACOSX_RUNTIME_SUPPORT="no"
28520fi
28521
28522
28523USE_MACOSX_RUNTIME_SUPPORT=no
28524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28525$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28526if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28527    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28528        MACOSX_RUNTIME_SUPPORT=yes
28529        USE_MACOSX_RUNTIME_SUPPORT=yes
28530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28531$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28532    else
28533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28534$as_echo "yes, but explicitly disabled." >&6; }
28535    fi
28536else
28537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28538$as_echo "no" >&6; }
28539fi
28540
28541if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28543$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28544    X11_NOT_NEEDED=
28545    FREETYPE2_NOT_NEEDED=
28546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28547$as_echo "alsa pulse" >&6; }
28548fi
28549
28550
28551
28552
28553###############################################################################
28554#
28555# Check for X Windows
28556#
28557
28558# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28559# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28560# --x-libraries for the sysroot, if that seems to be correct.
28561if test "x$SYS_ROOT" != "x/"; then
28562  if test "x$x_includes" = xNONE; then
28563    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28564      x_includes="$SYS_ROOT/usr/X11R6/include"
28565    fi
28566  fi
28567  if test "x$x_libraries" = xNONE; then
28568    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28569      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28570    fi
28571  fi
28572fi
28573
28574# Now let autoconf do it's magic
28575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28576$as_echo_n "checking for X... " >&6; }
28577
28578
28579# Check whether --with-x was given.
28580if test "${with_x+set}" = set; then :
28581  withval=$with_x;
28582fi
28583
28584# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28585if test "x$with_x" = xno; then
28586  # The user explicitly disabled X.
28587  have_x=disabled
28588else
28589  case $x_includes,$x_libraries in #(
28590    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
28591    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
28592  $as_echo_n "(cached) " >&6
28593else
28594  # One or both of the vars are not set, and there is no cached value.
28595ac_x_includes=no ac_x_libraries=no
28596rm -f -r conftest.dir
28597if mkdir conftest.dir; then
28598  cd conftest.dir
28599  cat >Imakefile <<'_ACEOF'
28600incroot:
28601	@echo incroot='${INCROOT}'
28602usrlibdir:
28603	@echo usrlibdir='${USRLIBDIR}'
28604libdir:
28605	@echo libdir='${LIBDIR}'
28606_ACEOF
28607  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28608    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28609    for ac_var in incroot usrlibdir libdir; do
28610      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28611    done
28612    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28613    for ac_extension in a so sl dylib la dll; do
28614      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28615	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28616	ac_im_usrlibdir=$ac_im_libdir; break
28617      fi
28618    done
28619    # Screen out bogus values from the imake configuration.  They are
28620    # bogus both because they are the default anyway, and because
28621    # using them would break gcc on systems where it needs fixed includes.
28622    case $ac_im_incroot in
28623	/usr/include) ac_x_includes= ;;
28624	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28625    esac
28626    case $ac_im_usrlibdir in
28627	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28628	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28629    esac
28630  fi
28631  cd ..
28632  rm -f -r conftest.dir
28633fi
28634
28635# Standard set of common directories for X headers.
28636# Check X11 before X11Rn because it is often a symlink to the current release.
28637ac_x_header_dirs='
28638/usr/X11/include
28639/usr/X11R7/include
28640/usr/X11R6/include
28641/usr/X11R5/include
28642/usr/X11R4/include
28643
28644/usr/include/X11
28645/usr/include/X11R7
28646/usr/include/X11R6
28647/usr/include/X11R5
28648/usr/include/X11R4
28649
28650/usr/local/X11/include
28651/usr/local/X11R7/include
28652/usr/local/X11R6/include
28653/usr/local/X11R5/include
28654/usr/local/X11R4/include
28655
28656/usr/local/include/X11
28657/usr/local/include/X11R7
28658/usr/local/include/X11R6
28659/usr/local/include/X11R5
28660/usr/local/include/X11R4
28661
28662/usr/X386/include
28663/usr/x386/include
28664/usr/XFree86/include/X11
28665
28666/usr/include
28667/usr/local/include
28668/usr/unsupported/include
28669/usr/athena/include
28670/usr/local/x11r5/include
28671/usr/lpp/Xamples/include
28672
28673/usr/openwin/include
28674/usr/openwin/share/include'
28675
28676if test "$ac_x_includes" = no; then
28677  # Guess where to find include files, by looking for Xlib.h.
28678  # First, try using that file with no special directory specified.
28679  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28680/* end confdefs.h.  */
28681#include <X11/Xlib.h>
28682_ACEOF
28683if ac_fn_cxx_try_cpp "$LINENO"; then :
28684  # We can compile using X headers with no special include directory.
28685ac_x_includes=
28686else
28687  for ac_dir in $ac_x_header_dirs; do
28688  if test -r "$ac_dir/X11/Xlib.h"; then
28689    ac_x_includes=$ac_dir
28690    break
28691  fi
28692done
28693fi
28694rm -f conftest.err conftest.i conftest.$ac_ext
28695fi # $ac_x_includes = no
28696
28697if test "$ac_x_libraries" = no; then
28698  # Check for the libraries.
28699  # See if we find them without any special options.
28700  # Don't add to $LIBS permanently.
28701  ac_save_LIBS=$LIBS
28702  LIBS="-lX11 $LIBS"
28703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28704/* end confdefs.h.  */
28705#include <X11/Xlib.h>
28706int
28707main ()
28708{
28709XrmInitialize ()
28710  ;
28711  return 0;
28712}
28713_ACEOF
28714if ac_fn_cxx_try_link "$LINENO"; then :
28715  LIBS=$ac_save_LIBS
28716# We can link X programs with no special library path.
28717ac_x_libraries=
28718else
28719  LIBS=$ac_save_LIBS
28720for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28721do
28722  # Don't even attempt the hair of trying to link an X program!
28723  for ac_extension in a so sl dylib la dll; do
28724    if test -r "$ac_dir/libX11.$ac_extension"; then
28725      ac_x_libraries=$ac_dir
28726      break 2
28727    fi
28728  done
28729done
28730fi
28731rm -f core conftest.err conftest.$ac_objext \
28732    conftest$ac_exeext conftest.$ac_ext
28733fi # $ac_x_libraries = no
28734
28735case $ac_x_includes,$ac_x_libraries in #(
28736  no,* | *,no | *\'*)
28737    # Didn't find X, or a directory has "'" in its name.
28738    ac_cv_have_x="have_x=no";; #(
28739  *)
28740    # Record where we found X for the cache.
28741    ac_cv_have_x="have_x=yes\
28742	ac_x_includes='$ac_x_includes'\
28743	ac_x_libraries='$ac_x_libraries'"
28744esac
28745fi
28746;; #(
28747    *) have_x=yes;;
28748  esac
28749  eval "$ac_cv_have_x"
28750fi # $with_x != no
28751
28752if test "$have_x" != yes; then
28753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28754$as_echo "$have_x" >&6; }
28755  no_x=yes
28756else
28757  # If each of the values was on the command line, it overrides each guess.
28758  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28759  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28760  # Update the cache value to reflect the command line values.
28761  ac_cv_have_x="have_x=yes\
28762	ac_x_includes='$x_includes'\
28763	ac_x_libraries='$x_libraries'"
28764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28765$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28766fi
28767
28768if test "$no_x" = yes; then
28769  # Not all programs may use this symbol, but it does not hurt to define it.
28770
28771$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28772
28773  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28774else
28775  if test -n "$x_includes"; then
28776    X_CFLAGS="$X_CFLAGS -I$x_includes"
28777  fi
28778
28779  # It would also be nice to do this for all -L options, not just this one.
28780  if test -n "$x_libraries"; then
28781    X_LIBS="$X_LIBS -L$x_libraries"
28782    # For Solaris; some versions of Sun CC require a space after -R and
28783    # others require no space.  Words are not sufficient . . . .
28784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28785$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28786    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28787    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28788    ac_cxx_werror_flag=yes
28789    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28790/* end confdefs.h.  */
28791
28792int
28793main ()
28794{
28795
28796  ;
28797  return 0;
28798}
28799_ACEOF
28800if ac_fn_cxx_try_link "$LINENO"; then :
28801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28802$as_echo "no" >&6; }
28803       X_LIBS="$X_LIBS -R$x_libraries"
28804else
28805  LIBS="$ac_xsave_LIBS -R $x_libraries"
28806       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28807/* end confdefs.h.  */
28808
28809int
28810main ()
28811{
28812
28813  ;
28814  return 0;
28815}
28816_ACEOF
28817if ac_fn_cxx_try_link "$LINENO"; then :
28818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28819$as_echo "yes" >&6; }
28820	  X_LIBS="$X_LIBS -R $x_libraries"
28821else
28822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28823$as_echo "neither works" >&6; }
28824fi
28825rm -f core conftest.err conftest.$ac_objext \
28826    conftest$ac_exeext conftest.$ac_ext
28827fi
28828rm -f core conftest.err conftest.$ac_objext \
28829    conftest$ac_exeext conftest.$ac_ext
28830    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28831    LIBS=$ac_xsave_LIBS
28832  fi
28833
28834  # Check for system-dependent libraries X programs must link with.
28835  # Do this before checking for the system-independent R6 libraries
28836  # (-lICE), since we may need -lsocket or whatever for X linking.
28837
28838  if test "$ISC" = yes; then
28839    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28840  else
28841    # Martyn Johnson says this is needed for Ultrix, if the X
28842    # libraries were built with DECnet support.  And Karl Berry says
28843    # the Alpha needs dnet_stub (dnet does not exist).
28844    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28845    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28846/* end confdefs.h.  */
28847
28848/* Override any GCC internal prototype to avoid an error.
28849   Use char because int might match the return type of a GCC
28850   builtin and then its argument prototype would still apply.  */
28851#ifdef __cplusplus
28852extern "C"
28853#endif
28854char XOpenDisplay ();
28855int
28856main ()
28857{
28858return XOpenDisplay ();
28859  ;
28860  return 0;
28861}
28862_ACEOF
28863if ac_fn_cxx_try_link "$LINENO"; then :
28864
28865else
28866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28867$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28868if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
28869  $as_echo_n "(cached) " >&6
28870else
28871  ac_check_lib_save_LIBS=$LIBS
28872LIBS="-ldnet  $LIBS"
28873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28874/* end confdefs.h.  */
28875
28876/* Override any GCC internal prototype to avoid an error.
28877   Use char because int might match the return type of a GCC
28878   builtin and then its argument prototype would still apply.  */
28879#ifdef __cplusplus
28880extern "C"
28881#endif
28882char dnet_ntoa ();
28883int
28884main ()
28885{
28886return dnet_ntoa ();
28887  ;
28888  return 0;
28889}
28890_ACEOF
28891if ac_fn_cxx_try_link "$LINENO"; then :
28892  ac_cv_lib_dnet_dnet_ntoa=yes
28893else
28894  ac_cv_lib_dnet_dnet_ntoa=no
28895fi
28896rm -f core conftest.err conftest.$ac_objext \
28897    conftest$ac_exeext conftest.$ac_ext
28898LIBS=$ac_check_lib_save_LIBS
28899fi
28900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28901$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28902if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
28903  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28904fi
28905
28906    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28908$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28909if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
28910  $as_echo_n "(cached) " >&6
28911else
28912  ac_check_lib_save_LIBS=$LIBS
28913LIBS="-ldnet_stub  $LIBS"
28914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28915/* end confdefs.h.  */
28916
28917/* Override any GCC internal prototype to avoid an error.
28918   Use char because int might match the return type of a GCC
28919   builtin and then its argument prototype would still apply.  */
28920#ifdef __cplusplus
28921extern "C"
28922#endif
28923char dnet_ntoa ();
28924int
28925main ()
28926{
28927return dnet_ntoa ();
28928  ;
28929  return 0;
28930}
28931_ACEOF
28932if ac_fn_cxx_try_link "$LINENO"; then :
28933  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28934else
28935  ac_cv_lib_dnet_stub_dnet_ntoa=no
28936fi
28937rm -f core conftest.err conftest.$ac_objext \
28938    conftest$ac_exeext conftest.$ac_ext
28939LIBS=$ac_check_lib_save_LIBS
28940fi
28941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28942$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28943if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
28944  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28945fi
28946
28947    fi
28948fi
28949rm -f core conftest.err conftest.$ac_objext \
28950    conftest$ac_exeext conftest.$ac_ext
28951    LIBS="$ac_xsave_LIBS"
28952
28953    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28954    # to get the SysV transport functions.
28955    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28956    # needs -lnsl.
28957    # The nsl library prevents programs from opening the X display
28958    # on Irix 5.2, according to T.E. Dickey.
28959    # The functions gethostbyname, getservbyname, and inet_addr are
28960    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28961    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28962if test "x$ac_cv_func_gethostbyname" = xyes; then :
28963
28964fi
28965
28966    if test $ac_cv_func_gethostbyname = no; then
28967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28968$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28969if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
28970  $as_echo_n "(cached) " >&6
28971else
28972  ac_check_lib_save_LIBS=$LIBS
28973LIBS="-lnsl  $LIBS"
28974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28975/* end confdefs.h.  */
28976
28977/* Override any GCC internal prototype to avoid an error.
28978   Use char because int might match the return type of a GCC
28979   builtin and then its argument prototype would still apply.  */
28980#ifdef __cplusplus
28981extern "C"
28982#endif
28983char gethostbyname ();
28984int
28985main ()
28986{
28987return gethostbyname ();
28988  ;
28989  return 0;
28990}
28991_ACEOF
28992if ac_fn_cxx_try_link "$LINENO"; then :
28993  ac_cv_lib_nsl_gethostbyname=yes
28994else
28995  ac_cv_lib_nsl_gethostbyname=no
28996fi
28997rm -f core conftest.err conftest.$ac_objext \
28998    conftest$ac_exeext conftest.$ac_ext
28999LIBS=$ac_check_lib_save_LIBS
29000fi
29001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29002$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29003if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
29004  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29005fi
29006
29007      if test $ac_cv_lib_nsl_gethostbyname = no; then
29008	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29009$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29010if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
29011  $as_echo_n "(cached) " >&6
29012else
29013  ac_check_lib_save_LIBS=$LIBS
29014LIBS="-lbsd  $LIBS"
29015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29016/* end confdefs.h.  */
29017
29018/* Override any GCC internal prototype to avoid an error.
29019   Use char because int might match the return type of a GCC
29020   builtin and then its argument prototype would still apply.  */
29021#ifdef __cplusplus
29022extern "C"
29023#endif
29024char gethostbyname ();
29025int
29026main ()
29027{
29028return gethostbyname ();
29029  ;
29030  return 0;
29031}
29032_ACEOF
29033if ac_fn_cxx_try_link "$LINENO"; then :
29034  ac_cv_lib_bsd_gethostbyname=yes
29035else
29036  ac_cv_lib_bsd_gethostbyname=no
29037fi
29038rm -f core conftest.err conftest.$ac_objext \
29039    conftest$ac_exeext conftest.$ac_ext
29040LIBS=$ac_check_lib_save_LIBS
29041fi
29042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29043$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29044if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
29045  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29046fi
29047
29048      fi
29049    fi
29050
29051    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29052    # socket/setsockopt and other routines are undefined under SCO ODT
29053    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29054    # on later versions), says Simon Leinen: it contains gethostby*
29055    # variants that don't use the name server (or something).  -lsocket
29056    # must be given before -lnsl if both are needed.  We assume that
29057    # if connect needs -lnsl, so does gethostbyname.
29058    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29059if test "x$ac_cv_func_connect" = xyes; then :
29060
29061fi
29062
29063    if test $ac_cv_func_connect = no; then
29064      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29065$as_echo_n "checking for connect in -lsocket... " >&6; }
29066if ${ac_cv_lib_socket_connect+:} false; then :
29067  $as_echo_n "(cached) " >&6
29068else
29069  ac_check_lib_save_LIBS=$LIBS
29070LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29072/* end confdefs.h.  */
29073
29074/* Override any GCC internal prototype to avoid an error.
29075   Use char because int might match the return type of a GCC
29076   builtin and then its argument prototype would still apply.  */
29077#ifdef __cplusplus
29078extern "C"
29079#endif
29080char connect ();
29081int
29082main ()
29083{
29084return connect ();
29085  ;
29086  return 0;
29087}
29088_ACEOF
29089if ac_fn_cxx_try_link "$LINENO"; then :
29090  ac_cv_lib_socket_connect=yes
29091else
29092  ac_cv_lib_socket_connect=no
29093fi
29094rm -f core conftest.err conftest.$ac_objext \
29095    conftest$ac_exeext conftest.$ac_ext
29096LIBS=$ac_check_lib_save_LIBS
29097fi
29098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29099$as_echo "$ac_cv_lib_socket_connect" >&6; }
29100if test "x$ac_cv_lib_socket_connect" = xyes; then :
29101  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29102fi
29103
29104    fi
29105
29106    # Guillermo Gomez says -lposix is necessary on A/UX.
29107    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29108if test "x$ac_cv_func_remove" = xyes; then :
29109
29110fi
29111
29112    if test $ac_cv_func_remove = no; then
29113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29114$as_echo_n "checking for remove in -lposix... " >&6; }
29115if ${ac_cv_lib_posix_remove+:} false; then :
29116  $as_echo_n "(cached) " >&6
29117else
29118  ac_check_lib_save_LIBS=$LIBS
29119LIBS="-lposix  $LIBS"
29120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29121/* end confdefs.h.  */
29122
29123/* Override any GCC internal prototype to avoid an error.
29124   Use char because int might match the return type of a GCC
29125   builtin and then its argument prototype would still apply.  */
29126#ifdef __cplusplus
29127extern "C"
29128#endif
29129char remove ();
29130int
29131main ()
29132{
29133return remove ();
29134  ;
29135  return 0;
29136}
29137_ACEOF
29138if ac_fn_cxx_try_link "$LINENO"; then :
29139  ac_cv_lib_posix_remove=yes
29140else
29141  ac_cv_lib_posix_remove=no
29142fi
29143rm -f core conftest.err conftest.$ac_objext \
29144    conftest$ac_exeext conftest.$ac_ext
29145LIBS=$ac_check_lib_save_LIBS
29146fi
29147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29148$as_echo "$ac_cv_lib_posix_remove" >&6; }
29149if test "x$ac_cv_lib_posix_remove" = xyes; then :
29150  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29151fi
29152
29153    fi
29154
29155    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29156    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29157if test "x$ac_cv_func_shmat" = xyes; then :
29158
29159fi
29160
29161    if test $ac_cv_func_shmat = no; then
29162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29163$as_echo_n "checking for shmat in -lipc... " >&6; }
29164if ${ac_cv_lib_ipc_shmat+:} false; then :
29165  $as_echo_n "(cached) " >&6
29166else
29167  ac_check_lib_save_LIBS=$LIBS
29168LIBS="-lipc  $LIBS"
29169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29170/* end confdefs.h.  */
29171
29172/* Override any GCC internal prototype to avoid an error.
29173   Use char because int might match the return type of a GCC
29174   builtin and then its argument prototype would still apply.  */
29175#ifdef __cplusplus
29176extern "C"
29177#endif
29178char shmat ();
29179int
29180main ()
29181{
29182return shmat ();
29183  ;
29184  return 0;
29185}
29186_ACEOF
29187if ac_fn_cxx_try_link "$LINENO"; then :
29188  ac_cv_lib_ipc_shmat=yes
29189else
29190  ac_cv_lib_ipc_shmat=no
29191fi
29192rm -f core conftest.err conftest.$ac_objext \
29193    conftest$ac_exeext conftest.$ac_ext
29194LIBS=$ac_check_lib_save_LIBS
29195fi
29196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29197$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29198if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29199  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29200fi
29201
29202    fi
29203  fi
29204
29205  # Check for libraries that X11R6 Xt/Xaw programs need.
29206  ac_save_LDFLAGS=$LDFLAGS
29207  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29208  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29209  # check for ICE first), but we must link in the order -lSM -lICE or
29210  # we get undefined symbols.  So assume we have SM if we have ICE.
29211  # These have to be linked with before -lX11, unlike the other
29212  # libraries we check for below, so use a different variable.
29213  # John Interrante, Karl Berry
29214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29215$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29216if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29217  $as_echo_n "(cached) " >&6
29218else
29219  ac_check_lib_save_LIBS=$LIBS
29220LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29222/* end confdefs.h.  */
29223
29224/* Override any GCC internal prototype to avoid an error.
29225   Use char because int might match the return type of a GCC
29226   builtin and then its argument prototype would still apply.  */
29227#ifdef __cplusplus
29228extern "C"
29229#endif
29230char IceConnectionNumber ();
29231int
29232main ()
29233{
29234return IceConnectionNumber ();
29235  ;
29236  return 0;
29237}
29238_ACEOF
29239if ac_fn_cxx_try_link "$LINENO"; then :
29240  ac_cv_lib_ICE_IceConnectionNumber=yes
29241else
29242  ac_cv_lib_ICE_IceConnectionNumber=no
29243fi
29244rm -f core conftest.err conftest.$ac_objext \
29245    conftest$ac_exeext conftest.$ac_ext
29246LIBS=$ac_check_lib_save_LIBS
29247fi
29248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29249$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29250if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29251  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29252fi
29253
29254  LDFLAGS=$ac_save_LDFLAGS
29255
29256fi
29257
29258
29259# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29260# this doesn't make sense so we remove it.
29261if test "x$COMPILE_TYPE" = xcross; then
29262  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29263fi
29264
29265if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29266
29267    # Print a helpful message on how to acquire the necessary build dependency.
29268    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29269    MISSING_DEPENDENCY=x11
29270    PKGHANDLER_COMMAND=
29271
29272    case $PKGHANDLER in
29273	apt-get)
29274                apt_help     $MISSING_DEPENDENCY ;;
29275    yum)
29276                yum_help     $MISSING_DEPENDENCY ;;
29277	port)
29278                port_help    $MISSING_DEPENDENCY ;;
29279	pkgutil)
29280                pkgutil_help $MISSING_DEPENDENCY ;;
29281	pkgadd)
29282                pkgadd_help  $MISSING_DEPENDENCY ;;
29283    * )
29284      break ;;
29285    esac
29286
29287    if test "x$PKGHANDLER_COMMAND" != x; then
29288        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29289    fi
29290
29291    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29292fi
29293
29294# Some of the old makefiles require a setting of OPENWIN_HOME
29295# Since the X11R6 directory has disappeared on later Linuxes,
29296# we need to probe for it.
29297if test "x$OPENJDK_TARGET_OS" = xlinux; then
29298    if test -d "$SYS_ROOT/usr/X11R6"; then
29299        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29300    fi
29301    if test -d "$SYS_ROOT/usr/include/X11"; then
29302        OPENWIN_HOME="$SYS_ROOT/usr"
29303    fi
29304fi
29305if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29306    OPENWIN_HOME="/usr/openwin"
29307fi
29308
29309
29310
29311#
29312# Weird Sol10 something check...TODO change to try compile
29313#
29314if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29315  if test "`uname -r`" = "5.10"; then
29316     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29317     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29318     fi
29319  fi
29320fi
29321
29322ac_ext=c
29323ac_cpp='$CPP $CPPFLAGS'
29324ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29325ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29326ac_compiler_gnu=$ac_cv_c_compiler_gnu
29327
29328OLD_CFLAGS="$CFLAGS"
29329CFLAGS="$CFLAGS $X_CFLAGS"
29330
29331# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29332for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29333do :
29334  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29335ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29336                   # include <X11/Xutil.h>
29337
29338"
29339if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29340  cat >>confdefs.h <<_ACEOF
29341#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29342_ACEOF
29343 X11_A_OK=yes
29344else
29345  X11_A_OK=no
29346fi
29347
29348done
29349
29350
29351CFLAGS="$OLD_CFLAGS"
29352ac_ext=cpp
29353ac_cpp='$CXXCPP $CPPFLAGS'
29354ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29355ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29356ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29357
29358
29359if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29360
29361    # Print a helpful message on how to acquire the necessary build dependency.
29362    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29363    MISSING_DEPENDENCY=x11
29364    PKGHANDLER_COMMAND=
29365
29366    case $PKGHANDLER in
29367	apt-get)
29368                apt_help     $MISSING_DEPENDENCY ;;
29369    yum)
29370                yum_help     $MISSING_DEPENDENCY ;;
29371	port)
29372                port_help    $MISSING_DEPENDENCY ;;
29373	pkgutil)
29374                pkgutil_help $MISSING_DEPENDENCY ;;
29375	pkgadd)
29376                pkgadd_help  $MISSING_DEPENDENCY ;;
29377    * )
29378      break ;;
29379    esac
29380
29381    if test "x$PKGHANDLER_COMMAND" != x; then
29382        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29383    fi
29384
29385    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29386fi
29387
29388
29389
29390
29391
29392
29393###############################################################################
29394#
29395# The common unix printing system cups is used to print from java.
29396#
29397
29398# Check whether --with-cups was given.
29399if test "${with_cups+set}" = set; then :
29400  withval=$with_cups;
29401fi
29402
29403
29404# Check whether --with-cups-include was given.
29405if test "${with_cups_include+set}" = set; then :
29406  withval=$with_cups_include;
29407fi
29408
29409
29410if test "x$CUPS_NOT_NEEDED" = xyes; then
29411	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29412		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29413$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29414	fi
29415	CUPS_CFLAGS=
29416else
29417	CUPS_FOUND=no
29418
29419	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29420	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29421	fi
29422
29423	if test "x${with_cups}" != x; then
29424	    CUPS_CFLAGS="-I${with_cups}/include"
29425	    CUPS_FOUND=yes
29426	fi
29427	if test "x${with_cups_include}" != x; then
29428	    CUPS_CFLAGS="-I${with_cups_include}"
29429	    CUPS_FOUND=yes
29430	fi
29431	if test "x$CUPS_FOUND" = xno; then
29432
29433
29434    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29435        # Source the builddeps file again, to make sure it uses the latest variables!
29436        . $builddepsfile
29437        # Look for a target and build machine specific resource!
29438        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29439        if test "x$resource" = x; then
29440            # Ok, lets instead look for a target specific resource
29441            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29442        fi
29443        if test "x$resource" = x; then
29444            # Ok, lets instead look for a build specific resource
29445            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29446        fi
29447        if test "x$resource" = x; then
29448            # Ok, lets instead look for a generic resource
29449            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29450            resource=${builddep_cups}
29451        fi
29452        if test "x$resource" != x; then
29453            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29454$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29455	    # If the resource in the builddeps.conf file is an existing directory,
29456	    # for example /java/linux/cups
29457	    if test -d ${resource}; then
29458	       depdir=${resource}
29459	    else
29460
29461# cups is for example mymodule
29462# $resource is for example libs/general/libmymod_1_2_3.zip
29463# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29464# $with_builddeps_dir is for example /localhome/builddeps
29465# depdir is the name of the variable into which we store the depdir, eg MYMOD
29466# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29467# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29468    filename=`basename $resource`
29469    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29470    filebase=${filename%%.*}
29471    extension=${filename#*.}
29472    installdir=$with_builddeps_dir/$filebase
29473    if test ! -f $installdir/$filename.unpacked; then
29474        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29475$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29476        if test ! -d $installdir; then
29477            mkdir -p $installdir
29478        fi
29479        if test ! -d $installdir; then
29480            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29481        fi
29482        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29483        touch $tmpfile
29484        if test ! -f $tmpfile; then
29485            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29486        fi
29487
29488    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29489    # $tmpfile is the local file name for the downloaded file.
29490    VALID_TOOL=no
29491    if test "x$BDEPS_FTP" = xwget; then
29492       VALID_TOOL=yes
29493       wget -O $tmpfile $with_builddeps_server/$resource
29494    fi
29495    if test "x$BDEPS_FTP" = xlftp; then
29496       VALID_TOOL=yes
29497       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29498    fi
29499    if test "x$BDEPS_FTP" = xftp; then
29500        VALID_TOOL=yes
29501        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29502        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29503        FTPUSERPWD=${FTPSERVER%%@*}
29504        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29505            FTPUSER=${userpwd%%:*}
29506            FTPPWD=${userpwd#*@}
29507            FTPSERVER=${FTPSERVER#*@}
29508        else
29509            FTPUSER=ftp
29510            FTPPWD=ftp
29511        fi
29512        # the "pass" command does not work on some
29513        # ftp clients (read ftp.exe) but if it works,
29514        # passive mode is better!
29515        (\
29516            echo "user $FTPUSER $FTPPWD"        ;\
29517            echo "pass"                         ;\
29518            echo "bin"                          ;\
29519            echo "get $FTPPATH $tmpfile"              ;\
29520        ) | ftp -in $FTPSERVER
29521    fi
29522    if test "x$VALID_TOOL" != xyes; then
29523       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29524    fi
29525
29526        mv $tmpfile $installdir/$filename
29527        if test ! -s $installdir/$filename; then
29528            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29529        fi
29530        case "$extension" in
29531            zip)  echo "Unzipping $installdir/$filename..."
29532               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29533            ;;
29534            tar.gz) echo "Untaring $installdir/$filename..."
29535               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29536            ;;
29537            tgz) echo "Untaring $installdir/$filename..."
29538               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29539            ;;
29540            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29541            ;;
29542        esac
29543    fi
29544    if test -f $installdir/$filename.unpacked; then
29545        depdir=$installdir
29546    fi
29547
29548	    fi
29549            # Source the builddeps file again, because in the previous command, the depdir
29550            # was updated to point at the current build dependency install directory.
29551            . $builddepsfile
29552            # Now extract variables from the builddeps.conf files.
29553            theroot=${builddep_cups_ROOT}
29554            thecflags=${builddep_cups_CFLAGS}
29555            thelibs=${builddep_cups_LIBS}
29556            if test "x$depdir" = x; then
29557                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29558            fi
29559            CUPS=$depdir
29560            if test "x$theroot" != x; then
29561               CUPS="$theroot"
29562            fi
29563            if test "x$thecflags" != x; then
29564               CUPS_CFLAGS="$thecflags"
29565            fi
29566            if test "x$thelibs" != x; then
29567               CUPS_LIBS="$thelibs"
29568            fi
29569            CUPS_FOUND=yes
29570
29571        fi
29572
29573    fi
29574
29575	fi
29576	if test "x$CUPS_FOUND" = xno; then
29577	    # Are the cups headers installed in the default /usr/include location?
29578	    for ac_header in cups/cups.h cups/ppd.h
29579do :
29580  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29581ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29582if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29583  cat >>confdefs.h <<_ACEOF
29584#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29585_ACEOF
29586 CUPS_FOUND=yes
29587	                      CUPS_CFLAGS=
29588	                      DEFAULT_CUPS=yes
29589fi
29590
29591done
29592
29593	fi
29594	if test "x$CUPS_FOUND" = xno; then
29595	    # Getting nervous now? Lets poke around for standard Solaris third-party
29596	    # package installation locations.
29597	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29598$as_echo_n "checking for cups headers... " >&6; }
29599	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29600	       # An SFW package seems to be installed!
29601	       CUPS_FOUND=yes
29602	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29603	    elif test -s /opt/csw/include/cups/cups.h; then
29604	       # A CSW package seems to be installed!
29605	       CUPS_FOUND=yes
29606	       CUPS_CFLAGS="-I/opt/csw/include"
29607	    fi
29608	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29609$as_echo "$CUPS_FOUND" >&6; }
29610	fi
29611	if test "x$CUPS_FOUND" = xno; then
29612
29613    # Print a helpful message on how to acquire the necessary build dependency.
29614    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29615    MISSING_DEPENDENCY=cups
29616    PKGHANDLER_COMMAND=
29617
29618    case $PKGHANDLER in
29619	apt-get)
29620                apt_help     $MISSING_DEPENDENCY ;;
29621    yum)
29622                yum_help     $MISSING_DEPENDENCY ;;
29623	port)
29624                port_help    $MISSING_DEPENDENCY ;;
29625	pkgutil)
29626                pkgutil_help $MISSING_DEPENDENCY ;;
29627	pkgadd)
29628                pkgadd_help  $MISSING_DEPENDENCY ;;
29629    * )
29630      break ;;
29631    esac
29632
29633    if test "x$PKGHANDLER_COMMAND" != x; then
29634        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29635    fi
29636
29637	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29638	fi
29639fi
29640
29641
29642
29643
29644
29645
29646###############################################################################
29647#
29648# The ubiquitous freetype2 library is used to render fonts.
29649#
29650
29651# Check whether --with-freetype was given.
29652if test "${with_freetype+set}" = set; then :
29653  withval=$with_freetype;
29654fi
29655
29656
29657# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29658USING_SYSTEM_FT_LIB=false
29659
29660if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29661	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29662		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29663$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29664	fi
29665	FREETYPE2_CFLAGS=
29666	FREETYPE2_LIBS=
29667        FREETYPE2_LIB_PATH=
29668else
29669	FREETYPE2_FOUND=no
29670
29671	if test "x$with_freetype" != x; then
29672
29673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29674
29675  # Input might be given as Windows format, start by converting to
29676  # unix format.
29677  path="$with_freetype"
29678  new_path=`$CYGPATH -u "$path"`
29679
29680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29683  # "foo.exe" is OK but "foo" is an error.
29684  #
29685  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29686  # It is also a way to make sure we got the proper file name for the real test later on.
29687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29688  if test "x$test_shortpath" = x; then
29689    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29690$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29691    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29692  fi
29693
29694  # Call helper function which possibly converts this using DOS-style short mode.
29695  # If so, the updated path is stored in $new_path.
29696
29697  input_path="$new_path"
29698  # Check if we need to convert this using DOS-style short mode. If the path
29699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29700  # take no chances and rewrite it.
29701  # Note: m4 eats our [], so we need to use [ and ] instead.
29702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29703  if test "x$has_forbidden_chars" != x; then
29704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29708      # Going to short mode and back again did indeed matter. Since short mode is
29709      # case insensitive, let's make it lowercase to improve readability.
29710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29711      # Now convert it back to Unix-stile (cygpath)
29712      input_path=`$CYGPATH -u "$shortmode_path"`
29713      new_path="$input_path"
29714    fi
29715  fi
29716
29717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29718  if test "x$test_cygdrive_prefix" = x; then
29719    # As a simple fix, exclude /usr/bin since it's not a real path.
29720    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29722      # a path prefixed by /cygdrive for fixpath to work.
29723      new_path="$CYGWIN_ROOT_PATH$input_path"
29724    fi
29725  fi
29726
29727
29728  if test "x$path" != "x$new_path"; then
29729    with_freetype="$new_path"
29730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29731$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29732  fi
29733
29734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29735
29736  path="$with_freetype"
29737  has_colon=`$ECHO $path | $GREP ^.:`
29738  new_path="$path"
29739  if test "x$has_colon" = x; then
29740    # Not in mixed or Windows style, start by that.
29741    new_path=`cmd //c echo $path`
29742  fi
29743
29744
29745  input_path="$new_path"
29746  # Check if we need to convert this using DOS-style short mode. If the path
29747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29748  # take no chances and rewrite it.
29749  # Note: m4 eats our [], so we need to use [ and ] instead.
29750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29751  if test "x$has_forbidden_chars" != x; then
29752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29754  fi
29755
29756
29757  windows_path="$new_path"
29758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29759    unix_path=`$CYGPATH -u "$windows_path"`
29760    new_path="$unix_path"
29761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29763    new_path="$unix_path"
29764  fi
29765
29766  if test "x$path" != "x$new_path"; then
29767    with_freetype="$new_path"
29768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29769$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29770  fi
29771
29772  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29773  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29774
29775  else
29776    # We're on a posix platform. Hooray! :)
29777    path="$with_freetype"
29778
29779    if test ! -f "$path" && test ! -d "$path"; then
29780      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29781    fi
29782
29783    has_space=`$ECHO "$path" | $GREP " "`
29784    if test "x$has_space" != x; then
29785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29786$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29787      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29788    fi
29789  fi
29790
29791	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29792            FREETYPE2_LIB_PATH="$with_freetype/lib"
29793            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29794                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29795                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29796            fi
29797            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29798                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29799            fi
29800	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29801            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29802                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29803            fi
29804 	    FREETYPE2_FOUND=yes
29805   	    if test "x$FREETYPE2_FOUND" = xyes; then
29806	        # Verify that the directories exist
29807                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29808		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29809		fi
29810	        # List the contents of the lib.
29811		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29812                if test "x$FREETYPELIB" = x; then
29813		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29814		fi
29815	        # Check one h-file
29816                if ! test -s "$with_freetype/include/ft2build.h"; then
29817		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29818		fi
29819            fi
29820        fi
29821	if test "x$FREETYPE2_FOUND" = xno; then
29822
29823
29824    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29825        # Source the builddeps file again, to make sure it uses the latest variables!
29826        . $builddepsfile
29827        # Look for a target and build machine specific resource!
29828        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29829        if test "x$resource" = x; then
29830            # Ok, lets instead look for a target specific resource
29831            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29832        fi
29833        if test "x$resource" = x; then
29834            # Ok, lets instead look for a build specific resource
29835            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29836        fi
29837        if test "x$resource" = x; then
29838            # Ok, lets instead look for a generic resource
29839            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29840            resource=${builddep_freetype2}
29841        fi
29842        if test "x$resource" != x; then
29843            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29844$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29845	    # If the resource in the builddeps.conf file is an existing directory,
29846	    # for example /java/linux/cups
29847	    if test -d ${resource}; then
29848	       depdir=${resource}
29849	    else
29850
29851# freetype2 is for example mymodule
29852# $resource is for example libs/general/libmymod_1_2_3.zip
29853# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29854# $with_builddeps_dir is for example /localhome/builddeps
29855# depdir is the name of the variable into which we store the depdir, eg MYMOD
29856# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29857# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29858    filename=`basename $resource`
29859    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29860    filebase=${filename%%.*}
29861    extension=${filename#*.}
29862    installdir=$with_builddeps_dir/$filebase
29863    if test ! -f $installdir/$filename.unpacked; then
29864        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29865$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29866        if test ! -d $installdir; then
29867            mkdir -p $installdir
29868        fi
29869        if test ! -d $installdir; then
29870            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29871        fi
29872        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29873        touch $tmpfile
29874        if test ! -f $tmpfile; then
29875            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29876        fi
29877
29878    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29879    # $tmpfile is the local file name for the downloaded file.
29880    VALID_TOOL=no
29881    if test "x$BDEPS_FTP" = xwget; then
29882       VALID_TOOL=yes
29883       wget -O $tmpfile $with_builddeps_server/$resource
29884    fi
29885    if test "x$BDEPS_FTP" = xlftp; then
29886       VALID_TOOL=yes
29887       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29888    fi
29889    if test "x$BDEPS_FTP" = xftp; then
29890        VALID_TOOL=yes
29891        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29892        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29893        FTPUSERPWD=${FTPSERVER%%@*}
29894        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29895            FTPUSER=${userpwd%%:*}
29896            FTPPWD=${userpwd#*@}
29897            FTPSERVER=${FTPSERVER#*@}
29898        else
29899            FTPUSER=ftp
29900            FTPPWD=ftp
29901        fi
29902        # the "pass" command does not work on some
29903        # ftp clients (read ftp.exe) but if it works,
29904        # passive mode is better!
29905        (\
29906            echo "user $FTPUSER $FTPPWD"        ;\
29907            echo "pass"                         ;\
29908            echo "bin"                          ;\
29909            echo "get $FTPPATH $tmpfile"              ;\
29910        ) | ftp -in $FTPSERVER
29911    fi
29912    if test "x$VALID_TOOL" != xyes; then
29913       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29914    fi
29915
29916        mv $tmpfile $installdir/$filename
29917        if test ! -s $installdir/$filename; then
29918            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29919        fi
29920        case "$extension" in
29921            zip)  echo "Unzipping $installdir/$filename..."
29922               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29923            ;;
29924            tar.gz) echo "Untaring $installdir/$filename..."
29925               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29926            ;;
29927            tgz) echo "Untaring $installdir/$filename..."
29928               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29929            ;;
29930            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29931            ;;
29932        esac
29933    fi
29934    if test -f $installdir/$filename.unpacked; then
29935        depdir=$installdir
29936    fi
29937
29938	    fi
29939            # Source the builddeps file again, because in the previous command, the depdir
29940            # was updated to point at the current build dependency install directory.
29941            . $builddepsfile
29942            # Now extract variables from the builddeps.conf files.
29943            theroot=${builddep_freetype2_ROOT}
29944            thecflags=${builddep_freetype2_CFLAGS}
29945            thelibs=${builddep_freetype2_LIBS}
29946            if test "x$depdir" = x; then
29947                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29948            fi
29949            FREETYPE2=$depdir
29950            if test "x$theroot" != x; then
29951               FREETYPE2="$theroot"
29952            fi
29953            if test "x$thecflags" != x; then
29954               FREETYPE2_CFLAGS="$thecflags"
29955            fi
29956            if test "x$thelibs" != x; then
29957               FREETYPE2_LIBS="$thelibs"
29958            fi
29959            FREETYPE2_FOUND=yes
29960            else FREETYPE2_FOUND=no
29961
29962        fi
29963        else FREETYPE2_FOUND=no
29964
29965    fi
29966
29967            USING_SYSTEM_FT_LIB=true
29968	fi
29969	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29970            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29971
29972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29973
29974  # Input might be given as Windows format, start by converting to
29975  # unix format.
29976  path="$FREETYPELOCATION"
29977  new_path=`$CYGPATH -u "$path"`
29978
29979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29982  # "foo.exe" is OK but "foo" is an error.
29983  #
29984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29985  # It is also a way to make sure we got the proper file name for the real test later on.
29986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29987  if test "x$test_shortpath" = x; then
29988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29989$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29990    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29991  fi
29992
29993  # Call helper function which possibly converts this using DOS-style short mode.
29994  # If so, the updated path is stored in $new_path.
29995
29996  input_path="$new_path"
29997  # Check if we need to convert this using DOS-style short mode. If the path
29998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29999  # take no chances and rewrite it.
30000  # Note: m4 eats our [], so we need to use [ and ] instead.
30001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30002  if test "x$has_forbidden_chars" != x; then
30003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30007      # Going to short mode and back again did indeed matter. Since short mode is
30008      # case insensitive, let's make it lowercase to improve readability.
30009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30010      # Now convert it back to Unix-stile (cygpath)
30011      input_path=`$CYGPATH -u "$shortmode_path"`
30012      new_path="$input_path"
30013    fi
30014  fi
30015
30016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30017  if test "x$test_cygdrive_prefix" = x; then
30018    # As a simple fix, exclude /usr/bin since it's not a real path.
30019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30021      # a path prefixed by /cygdrive for fixpath to work.
30022      new_path="$CYGWIN_ROOT_PATH$input_path"
30023    fi
30024  fi
30025
30026
30027  if test "x$path" != "x$new_path"; then
30028    FREETYPELOCATION="$new_path"
30029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30030$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30031  fi
30032
30033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30034
30035  path="$FREETYPELOCATION"
30036  has_colon=`$ECHO $path | $GREP ^.:`
30037  new_path="$path"
30038  if test "x$has_colon" = x; then
30039    # Not in mixed or Windows style, start by that.
30040    new_path=`cmd //c echo $path`
30041  fi
30042
30043
30044  input_path="$new_path"
30045  # Check if we need to convert this using DOS-style short mode. If the path
30046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30047  # take no chances and rewrite it.
30048  # Note: m4 eats our [], so we need to use [ and ] instead.
30049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30050  if test "x$has_forbidden_chars" != x; then
30051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30053  fi
30054
30055
30056  windows_path="$new_path"
30057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30058    unix_path=`$CYGPATH -u "$windows_path"`
30059    new_path="$unix_path"
30060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30062    new_path="$unix_path"
30063  fi
30064
30065  if test "x$path" != "x$new_path"; then
30066    FREETYPELOCATION="$new_path"
30067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30068$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30069  fi
30070
30071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30073
30074  else
30075    # We're on a posix platform. Hooray! :)
30076    path="$FREETYPELOCATION"
30077
30078    if test ! -f "$path" && test ! -d "$path"; then
30079      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30080    fi
30081
30082    has_space=`$ECHO "$path" | $GREP " "`
30083    if test "x$has_space" != x; then
30084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30085$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30086      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30087    fi
30088  fi
30089
30090	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30091$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30092	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30093	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30094	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30095 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30096                if ! test -s "$FREETYPE2_LIBS"; then
30097		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30098		fi
30099                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30100		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30101		fi
30102                USING_SYSTEM_FT_LIB=true
30103                FREETYPE2_FOUND=yes
30104	    fi
30105	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30106$as_echo "$FREETYPE2_FOUND" >&6; }
30107        fi
30108	if test "x$FREETYPE2_FOUND" = xno; then
30109
30110pkg_failed=no
30111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30112$as_echo_n "checking for FREETYPE2... " >&6; }
30113
30114if test -n "$FREETYPE2_CFLAGS"; then
30115    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30116 elif test -n "$PKG_CONFIG"; then
30117    if test -n "$PKG_CONFIG" && \
30118    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30119  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30120  ac_status=$?
30121  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30122  test $ac_status = 0; }; then
30123  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30124else
30125  pkg_failed=yes
30126fi
30127 else
30128    pkg_failed=untried
30129fi
30130if test -n "$FREETYPE2_LIBS"; then
30131    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30132 elif test -n "$PKG_CONFIG"; then
30133    if test -n "$PKG_CONFIG" && \
30134    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30135  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30136  ac_status=$?
30137  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30138  test $ac_status = 0; }; then
30139  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30140else
30141  pkg_failed=yes
30142fi
30143 else
30144    pkg_failed=untried
30145fi
30146
30147
30148
30149if test $pkg_failed = yes; then
30150
30151if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30152        _pkg_short_errors_supported=yes
30153else
30154        _pkg_short_errors_supported=no
30155fi
30156        if test $_pkg_short_errors_supported = yes; then
30157	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30158        else
30159	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30160        fi
30161	# Put the nasty error message in config.log where it belongs
30162	echo "$FREETYPE2_PKG_ERRORS" >&5
30163
30164	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30165$as_echo "no" >&6; }
30166                FREETYPE2_FOUND=no
30167elif test $pkg_failed = untried; then
30168	FREETYPE2_FOUND=no
30169else
30170	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30171	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30173$as_echo "yes" >&6; }
30174	FREETYPE2_FOUND=yes
30175fi
30176            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30177            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30178            USING_SYSTEM_FT_LIB=true
30179            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30180            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30181              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30182            fi
30183	fi
30184	if test "x$FREETYPE2_FOUND" = xno; then
30185	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30186$as_echo_n "checking for freetype in some standard locations... " >&6; }
30187
30188	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30189	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30190	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30191	    fi
30192	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30193	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30194	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30195	    fi
30196
30197	    PREV_CXXCFLAGS="$CXXFLAGS"
30198	    PREV_LDFLAGS="$LDFLAGS"
30199	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30200	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30201	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30202/* end confdefs.h.  */
30203#include<ft2build.h>
30204	                    #include FT_FREETYPE_H
30205	                   int main() { return 0; }
30206
30207_ACEOF
30208if ac_fn_cxx_try_link "$LINENO"; then :
30209
30210	                      # Yes, the default cflags and libs did the trick.
30211	                      FREETYPE2_FOUND=yes
30212	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30213	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30214
30215else
30216
30217	                      FREETYPE2_FOUND=no
30218
30219fi
30220rm -f core conftest.err conftest.$ac_objext \
30221    conftest$ac_exeext conftest.$ac_ext
30222            CXXCFLAGS="$PREV_CXXFLAGS"
30223	    LDFLAGS="$PREV_LDFLAGS"
30224	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30225$as_echo "$FREETYPE2_FOUND" >&6; }
30226            USING_SYSTEM_FT_LIB=true
30227	fi
30228	if test "x$FREETYPE2_FOUND" = xno; then
30229
30230    # Print a helpful message on how to acquire the necessary build dependency.
30231    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30232    MISSING_DEPENDENCY=freetype2
30233    PKGHANDLER_COMMAND=
30234
30235    case $PKGHANDLER in
30236	apt-get)
30237                apt_help     $MISSING_DEPENDENCY ;;
30238    yum)
30239                yum_help     $MISSING_DEPENDENCY ;;
30240	port)
30241                port_help    $MISSING_DEPENDENCY ;;
30242	pkgutil)
30243                pkgutil_help $MISSING_DEPENDENCY ;;
30244	pkgadd)
30245                pkgadd_help  $MISSING_DEPENDENCY ;;
30246    * )
30247      break ;;
30248    esac
30249
30250    if test "x$PKGHANDLER_COMMAND" != x; then
30251        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30252    fi
30253
30254		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30255	fi
30256
30257        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30258            # AC_CHECK_LIB does not support use of cl.exe
30259            PREV_LDFLAGS="$LDFLAGS"
30260            LDFLAGS="$FREETYPE2_LIBS"
30261            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30262$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30263if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30264  $as_echo_n "(cached) " >&6
30265else
30266  ac_check_lib_save_LIBS=$LIBS
30267LIBS="-lfreetype  $LIBS"
30268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30269/* end confdefs.h.  */
30270
30271/* Override any GCC internal prototype to avoid an error.
30272   Use char because int might match the return type of a GCC
30273   builtin and then its argument prototype would still apply.  */
30274#ifdef __cplusplus
30275extern "C"
30276#endif
30277char FT_Init_FreeType ();
30278int
30279main ()
30280{
30281return FT_Init_FreeType ();
30282  ;
30283  return 0;
30284}
30285_ACEOF
30286if ac_fn_cxx_try_link "$LINENO"; then :
30287  ac_cv_lib_freetype_FT_Init_FreeType=yes
30288else
30289  ac_cv_lib_freetype_FT_Init_FreeType=no
30290fi
30291rm -f core conftest.err conftest.$ac_objext \
30292    conftest$ac_exeext conftest.$ac_ext
30293LIBS=$ac_check_lib_save_LIBS
30294fi
30295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30296$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30297if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30298  FREETYPE2_FOUND=true
30299else
30300  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30301fi
30302
30303            LDFLAGS="$PREV_LDFLAGS"
30304        fi
30305fi
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315###############################################################################
30316#
30317# Check for alsa headers and libraries. Used on Linux/GNU systems.
30318#
30319
30320# Check whether --with-alsa was given.
30321if test "${with_alsa+set}" = set; then :
30322  withval=$with_alsa;
30323fi
30324
30325
30326# Check whether --with-alsa-include was given.
30327if test "${with_alsa_include+set}" = set; then :
30328  withval=$with_alsa_include;
30329fi
30330
30331
30332# Check whether --with-alsa-lib was given.
30333if test "${with_alsa_lib+set}" = set; then :
30334  withval=$with_alsa_lib;
30335fi
30336
30337
30338if test "x$ALSA_NOT_NEEDED" = xyes; then
30339	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30340		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30341$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30342	fi
30343	ALSA_CFLAGS=
30344	ALSA_LIBS=
30345else
30346	ALSA_FOUND=no
30347
30348	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30349	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30350	fi
30351
30352	if test "x${with_alsa}" != x; then
30353	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30354	    ALSA_CFLAGS="-I${with_alsa}/include"
30355	    ALSA_FOUND=yes
30356	fi
30357	if test "x${with_alsa_include}" != x; then
30358	    ALSA_CFLAGS="-I${with_alsa_include}"
30359	    ALSA_FOUND=yes
30360	fi
30361	if test "x${with_alsa_lib}" != x; then
30362	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30363	    ALSA_FOUND=yes
30364	fi
30365	if test "x$ALSA_FOUND" = xno; then
30366
30367
30368    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30369        # Source the builddeps file again, to make sure it uses the latest variables!
30370        . $builddepsfile
30371        # Look for a target and build machine specific resource!
30372        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30373        if test "x$resource" = x; then
30374            # Ok, lets instead look for a target specific resource
30375            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30376        fi
30377        if test "x$resource" = x; then
30378            # Ok, lets instead look for a build specific resource
30379            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30380        fi
30381        if test "x$resource" = x; then
30382            # Ok, lets instead look for a generic resource
30383            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30384            resource=${builddep_alsa}
30385        fi
30386        if test "x$resource" != x; then
30387            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30388$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30389	    # If the resource in the builddeps.conf file is an existing directory,
30390	    # for example /java/linux/cups
30391	    if test -d ${resource}; then
30392	       depdir=${resource}
30393	    else
30394
30395# alsa is for example mymodule
30396# $resource is for example libs/general/libmymod_1_2_3.zip
30397# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30398# $with_builddeps_dir is for example /localhome/builddeps
30399# depdir is the name of the variable into which we store the depdir, eg MYMOD
30400# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30401# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30402    filename=`basename $resource`
30403    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30404    filebase=${filename%%.*}
30405    extension=${filename#*.}
30406    installdir=$with_builddeps_dir/$filebase
30407    if test ! -f $installdir/$filename.unpacked; then
30408        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30409$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30410        if test ! -d $installdir; then
30411            mkdir -p $installdir
30412        fi
30413        if test ! -d $installdir; then
30414            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30415        fi
30416        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30417        touch $tmpfile
30418        if test ! -f $tmpfile; then
30419            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30420        fi
30421
30422    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30423    # $tmpfile is the local file name for the downloaded file.
30424    VALID_TOOL=no
30425    if test "x$BDEPS_FTP" = xwget; then
30426       VALID_TOOL=yes
30427       wget -O $tmpfile $with_builddeps_server/$resource
30428    fi
30429    if test "x$BDEPS_FTP" = xlftp; then
30430       VALID_TOOL=yes
30431       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30432    fi
30433    if test "x$BDEPS_FTP" = xftp; then
30434        VALID_TOOL=yes
30435        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30436        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30437        FTPUSERPWD=${FTPSERVER%%@*}
30438        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30439            FTPUSER=${userpwd%%:*}
30440            FTPPWD=${userpwd#*@}
30441            FTPSERVER=${FTPSERVER#*@}
30442        else
30443            FTPUSER=ftp
30444            FTPPWD=ftp
30445        fi
30446        # the "pass" command does not work on some
30447        # ftp clients (read ftp.exe) but if it works,
30448        # passive mode is better!
30449        (\
30450            echo "user $FTPUSER $FTPPWD"        ;\
30451            echo "pass"                         ;\
30452            echo "bin"                          ;\
30453            echo "get $FTPPATH $tmpfile"              ;\
30454        ) | ftp -in $FTPSERVER
30455    fi
30456    if test "x$VALID_TOOL" != xyes; then
30457       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30458    fi
30459
30460        mv $tmpfile $installdir/$filename
30461        if test ! -s $installdir/$filename; then
30462            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30463        fi
30464        case "$extension" in
30465            zip)  echo "Unzipping $installdir/$filename..."
30466               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30467            ;;
30468            tar.gz) echo "Untaring $installdir/$filename..."
30469               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30470            ;;
30471            tgz) echo "Untaring $installdir/$filename..."
30472               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30473            ;;
30474            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30475            ;;
30476        esac
30477    fi
30478    if test -f $installdir/$filename.unpacked; then
30479        depdir=$installdir
30480    fi
30481
30482	    fi
30483            # Source the builddeps file again, because in the previous command, the depdir
30484            # was updated to point at the current build dependency install directory.
30485            . $builddepsfile
30486            # Now extract variables from the builddeps.conf files.
30487            theroot=${builddep_alsa_ROOT}
30488            thecflags=${builddep_alsa_CFLAGS}
30489            thelibs=${builddep_alsa_LIBS}
30490            if test "x$depdir" = x; then
30491                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30492            fi
30493            ALSA=$depdir
30494            if test "x$theroot" != x; then
30495               ALSA="$theroot"
30496            fi
30497            if test "x$thecflags" != x; then
30498               ALSA_CFLAGS="$thecflags"
30499            fi
30500            if test "x$thelibs" != x; then
30501               ALSA_LIBS="$thelibs"
30502            fi
30503            ALSA_FOUND=yes
30504            else ALSA_FOUND=no
30505
30506        fi
30507        else ALSA_FOUND=no
30508
30509    fi
30510
30511	fi
30512	if test "x$ALSA_FOUND" = xno; then
30513
30514pkg_failed=no
30515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30516$as_echo_n "checking for ALSA... " >&6; }
30517
30518if test -n "$ALSA_CFLAGS"; then
30519    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30520 elif test -n "$PKG_CONFIG"; then
30521    if test -n "$PKG_CONFIG" && \
30522    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30523  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30524  ac_status=$?
30525  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30526  test $ac_status = 0; }; then
30527  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30528else
30529  pkg_failed=yes
30530fi
30531 else
30532    pkg_failed=untried
30533fi
30534if test -n "$ALSA_LIBS"; then
30535    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30536 elif test -n "$PKG_CONFIG"; then
30537    if test -n "$PKG_CONFIG" && \
30538    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30539  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30540  ac_status=$?
30541  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30542  test $ac_status = 0; }; then
30543  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30544else
30545  pkg_failed=yes
30546fi
30547 else
30548    pkg_failed=untried
30549fi
30550
30551
30552
30553if test $pkg_failed = yes; then
30554
30555if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30556        _pkg_short_errors_supported=yes
30557else
30558        _pkg_short_errors_supported=no
30559fi
30560        if test $_pkg_short_errors_supported = yes; then
30561	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30562        else
30563	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30564        fi
30565	# Put the nasty error message in config.log where it belongs
30566	echo "$ALSA_PKG_ERRORS" >&5
30567
30568	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30569$as_echo "no" >&6; }
30570                ALSA_FOUND=no
30571elif test $pkg_failed = untried; then
30572	ALSA_FOUND=no
30573else
30574	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30575	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30577$as_echo "yes" >&6; }
30578	ALSA_FOUND=yes
30579fi
30580	fi
30581	if test "x$ALSA_FOUND" = xno; then
30582	    for ac_header in alsa/asoundlib.h
30583do :
30584  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30585if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
30586  cat >>confdefs.h <<_ACEOF
30587#define HAVE_ALSA_ASOUNDLIB_H 1
30588_ACEOF
30589 ALSA_FOUND=yes
30590	                      ALSA_CFLAGS=-Iignoreme
30591	                      ALSA_LIBS=-lasound
30592	                      DEFAULT_ALSA=yes
30593else
30594  ALSA_FOUND=no
30595fi
30596
30597done
30598
30599	fi
30600	if test "x$ALSA_FOUND" = xno; then
30601
30602    # Print a helpful message on how to acquire the necessary build dependency.
30603    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30604    MISSING_DEPENDENCY=alsa
30605    PKGHANDLER_COMMAND=
30606
30607    case $PKGHANDLER in
30608	apt-get)
30609                apt_help     $MISSING_DEPENDENCY ;;
30610    yum)
30611                yum_help     $MISSING_DEPENDENCY ;;
30612	port)
30613                port_help    $MISSING_DEPENDENCY ;;
30614	pkgutil)
30615                pkgutil_help $MISSING_DEPENDENCY ;;
30616	pkgadd)
30617                pkgadd_help  $MISSING_DEPENDENCY ;;
30618    * )
30619      break ;;
30620    esac
30621
30622    if test "x$PKGHANDLER_COMMAND" != x; then
30623        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30624    fi
30625
30626	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30627	fi
30628fi
30629
30630
30631
30632
30633
30634
30635
30636###############################################################################
30637#
30638# Check for the jpeg library
30639#
30640
30641USE_EXTERNAL_LIBJPEG=true
30642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30643$as_echo_n "checking for main in -ljpeg... " >&6; }
30644if ${ac_cv_lib_jpeg_main+:} false; then :
30645  $as_echo_n "(cached) " >&6
30646else
30647  ac_check_lib_save_LIBS=$LIBS
30648LIBS="-ljpeg  $LIBS"
30649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30650/* end confdefs.h.  */
30651
30652
30653int
30654main ()
30655{
30656return main ();
30657  ;
30658  return 0;
30659}
30660_ACEOF
30661if ac_fn_cxx_try_link "$LINENO"; then :
30662  ac_cv_lib_jpeg_main=yes
30663else
30664  ac_cv_lib_jpeg_main=no
30665fi
30666rm -f core conftest.err conftest.$ac_objext \
30667    conftest$ac_exeext conftest.$ac_ext
30668LIBS=$ac_check_lib_save_LIBS
30669fi
30670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30671$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30672if test "x$ac_cv_lib_jpeg_main" = xyes; then :
30673  cat >>confdefs.h <<_ACEOF
30674#define HAVE_LIBJPEG 1
30675_ACEOF
30676
30677  LIBS="-ljpeg $LIBS"
30678
30679else
30680   USE_EXTERNAL_LIBJPEG=false
30681               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30682$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30683
30684fi
30685
30686
30687
30688###############################################################################
30689#
30690# Check for the gif library
30691#
30692
30693USE_EXTERNAL_LIBJPEG=true
30694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30695$as_echo_n "checking for main in -lgif... " >&6; }
30696if ${ac_cv_lib_gif_main+:} false; then :
30697  $as_echo_n "(cached) " >&6
30698else
30699  ac_check_lib_save_LIBS=$LIBS
30700LIBS="-lgif  $LIBS"
30701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30702/* end confdefs.h.  */
30703
30704
30705int
30706main ()
30707{
30708return main ();
30709  ;
30710  return 0;
30711}
30712_ACEOF
30713if ac_fn_cxx_try_link "$LINENO"; then :
30714  ac_cv_lib_gif_main=yes
30715else
30716  ac_cv_lib_gif_main=no
30717fi
30718rm -f core conftest.err conftest.$ac_objext \
30719    conftest$ac_exeext conftest.$ac_ext
30720LIBS=$ac_check_lib_save_LIBS
30721fi
30722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30723$as_echo "$ac_cv_lib_gif_main" >&6; }
30724if test "x$ac_cv_lib_gif_main" = xyes; then :
30725  cat >>confdefs.h <<_ACEOF
30726#define HAVE_LIBGIF 1
30727_ACEOF
30728
30729  LIBS="-lgif $LIBS"
30730
30731else
30732   USE_EXTERNAL_LIBGIF=false
30733               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30734$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30735
30736fi
30737
30738
30739
30740###############################################################################
30741#
30742# Check for the zlib library
30743#
30744
30745
30746# Check whether --with-zlib was given.
30747if test "${with_zlib+set}" = set; then :
30748  withval=$with_zlib;
30749fi
30750
30751
30752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30753$as_echo_n "checking for compress in -lz... " >&6; }
30754if ${ac_cv_lib_z_compress+:} false; then :
30755  $as_echo_n "(cached) " >&6
30756else
30757  ac_check_lib_save_LIBS=$LIBS
30758LIBS="-lz  $LIBS"
30759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30760/* end confdefs.h.  */
30761
30762/* Override any GCC internal prototype to avoid an error.
30763   Use char because int might match the return type of a GCC
30764   builtin and then its argument prototype would still apply.  */
30765#ifdef __cplusplus
30766extern "C"
30767#endif
30768char compress ();
30769int
30770main ()
30771{
30772return compress ();
30773  ;
30774  return 0;
30775}
30776_ACEOF
30777if ac_fn_cxx_try_link "$LINENO"; then :
30778  ac_cv_lib_z_compress=yes
30779else
30780  ac_cv_lib_z_compress=no
30781fi
30782rm -f core conftest.err conftest.$ac_objext \
30783    conftest$ac_exeext conftest.$ac_ext
30784LIBS=$ac_check_lib_save_LIBS
30785fi
30786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30787$as_echo "$ac_cv_lib_z_compress" >&6; }
30788if test "x$ac_cv_lib_z_compress" = xyes; then :
30789   ZLIB_FOUND=yes
30790else
30791   ZLIB_FOUND=no
30792fi
30793
30794
30795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30796$as_echo_n "checking for which zlib to use... " >&6; }
30797
30798DEFAULT_ZLIB=bundled
30799if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30800#
30801# On macosx default is system...on others default is
30802#
30803    DEFAULT_ZLIB=system
30804fi
30805
30806if test "x${ZLIB_FOUND}" != "xyes"; then
30807#
30808# If we don't find any system...set default to bundled
30809#
30810    DEFAULT_ZLIB=bundled
30811fi
30812
30813#
30814# If user didn't specify, use DEFAULT_ZLIB
30815#
30816if test "x${with_zlib}" = "x"; then
30817    with_zlib=${DEFAULT_ZLIB}
30818fi
30819
30820if test "x${with_zlib}" = "xbundled"; then
30821    USE_EXTERNAL_LIBZ=false
30822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30823$as_echo "bundled" >&6; }
30824elif test "x${with_zlib}" = "xsystem"; then
30825    if test "x${ZLIB_FOUND}" = "xyes"; then
30826        USE_EXTERNAL_LIBZ=true
30827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30828$as_echo "system" >&6; }
30829    else
30830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30831$as_echo "system not found" >&6; }
30832        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30833    fi
30834else
30835    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30836fi
30837
30838
30839
30840###############################################################################
30841LIBZIP_CAN_USE_MMAP=true
30842
30843
30844
30845###############################################################################
30846#
30847# Check if altzone exists in time.h
30848#
30849
30850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30851/* end confdefs.h.  */
30852#include <time.h>
30853int
30854main ()
30855{
30856return (int)altzone;
30857  ;
30858  return 0;
30859}
30860_ACEOF
30861if ac_fn_cxx_try_link "$LINENO"; then :
30862  has_altzone=yes
30863else
30864  has_altzone=no
30865fi
30866rm -f core conftest.err conftest.$ac_objext \
30867    conftest$ac_exeext conftest.$ac_ext
30868if test "x$has_altzone" = xyes; then
30869
30870$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30871
30872fi
30873
30874###############################################################################
30875#
30876# Check the maths library
30877#
30878
30879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30880$as_echo_n "checking for cos in -lm... " >&6; }
30881if ${ac_cv_lib_m_cos+:} false; then :
30882  $as_echo_n "(cached) " >&6
30883else
30884  ac_check_lib_save_LIBS=$LIBS
30885LIBS="-lm  $LIBS"
30886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30887/* end confdefs.h.  */
30888
30889/* Override any GCC internal prototype to avoid an error.
30890   Use char because int might match the return type of a GCC
30891   builtin and then its argument prototype would still apply.  */
30892#ifdef __cplusplus
30893extern "C"
30894#endif
30895char cos ();
30896int
30897main ()
30898{
30899return cos ();
30900  ;
30901  return 0;
30902}
30903_ACEOF
30904if ac_fn_cxx_try_link "$LINENO"; then :
30905  ac_cv_lib_m_cos=yes
30906else
30907  ac_cv_lib_m_cos=no
30908fi
30909rm -f core conftest.err conftest.$ac_objext \
30910    conftest$ac_exeext conftest.$ac_ext
30911LIBS=$ac_check_lib_save_LIBS
30912fi
30913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30914$as_echo "$ac_cv_lib_m_cos" >&6; }
30915if test "x$ac_cv_lib_m_cos" = xyes; then :
30916  cat >>confdefs.h <<_ACEOF
30917#define HAVE_LIBM 1
30918_ACEOF
30919
30920  LIBS="-lm $LIBS"
30921
30922else
30923
30924                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30925$as_echo "$as_me: Maths library was not found" >&6;}
30926
30927fi
30928
30929
30930
30931###############################################################################
30932#
30933# Check for libdl.so
30934
30935save_LIBS="$LIBS"
30936LIBS=""
30937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30938$as_echo_n "checking for dlopen in -ldl... " >&6; }
30939if ${ac_cv_lib_dl_dlopen+:} false; then :
30940  $as_echo_n "(cached) " >&6
30941else
30942  ac_check_lib_save_LIBS=$LIBS
30943LIBS="-ldl  $LIBS"
30944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30945/* end confdefs.h.  */
30946
30947/* Override any GCC internal prototype to avoid an error.
30948   Use char because int might match the return type of a GCC
30949   builtin and then its argument prototype would still apply.  */
30950#ifdef __cplusplus
30951extern "C"
30952#endif
30953char dlopen ();
30954int
30955main ()
30956{
30957return dlopen ();
30958  ;
30959  return 0;
30960}
30961_ACEOF
30962if ac_fn_cxx_try_link "$LINENO"; then :
30963  ac_cv_lib_dl_dlopen=yes
30964else
30965  ac_cv_lib_dl_dlopen=no
30966fi
30967rm -f core conftest.err conftest.$ac_objext \
30968    conftest$ac_exeext conftest.$ac_ext
30969LIBS=$ac_check_lib_save_LIBS
30970fi
30971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30972$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30973if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
30974  cat >>confdefs.h <<_ACEOF
30975#define HAVE_LIBDL 1
30976_ACEOF
30977
30978  LIBS="-ldl $LIBS"
30979
30980fi
30981
30982LIBDL="$LIBS"
30983
30984LIBS="$save_LIBS"
30985
30986
30987
30988###############################################################################
30989#
30990# statically link libstdc++ before C++ ABI is stablized on Linux unless
30991# dynamic build is configured on command line.
30992#
30993
30994# Check whether --with-stdc++lib was given.
30995if test "${with_stdc__lib+set}" = set; then :
30996  withval=$with_stdc__lib;
30997    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30998        && test "x$with_stdc__lib" != xdefault; then
30999      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31000    fi
31001
31002else
31003  with_stdc__lib=default
31004
31005fi
31006
31007
31008if test "x$OPENJDK_TARGET_OS" = xlinux; then
31009    # Test if -lstdc++ works.
31010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31011$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31012    ac_ext=cpp
31013ac_cpp='$CXXCPP $CPPFLAGS'
31014ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31015ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31016ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31017
31018    OLD_CXXFLAGS="$CXXFLAGS"
31019    CXXFLAGS="$CXXFLAGS -lstdc++"
31020    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31021/* end confdefs.h.  */
31022
31023int
31024main ()
31025{
31026return 0;
31027  ;
31028  return 0;
31029}
31030_ACEOF
31031if ac_fn_cxx_try_link "$LINENO"; then :
31032  has_dynamic_libstdcxx=yes
31033else
31034  has_dynamic_libstdcxx=no
31035fi
31036rm -f core conftest.err conftest.$ac_objext \
31037    conftest$ac_exeext conftest.$ac_ext
31038    CXXFLAGS="$OLD_CXXFLAGS"
31039    ac_ext=cpp
31040ac_cpp='$CXXCPP $CPPFLAGS'
31041ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31042ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31043ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31044
31045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31046$as_echo "$has_dynamic_libstdcxx" >&6; }
31047
31048    # Test if stdc++ can be linked statically.
31049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31050$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31051    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31052    ac_ext=cpp
31053ac_cpp='$CXXCPP $CPPFLAGS'
31054ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31055ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31056ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31057
31058    OLD_LIBS="$LIBS"
31059    OLD_CXX="$CXX"
31060    LIBS="$STATIC_STDCXX_FLAGS"
31061    CXX="$CC"
31062    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31063/* end confdefs.h.  */
31064
31065int
31066main ()
31067{
31068return 0;
31069  ;
31070  return 0;
31071}
31072_ACEOF
31073if ac_fn_cxx_try_link "$LINENO"; then :
31074  has_static_libstdcxx=yes
31075else
31076  has_static_libstdcxx=no
31077fi
31078rm -f core conftest.err conftest.$ac_objext \
31079    conftest$ac_exeext conftest.$ac_ext
31080    LIBS="$OLD_LIBS"
31081    CXX="$OLD_CXX"
31082    ac_ext=cpp
31083ac_cpp='$CXXCPP $CPPFLAGS'
31084ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31085ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31086ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31087
31088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31089$as_echo "$has_static_libstdcxx" >&6; }
31090
31091    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31092        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31093    fi
31094
31095    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31096        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31097    fi
31098
31099    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31100        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31101    fi
31102
31103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31104$as_echo_n "checking how to link with libstdc++... " >&6; }
31105    # If dynamic was requested, it's available since it would fail above otherwise.
31106    # If dynamic wasn't requested, go with static unless it isn't available.
31107    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31108        LIBCXX="$LIBCXX -lstdc++"
31109        LDCXX="$CXX"
31110        STATIC_CXX_SETTING="STATIC_CXX=false"
31111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31112$as_echo "dynamic" >&6; }
31113    else
31114        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31115        LDCXX="$CC"
31116        STATIC_CXX_SETTING="STATIC_CXX=true"
31117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31118$as_echo "static" >&6; }
31119    fi
31120fi
31121
31122
31123# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31124if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31125    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31126fi
31127
31128# TODO better (platform agnostic) test
31129if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31130    LIBCXX="-lstdc++"
31131fi
31132
31133
31134
31135
31136
31137# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31138
31139# When using cygwin or msys, we need a wrapper binary that renames
31140# /cygdrive/c/ arguments into c:/ arguments and peeks into
31141# @files and rewrites these too! This wrapper binary is
31142# called fixpath.
31143FIXPATH=
31144if test "x$OPENJDK_BUILD_OS" = xwindows; then
31145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31146$as_echo_n "checking if fixpath can be created... " >&6; }
31147    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31148    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31149    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31150      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31151      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31152      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31153      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31154    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31155      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31156      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31157
31158      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31159      # @ was chosen as separator to minimize risk of other tools messing around with it
31160      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31161      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31162
31163      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31164    fi
31165    rm -f $OUTPUT_ROOT/fixpath*
31166    cd $OUTPUT_ROOT
31167    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31168    cd $CURDIR
31169
31170    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31172$as_echo "no" >&6; }
31173        cat $OUTPUT_ROOT/fixpath1.log
31174        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31175    fi
31176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31177$as_echo "yes" >&6; }
31178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31179$as_echo_n "checking if fixpath.exe works... " >&6; }
31180    cd $OUTPUT_ROOT
31181    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31182    cd $CURDIR
31183    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31185$as_echo "no" >&6; }
31186        cat $OUTPUT_ROOT/fixpath2.log
31187        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31188    fi
31189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31190$as_echo "yes" >&6; }
31191    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31192fi
31193
31194
31195
31196
31197###############################################################################
31198#
31199# We need to do some final tweaking, when everything else is done.
31200#
31201###############################################################################
31202
31203
31204HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31205
31206
31207# The name of the Service Agent jar.
31208SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31209if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31210  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31211fi
31212
31213
31214
31215
31216###############################################################################
31217#
31218# Configure parts of the build that only affect the build performance,
31219# not the result.
31220#
31221###############################################################################
31222
31223
31224# How many cores do we have on this build system?
31225
31226# Check whether --with-num-cores was given.
31227if test "${with_num_cores+set}" = set; then :
31228  withval=$with_num_cores;
31229fi
31230
31231if test "x$with_num_cores" = x; then
31232    # The number of cores were not specified, try to probe them.
31233
31234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31235$as_echo_n "checking for number of cores... " >&6; }
31236    NUM_CORES=1
31237    FOUND_CORES=no
31238
31239    if test -f /proc/cpuinfo; then
31240        # Looks like a Linux (or cygwin) system
31241        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31242        FOUND_CORES=yes
31243    elif test -x /usr/sbin/psrinfo; then
31244        # Looks like a Solaris system
31245        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31246        FOUND_CORES=yes
31247    elif test -x /usr/sbin/system_profiler; then
31248        # Looks like a MacOSX system
31249        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31250        FOUND_CORES=yes
31251    elif test -n "$NUMBER_OF_PROCESSORS"; then
31252        # On windows, look in the env
31253        NUM_CORES=$NUMBER_OF_PROCESSORS
31254        FOUND_CORES=yes
31255    fi
31256
31257    # For c/c++ code we run twice as many concurrent build
31258    # jobs than we have cores, otherwise we will stall on io.
31259    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31260
31261    if test "x$FOUND_CORES" = xyes; then
31262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31263$as_echo "$NUM_CORES" >&6; }
31264    else
31265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31266$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31267        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31268$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31269    fi
31270
31271
31272else
31273    NUM_CORES=$with_num_cores
31274    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31275fi
31276
31277
31278
31279
31280# How much memory do we have on this build system?
31281
31282# Check whether --with-memory-size was given.
31283if test "${with_memory_size+set}" = set; then :
31284  withval=$with_memory_size;
31285fi
31286
31287if test "x$with_memory_size" = x; then
31288    # The memory size was not specified, try to probe it.
31289
31290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31291$as_echo_n "checking for memory size... " >&6; }
31292    # Default to 1024 MB
31293    MEMORY_SIZE=1024
31294    FOUND_MEM=no
31295
31296    if test -f /proc/meminfo; then
31297        # Looks like a Linux (or cygwin) system
31298        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31299        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31300        FOUND_MEM=yes
31301    elif test -x /usr/sbin/prtconf; then
31302        # Looks like a Solaris system
31303        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31304        FOUND_MEM=yes
31305    elif test -x /usr/sbin/system_profiler; then
31306        # Looks like a MacOSX system
31307        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31308        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31309        FOUND_MEM=yes
31310    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31311        # Windows, but without cygwin
31312        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31313        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31314        FOUND_MEM=yes
31315    fi
31316
31317    if test "x$FOUND_MEM" = xyes; then
31318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31319$as_echo "$MEMORY_SIZE MB" >&6; }
31320    else
31321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31322$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31324$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31325    fi
31326
31327else
31328    MEMORY_SIZE=$with_memory_size
31329fi
31330
31331
31332
31333# Setup smart javac (after cores and memory have been setup)
31334
31335
31336# Check whether --with-sjavac-server-java was given.
31337if test "${with_sjavac_server_java+set}" = set; then :
31338  withval=$with_sjavac_server_java;
31339fi
31340
31341
31342if test "x$with_sjavac_server_java" != x; then
31343    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31344    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31345    if test "x$FOUND_VERSION" = x; then
31346        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31347    fi
31348else
31349    SJAVAC_SERVER_JAVA=""
31350    # Hotspot specific options.
31351
31352    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31353    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31354    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31355    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31356    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31357        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31358    fi
31359
31360    # JRockit specific options.
31361
31362    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31363    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31364    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31365    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31366    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31367        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31368    fi
31369
31370    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31371fi
31372
31373
31374
31375# Check whether --with-sjavac-server-cores was given.
31376if test "${with_sjavac_server_cores+set}" = set; then :
31377  withval=$with_sjavac_server_cores;
31378fi
31379
31380if test "x$with_sjavac_server_cores" != x; then
31381    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31382else
31383    if test "$NUM_CORES" -gt 16; then
31384        # We set this arbitrary limit because we want to limit the heap
31385        # size of the javac server.
31386        # In the future we will make the javac compilers in the server
31387        # share more and more state, thus enabling us to use more and
31388        # more concurrent threads in the server.
31389        SJAVAC_SERVER_CORES="16"
31390    else
31391        SJAVAC_SERVER_CORES="$NUM_CORES"
31392    fi
31393
31394    if test "$MEMORY_SIZE" -gt "17000"; then
31395        MAX_HEAP_MEM=10000
31396
31397    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31398    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31399    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31400    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31401    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31402        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31403    fi
31404
31405
31406    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31407    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31408    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31409    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31410    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31411        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31412    fi
31413
31414    elif test "$MEMORY_SIZE" -gt "10000"; then
31415        MAX_HEAP_MEM=6000
31416
31417    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31418    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31419    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31420    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31421    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31422        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31423    fi
31424
31425
31426    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31427    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31428    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31429    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31430    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31431        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31432    fi
31433
31434    elif test "$MEMORY_SIZE" -gt "5000"; then
31435        MAX_HEAP_MEM=3000
31436
31437    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31438    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31439    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31440    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31441    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31442        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31443    fi
31444
31445
31446    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31447    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31448    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31449    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31450    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31451        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31452    fi
31453
31454    elif test "$MEMORY_SIZE" -gt "3800"; then
31455        MAX_HEAP_MEM=2500
31456
31457    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31458    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31459    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31460    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31461    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31462        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31463    fi
31464
31465    elif test "$MEMORY_SIZE" -gt "1900"; then
31466        MAX_HEAP_MEM=1200
31467
31468    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31469    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31470    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31471    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31472    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31473        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31474    fi
31475
31476    elif test "$MEMORY_SIZE" -gt "1000"; then
31477        MAX_HEAP_MEM=900
31478
31479    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31480    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31481    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31482    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31483    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31484        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31485    fi
31486
31487    else
31488        MAX_HEAP_MEM=512
31489
31490    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31491    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31492    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31493    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31494    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31495        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31496    fi
31497
31498    fi
31499
31500
31501    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31502    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31503    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31504    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31505    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31506        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31507    fi
31508
31509
31510    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31511    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31512    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31513    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31514    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31515        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31516    fi
31517
31518
31519    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31520    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31521    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31522    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31523    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31524        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31525    fi
31526
31527
31528    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31529    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31531$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31532        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31534$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31535    fi
31536fi
31537
31538
31539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31540$as_echo_n "checking whether to use sjavac... " >&6; }
31541# Check whether --enable-sjavac was given.
31542if test "${enable_sjavac+set}" = set; then :
31543  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31544else
31545  ENABLE_SJAVAC='no'
31546fi
31547
31548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31549$as_echo "$ENABLE_SJAVAC" >&6; }
31550
31551
31552if test "x$ENABLE_SJAVAC" = xyes; then
31553    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31554else
31555    SJAVAC_SERVER_DIR=
31556fi
31557
31558
31559
31560
31561# Can the C/C++ compiler use precompiled headers?
31562
31563
31564###############################################################################
31565#
31566# Can the C/C++ compiler use precompiled headers?
31567#
31568# Check whether --enable-precompiled-headers was given.
31569if test "${enable_precompiled_headers+set}" = set; then :
31570  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31571else
31572  ENABLE_PRECOMPH=yes
31573fi
31574
31575
31576USE_PRECOMPILED_HEADER=1
31577if test "x$ENABLE_PRECOMPH" = xno; then
31578    USE_PRECOMPILED_HEADER=0
31579fi
31580
31581if test "x$ENABLE_PRECOMPH" = xyes; then
31582    # Check that the compiler actually supports precomp headers.
31583    if test "x$GCC" = xyes; then
31584         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31585$as_echo_n "checking that precompiled headers work... " >&6; }
31586         echo "int alfa();" > conftest.h
31587         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31588         if test ! -f conftest.hpp.gch; then
31589             USE_PRECOMPILED_HEADER=0
31590             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31591$as_echo "no" >&6; }
31592         else
31593             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31594$as_echo "yes" >&6; }
31595         fi
31596         rm -f conftest.h conftest.hpp.gch
31597    fi
31598fi
31599
31600
31601
31602
31603# Setup use of ccache, if available
31604
31605    # Check whether --enable-ccache was given.
31606if test "${enable_ccache+set}" = set; then :
31607  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31608else
31609  ENABLE_CCACHE=yes
31610fi
31611
31612    if test "x$ENABLE_CCACHE" = xyes; then
31613        # Extract the first word of "ccache", so it can be a program name with args.
31614set dummy ccache; ac_word=$2
31615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31616$as_echo_n "checking for $ac_word... " >&6; }
31617if ${ac_cv_path_CCACHE+:} false; then :
31618  $as_echo_n "(cached) " >&6
31619else
31620  case $CCACHE in
31621  [\\/]* | ?:[\\/]*)
31622  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31623  ;;
31624  *)
31625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31626for as_dir in $PATH
31627do
31628  IFS=$as_save_IFS
31629  test -z "$as_dir" && as_dir=.
31630    for ac_exec_ext in '' $ac_executable_extensions; do
31631  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31632    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31634    break 2
31635  fi
31636done
31637  done
31638IFS=$as_save_IFS
31639
31640  ;;
31641esac
31642fi
31643CCACHE=$ac_cv_path_CCACHE
31644if test -n "$CCACHE"; then
31645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31646$as_echo "$CCACHE" >&6; }
31647else
31648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31649$as_echo "no" >&6; }
31650fi
31651
31652
31653    else
31654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31655$as_echo_n "checking for ccache... " >&6; }
31656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31657$as_echo "explicitly disabled" >&6; }
31658        CCACHE=
31659    fi
31660
31661
31662
31663# Check whether --with-ccache-dir was given.
31664if test "${with_ccache_dir+set}" = set; then :
31665  withval=$with_ccache_dir;
31666fi
31667
31668
31669    if test "x$with_ccache_dir" != x; then
31670        # When using a non home ccache directory, assume the use is to share ccache files
31671        # with other users. Thus change the umask.
31672        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31673    fi
31674    CCACHE_FOUND=""
31675    if test "x$CCACHE" != x; then
31676
31677    if test "x$CCACHE" != x; then
31678        CCACHE_FOUND="true"
31679        # Only use ccache if it is 3.1.4 or later, which supports
31680        # precompiled headers.
31681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31682$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31683        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31684        if test "x$HAS_GOOD_CCACHE" = x; then
31685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31686$as_echo "no, disabling ccache" >&6; }
31687            CCACHE=
31688        else
31689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31690$as_echo "yes" >&6; }
31691            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31692$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31693            PUSHED_FLAGS="$CXXFLAGS"
31694            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31695            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31696/* end confdefs.h.  */
31697
31698int
31699main ()
31700{
31701
31702  ;
31703  return 0;
31704}
31705_ACEOF
31706if ac_fn_cxx_try_compile "$LINENO"; then :
31707  CC_KNOWS_CCACHE_TRICK=yes
31708else
31709  CC_KNOWS_CCACHE_TRICK=no
31710fi
31711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31712            CXXFLAGS="$PUSHED_FLAGS"
31713            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31714                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31715$as_echo "yes" >&6; }
31716            else
31717                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31718$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31719                CCACHE=
31720            fi
31721        fi
31722    fi
31723
31724    if test "x$CCACHE" != x; then
31725        CCACHE_SLOPPINESS=time_macros
31726        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31727        CCACHE_FLAGS=-fpch-preprocess
31728
31729        if test "x$SET_CCACHE_DIR" != x; then
31730            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31731	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31732        fi
31733    fi
31734
31735    fi
31736
31737
31738###############################################################################
31739#
31740# And now the finish...
31741#
31742###############################################################################
31743
31744# Check for some common pitfalls
31745
31746  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31747    file_to_test="$SRC_ROOT/LICENSE"
31748    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31749      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
31750    fi
31751  fi
31752
31753
31754
31755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31756$as_echo_n "checking if build directory is on local disk... " >&6; }
31757
31758	# df -l lists only local disks; if the given directory is not found then
31759	# a non-zero exit code is given
31760  if test "x$DF" = x; then
31761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31762      # msys does not have df; use Windows "net use" instead.
31763      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31764      if test "x$IS_NETWORK_DISK" = x; then
31765        OUTPUT_DIR_IS_LOCAL="yes"
31766      else
31767        OUTPUT_DIR_IS_LOCAL="no"
31768      fi
31769    else
31770      # No df here, say it's local
31771      OUTPUT_DIR_IS_LOCAL="yes"
31772    fi
31773  else
31774    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31775      OUTPUT_DIR_IS_LOCAL="yes"
31776    else
31777      OUTPUT_DIR_IS_LOCAL="no"
31778    fi
31779  fi
31780
31781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31782$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31783
31784
31785
31786# Check if the user has any old-style ALT_ variables set.
31787FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31788
31789# Before generating output files, test if they exist. If they do, this is a reconfigure.
31790# Since we can't properly handle the dependencies for this, warn the user about the situation
31791if test -e $OUTPUT_ROOT/spec.gmk; then
31792  IS_RECONFIGURE=yes
31793else
31794  IS_RECONFIGURE=no
31795fi
31796
31797if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31798  HIDE_PERFORMANCE_HINTS=yes
31799else
31800  HIDE_PERFORMANCE_HINTS=no
31801  # Hide it the next time around...
31802  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31803fi
31804
31805
31806
31807# At the end, call the custom hook. (Dummy macro if no custom sources available)
31808
31809
31810# We're messing a bit with internal autoconf variables to put the config.status
31811# in the output directory instead of the current directory.
31812CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31813# Create the actual output files. Now the main work of configure is done.
31814cat >confcache <<\_ACEOF
31815# This file is a shell script that caches the results of configure
31816# tests run on this system so they can be shared between configure
31817# scripts and configure runs, see configure's option --config-cache.
31818# It is not useful on other systems.  If it contains results you don't
31819# want to keep, you may remove or edit it.
31820#
31821# config.status only pays attention to the cache file if you give it
31822# the --recheck option to rerun configure.
31823#
31824# `ac_cv_env_foo' variables (set or unset) will be overridden when
31825# loading this file, other *unset* `ac_cv_foo' will be assigned the
31826# following values.
31827
31828_ACEOF
31829
31830# The following way of writing the cache mishandles newlines in values,
31831# but we know of no workaround that is simple, portable, and efficient.
31832# So, we kill variables containing newlines.
31833# Ultrix sh set writes to stderr and can't be redirected directly,
31834# and sets the high bit in the cache file unless we assign to the vars.
31835(
31836  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31837    eval ac_val=\$$ac_var
31838    case $ac_val in #(
31839    *${as_nl}*)
31840      case $ac_var in #(
31841      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31842$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31843      esac
31844      case $ac_var in #(
31845      _ | IFS | as_nl) ;; #(
31846      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31847      *) { eval $ac_var=; unset $ac_var;} ;;
31848      esac ;;
31849    esac
31850  done
31851
31852  (set) 2>&1 |
31853    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31854    *${as_nl}ac_space=\ *)
31855      # `set' does not quote correctly, so add quotes: double-quote
31856      # substitution turns \\\\ into \\, and sed turns \\ into \.
31857      sed -n \
31858	"s/'/'\\\\''/g;
31859	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31860      ;; #(
31861    *)
31862      # `set' quotes correctly as required by POSIX, so do not add quotes.
31863      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31864      ;;
31865    esac |
31866    sort
31867) |
31868  sed '
31869     /^ac_cv_env_/b end
31870     t clear
31871     :clear
31872     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31873     t end
31874     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31875     :end' >>confcache
31876if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31877  if test -w "$cache_file"; then
31878    if test "x$cache_file" != "x/dev/null"; then
31879      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31880$as_echo "$as_me: updating cache $cache_file" >&6;}
31881      if test ! -f "$cache_file" || test -h "$cache_file"; then
31882	cat confcache >"$cache_file"
31883      else
31884        case $cache_file in #(
31885        */* | ?:*)
31886	  mv -f confcache "$cache_file"$$ &&
31887	  mv -f "$cache_file"$$ "$cache_file" ;; #(
31888        *)
31889	  mv -f confcache "$cache_file" ;;
31890	esac
31891      fi
31892    fi
31893  else
31894    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31895$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31896  fi
31897fi
31898rm -f confcache
31899
31900test "x$prefix" = xNONE && prefix=$ac_default_prefix
31901# Let make expand exec_prefix.
31902test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31903
31904DEFS=-DHAVE_CONFIG_H
31905
31906ac_libobjs=
31907ac_ltlibobjs=
31908U=
31909for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31910  # 1. Remove the extension, and $U if already installed.
31911  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31912  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31913  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31914  #    will be set to the directory where LIBOBJS objects are built.
31915  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31916  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31917done
31918LIBOBJS=$ac_libobjs
31919
31920LTLIBOBJS=$ac_ltlibobjs
31921
31922
31923
31924: "${CONFIG_STATUS=./config.status}"
31925ac_write_fail=0
31926ac_clean_files_save=$ac_clean_files
31927ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31928{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31929$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31930as_write_fail=0
31931cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31932#! $SHELL
31933# Generated by $as_me.
31934# Run this file to recreate the current configuration.
31935# Compiler output produced by configure, useful for debugging
31936# configure, is in config.log if it exists.
31937
31938debug=false
31939ac_cs_recheck=false
31940ac_cs_silent=false
31941
31942SHELL=\${CONFIG_SHELL-$SHELL}
31943export SHELL
31944_ASEOF
31945cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31946## -------------------- ##
31947## M4sh Initialization. ##
31948## -------------------- ##
31949
31950# Be more Bourne compatible
31951DUALCASE=1; export DUALCASE # for MKS sh
31952if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31953  emulate sh
31954  NULLCMD=:
31955  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31956  # is contrary to our usage.  Disable this feature.
31957  alias -g '${1+"$@"}'='"$@"'
31958  setopt NO_GLOB_SUBST
31959else
31960  case `(set -o) 2>/dev/null` in #(
31961  *posix*) :
31962    set -o posix ;; #(
31963  *) :
31964     ;;
31965esac
31966fi
31967
31968
31969as_nl='
31970'
31971export as_nl
31972# Printing a long string crashes Solaris 7 /usr/bin/printf.
31973as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31974as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31975as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31976# Prefer a ksh shell builtin over an external printf program on Solaris,
31977# but without wasting forks for bash or zsh.
31978if test -z "$BASH_VERSION$ZSH_VERSION" \
31979    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31980  as_echo='print -r --'
31981  as_echo_n='print -rn --'
31982elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31983  as_echo='printf %s\n'
31984  as_echo_n='printf %s'
31985else
31986  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31987    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31988    as_echo_n='/usr/ucb/echo -n'
31989  else
31990    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31991    as_echo_n_body='eval
31992      arg=$1;
31993      case $arg in #(
31994      *"$as_nl"*)
31995	expr "X$arg" : "X\\(.*\\)$as_nl";
31996	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31997      esac;
31998      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31999    '
32000    export as_echo_n_body
32001    as_echo_n='sh -c $as_echo_n_body as_echo'
32002  fi
32003  export as_echo_body
32004  as_echo='sh -c $as_echo_body as_echo'
32005fi
32006
32007# The user is always right.
32008if test "${PATH_SEPARATOR+set}" != set; then
32009  PATH_SEPARATOR=:
32010  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32011    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32012      PATH_SEPARATOR=';'
32013  }
32014fi
32015
32016
32017# IFS
32018# We need space, tab and new line, in precisely that order.  Quoting is
32019# there to prevent editors from complaining about space-tab.
32020# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32021# splitting by setting IFS to empty value.)
32022IFS=" ""	$as_nl"
32023
32024# Find who we are.  Look in the path if we contain no directory separator.
32025as_myself=
32026case $0 in #((
32027  *[\\/]* ) as_myself=$0 ;;
32028  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32029for as_dir in $PATH
32030do
32031  IFS=$as_save_IFS
32032  test -z "$as_dir" && as_dir=.
32033    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32034  done
32035IFS=$as_save_IFS
32036
32037     ;;
32038esac
32039# We did not find ourselves, most probably we were run as `sh COMMAND'
32040# in which case we are not to be found in the path.
32041if test "x$as_myself" = x; then
32042  as_myself=$0
32043fi
32044if test ! -f "$as_myself"; then
32045  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32046  exit 1
32047fi
32048
32049# Unset variables that we do not need and which cause bugs (e.g. in
32050# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32051# suppresses any "Segmentation fault" message there.  '((' could
32052# trigger a bug in pdksh 5.2.14.
32053for as_var in BASH_ENV ENV MAIL MAILPATH
32054do eval test x\${$as_var+set} = xset \
32055  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32056done
32057PS1='$ '
32058PS2='> '
32059PS4='+ '
32060
32061# NLS nuisances.
32062LC_ALL=C
32063export LC_ALL
32064LANGUAGE=C
32065export LANGUAGE
32066
32067# CDPATH.
32068(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32069
32070
32071# as_fn_error STATUS ERROR [LINENO LOG_FD]
32072# ----------------------------------------
32073# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32074# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32075# script with STATUS, using 1 if that was 0.
32076as_fn_error ()
32077{
32078  as_status=$1; test $as_status -eq 0 && as_status=1
32079  if test "$4"; then
32080    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32081    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32082  fi
32083  $as_echo "$as_me: error: $2" >&2
32084  as_fn_exit $as_status
32085} # as_fn_error
32086
32087
32088# as_fn_set_status STATUS
32089# -----------------------
32090# Set $? to STATUS, without forking.
32091as_fn_set_status ()
32092{
32093  return $1
32094} # as_fn_set_status
32095
32096# as_fn_exit STATUS
32097# -----------------
32098# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32099as_fn_exit ()
32100{
32101  set +e
32102  as_fn_set_status $1
32103  exit $1
32104} # as_fn_exit
32105
32106# as_fn_unset VAR
32107# ---------------
32108# Portably unset VAR.
32109as_fn_unset ()
32110{
32111  { eval $1=; unset $1;}
32112}
32113as_unset=as_fn_unset
32114# as_fn_append VAR VALUE
32115# ----------------------
32116# Append the text in VALUE to the end of the definition contained in VAR. Take
32117# advantage of any shell optimizations that allow amortized linear growth over
32118# repeated appends, instead of the typical quadratic growth present in naive
32119# implementations.
32120if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32121  eval 'as_fn_append ()
32122  {
32123    eval $1+=\$2
32124  }'
32125else
32126  as_fn_append ()
32127  {
32128    eval $1=\$$1\$2
32129  }
32130fi # as_fn_append
32131
32132# as_fn_arith ARG...
32133# ------------------
32134# Perform arithmetic evaluation on the ARGs, and store the result in the
32135# global $as_val. Take advantage of shells that can avoid forks. The arguments
32136# must be portable across $(()) and expr.
32137if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32138  eval 'as_fn_arith ()
32139  {
32140    as_val=$(( $* ))
32141  }'
32142else
32143  as_fn_arith ()
32144  {
32145    as_val=`expr "$@" || test $? -eq 1`
32146  }
32147fi # as_fn_arith
32148
32149
32150if expr a : '\(a\)' >/dev/null 2>&1 &&
32151   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32152  as_expr=expr
32153else
32154  as_expr=false
32155fi
32156
32157if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32158  as_basename=basename
32159else
32160  as_basename=false
32161fi
32162
32163if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32164  as_dirname=dirname
32165else
32166  as_dirname=false
32167fi
32168
32169as_me=`$as_basename -- "$0" ||
32170$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32171	 X"$0" : 'X\(//\)$' \| \
32172	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32173$as_echo X/"$0" |
32174    sed '/^.*\/\([^/][^/]*\)\/*$/{
32175	    s//\1/
32176	    q
32177	  }
32178	  /^X\/\(\/\/\)$/{
32179	    s//\1/
32180	    q
32181	  }
32182	  /^X\/\(\/\).*/{
32183	    s//\1/
32184	    q
32185	  }
32186	  s/.*/./; q'`
32187
32188# Avoid depending upon Character Ranges.
32189as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32190as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32191as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32192as_cr_digits='0123456789'
32193as_cr_alnum=$as_cr_Letters$as_cr_digits
32194
32195ECHO_C= ECHO_N= ECHO_T=
32196case `echo -n x` in #(((((
32197-n*)
32198  case `echo 'xy\c'` in
32199  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32200  xy)  ECHO_C='\c';;
32201  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32202       ECHO_T='	';;
32203  esac;;
32204*)
32205  ECHO_N='-n';;
32206esac
32207
32208rm -f conf$$ conf$$.exe conf$$.file
32209if test -d conf$$.dir; then
32210  rm -f conf$$.dir/conf$$.file
32211else
32212  rm -f conf$$.dir
32213  mkdir conf$$.dir 2>/dev/null
32214fi
32215if (echo >conf$$.file) 2>/dev/null; then
32216  if ln -s conf$$.file conf$$ 2>/dev/null; then
32217    as_ln_s='ln -s'
32218    # ... but there are two gotchas:
32219    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32220    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32221    # In both cases, we have to default to `cp -p'.
32222    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32223      as_ln_s='cp -p'
32224  elif ln conf$$.file conf$$ 2>/dev/null; then
32225    as_ln_s=ln
32226  else
32227    as_ln_s='cp -p'
32228  fi
32229else
32230  as_ln_s='cp -p'
32231fi
32232rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32233rmdir conf$$.dir 2>/dev/null
32234
32235
32236# as_fn_mkdir_p
32237# -------------
32238# Create "$as_dir" as a directory, including parents if necessary.
32239as_fn_mkdir_p ()
32240{
32241
32242  case $as_dir in #(
32243  -*) as_dir=./$as_dir;;
32244  esac
32245  test -d "$as_dir" || eval $as_mkdir_p || {
32246    as_dirs=
32247    while :; do
32248      case $as_dir in #(
32249      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32250      *) as_qdir=$as_dir;;
32251      esac
32252      as_dirs="'$as_qdir' $as_dirs"
32253      as_dir=`$as_dirname -- "$as_dir" ||
32254$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32255	 X"$as_dir" : 'X\(//\)[^/]' \| \
32256	 X"$as_dir" : 'X\(//\)$' \| \
32257	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32258$as_echo X"$as_dir" |
32259    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32260	    s//\1/
32261	    q
32262	  }
32263	  /^X\(\/\/\)[^/].*/{
32264	    s//\1/
32265	    q
32266	  }
32267	  /^X\(\/\/\)$/{
32268	    s//\1/
32269	    q
32270	  }
32271	  /^X\(\/\).*/{
32272	    s//\1/
32273	    q
32274	  }
32275	  s/.*/./; q'`
32276      test -d "$as_dir" && break
32277    done
32278    test -z "$as_dirs" || eval "mkdir $as_dirs"
32279  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32280
32281
32282} # as_fn_mkdir_p
32283if mkdir -p . 2>/dev/null; then
32284  as_mkdir_p='mkdir -p "$as_dir"'
32285else
32286  test -d ./-p && rmdir ./-p
32287  as_mkdir_p=false
32288fi
32289
32290if test -x / >/dev/null 2>&1; then
32291  as_test_x='test -x'
32292else
32293  if ls -dL / >/dev/null 2>&1; then
32294    as_ls_L_option=L
32295  else
32296    as_ls_L_option=
32297  fi
32298  as_test_x='
32299    eval sh -c '\''
32300      if test -d "$1"; then
32301	test -d "$1/.";
32302      else
32303	case $1 in #(
32304	-*)set "./$1";;
32305	esac;
32306	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32307	???[sx]*):;;*)false;;esac;fi
32308    '\'' sh
32309  '
32310fi
32311as_executable_p=$as_test_x
32312
32313# Sed expression to map a string onto a valid CPP name.
32314as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32315
32316# Sed expression to map a string onto a valid variable name.
32317as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32318
32319
32320exec 6>&1
32321## ----------------------------------- ##
32322## Main body of $CONFIG_STATUS script. ##
32323## ----------------------------------- ##
32324_ASEOF
32325test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32326
32327cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32328# Save the log message, to keep $0 and so on meaningful, and to
32329# report actual input values of CONFIG_FILES etc. instead of their
32330# values after options handling.
32331ac_log="
32332This file was extended by OpenJDK $as_me jdk8, which was
32333generated by GNU Autoconf 2.68.  Invocation command line was
32334
32335  CONFIG_FILES    = $CONFIG_FILES
32336  CONFIG_HEADERS  = $CONFIG_HEADERS
32337  CONFIG_LINKS    = $CONFIG_LINKS
32338  CONFIG_COMMANDS = $CONFIG_COMMANDS
32339  $ $0 $@
32340
32341on `(hostname || uname -n) 2>/dev/null | sed 1q`
32342"
32343
32344_ACEOF
32345
32346case $ac_config_files in *"
32347"*) set x $ac_config_files; shift; ac_config_files=$*;;
32348esac
32349
32350case $ac_config_headers in *"
32351"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32352esac
32353
32354
32355cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32356# Files that config.status was made for.
32357config_files="$ac_config_files"
32358config_headers="$ac_config_headers"
32359
32360_ACEOF
32361
32362cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32363ac_cs_usage="\
32364\`$as_me' instantiates files and other configuration actions
32365from templates according to the current configuration.  Unless the files
32366and actions are specified as TAGs, all are instantiated by default.
32367
32368Usage: $0 [OPTION]... [TAG]...
32369
32370  -h, --help       print this help, then exit
32371  -V, --version    print version number and configuration settings, then exit
32372      --config     print configuration, then exit
32373  -q, --quiet, --silent
32374                   do not print progress messages
32375  -d, --debug      don't remove temporary files
32376      --recheck    update $as_me by reconfiguring in the same conditions
32377      --file=FILE[:TEMPLATE]
32378                   instantiate the configuration file FILE
32379      --header=FILE[:TEMPLATE]
32380                   instantiate the configuration header FILE
32381
32382Configuration files:
32383$config_files
32384
32385Configuration headers:
32386$config_headers
32387
32388Report bugs to <build-dev@openjdk.java.net>.
32389OpenJDK home page: <http://openjdk.java.net>."
32390
32391_ACEOF
32392cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32393ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32394ac_cs_version="\\
32395OpenJDK config.status jdk8
32396configured by $0, generated by GNU Autoconf 2.68,
32397  with options \\"\$ac_cs_config\\"
32398
32399Copyright (C) 2010 Free Software Foundation, Inc.
32400This config.status script is free software; the Free Software Foundation
32401gives unlimited permission to copy, distribute and modify it."
32402
32403ac_pwd='$ac_pwd'
32404srcdir='$srcdir'
32405AWK='$AWK'
32406test -n "\$AWK" || AWK=awk
32407_ACEOF
32408
32409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32410# The default lists apply if the user does not specify any file.
32411ac_need_defaults=:
32412while test $# != 0
32413do
32414  case $1 in
32415  --*=?*)
32416    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32417    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32418    ac_shift=:
32419    ;;
32420  --*=)
32421    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32422    ac_optarg=
32423    ac_shift=:
32424    ;;
32425  *)
32426    ac_option=$1
32427    ac_optarg=$2
32428    ac_shift=shift
32429    ;;
32430  esac
32431
32432  case $ac_option in
32433  # Handling of the options.
32434  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32435    ac_cs_recheck=: ;;
32436  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32437    $as_echo "$ac_cs_version"; exit ;;
32438  --config | --confi | --conf | --con | --co | --c )
32439    $as_echo "$ac_cs_config"; exit ;;
32440  --debug | --debu | --deb | --de | --d | -d )
32441    debug=: ;;
32442  --file | --fil | --fi | --f )
32443    $ac_shift
32444    case $ac_optarg in
32445    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32446    '') as_fn_error $? "missing file argument" ;;
32447    esac
32448    as_fn_append CONFIG_FILES " '$ac_optarg'"
32449    ac_need_defaults=false;;
32450  --header | --heade | --head | --hea )
32451    $ac_shift
32452    case $ac_optarg in
32453    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32454    esac
32455    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32456    ac_need_defaults=false;;
32457  --he | --h)
32458    # Conflict between --help and --header
32459    as_fn_error $? "ambiguous option: \`$1'
32460Try \`$0 --help' for more information.";;
32461  --help | --hel | -h )
32462    $as_echo "$ac_cs_usage"; exit ;;
32463  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32464  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32465    ac_cs_silent=: ;;
32466
32467  # This is an error.
32468  -*) as_fn_error $? "unrecognized option: \`$1'
32469Try \`$0 --help' for more information." ;;
32470
32471  *) as_fn_append ac_config_targets " $1"
32472     ac_need_defaults=false ;;
32473
32474  esac
32475  shift
32476done
32477
32478ac_configure_extra_args=
32479
32480if $ac_cs_silent; then
32481  exec 6>/dev/null
32482  ac_configure_extra_args="$ac_configure_extra_args --silent"
32483fi
32484
32485_ACEOF
32486cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32487if \$ac_cs_recheck; then
32488  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32489  shift
32490  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32491  CONFIG_SHELL='$SHELL'
32492  export CONFIG_SHELL
32493  exec "\$@"
32494fi
32495
32496_ACEOF
32497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32498exec 5>>config.log
32499{
32500  echo
32501  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32502## Running $as_me. ##
32503_ASBOX
32504  $as_echo "$ac_log"
32505} >&5
32506
32507_ACEOF
32508cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32509_ACEOF
32510
32511cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32512
32513# Handling of arguments.
32514for ac_config_target in $ac_config_targets
32515do
32516  case $ac_config_target in
32517    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32518    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32519    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32520    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32521    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32522    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32523    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32524
32525  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32526  esac
32527done
32528
32529
32530# If the user did not use the arguments to specify the items to instantiate,
32531# then the envvar interface is used.  Set only those that are not.
32532# We use the long form for the default assignment because of an extremely
32533# bizarre bug on SunOS 4.1.3.
32534if $ac_need_defaults; then
32535  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32536  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32537fi
32538
32539# Have a temporary directory for convenience.  Make it in the build tree
32540# simply because there is no reason against having it here, and in addition,
32541# creating and moving files from /tmp can sometimes cause problems.
32542# Hook for its removal unless debugging.
32543# Note that there is a small window in which the directory will not be cleaned:
32544# after its creation but before its name has been assigned to `$tmp'.
32545$debug ||
32546{
32547  tmp= ac_tmp=
32548  trap 'exit_status=$?
32549  : "${ac_tmp:=$tmp}"
32550  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
32551' 0
32552  trap 'as_fn_exit 1' 1 2 13 15
32553}
32554# Create a (secure) tmp directory for tmp files.
32555
32556{
32557  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32558  test -d "$tmp"
32559}  ||
32560{
32561  tmp=./conf$$-$RANDOM
32562  (umask 077 && mkdir "$tmp")
32563} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32564ac_tmp=$tmp
32565
32566# Set up the scripts for CONFIG_FILES section.
32567# No need to generate them if there are no CONFIG_FILES.
32568# This happens for instance with `./config.status config.h'.
32569if test -n "$CONFIG_FILES"; then
32570
32571
32572ac_cr=`echo X | tr X '\015'`
32573# On cygwin, bash can eat \r inside `` if the user requested igncr.
32574# But we know of no other shell where ac_cr would be empty at this
32575# point, so we can use a bashism as a fallback.
32576if test "x$ac_cr" = x; then
32577  eval ac_cr=\$\'\\r\'
32578fi
32579ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32580if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32581  ac_cs_awk_cr='\\r'
32582else
32583  ac_cs_awk_cr=$ac_cr
32584fi
32585
32586echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
32587_ACEOF
32588
32589
32590{
32591  echo "cat >conf$$subs.awk <<_ACEOF" &&
32592  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32593  echo "_ACEOF"
32594} >conf$$subs.sh ||
32595  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32596ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32597ac_delim='%!_!# '
32598for ac_last_try in false false false false false :; do
32599  . ./conf$$subs.sh ||
32600    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32601
32602  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32603  if test $ac_delim_n = $ac_delim_num; then
32604    break
32605  elif $ac_last_try; then
32606    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32607  else
32608    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32609  fi
32610done
32611rm -f conf$$subs.sh
32612
32613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32614cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
32615_ACEOF
32616sed -n '
32617h
32618s/^/S["/; s/!.*/"]=/
32619p
32620g
32621s/^[^!]*!//
32622:repl
32623t repl
32624s/'"$ac_delim"'$//
32625t delim
32626:nl
32627h
32628s/\(.\{148\}\)..*/\1/
32629t more1
32630s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32631p
32632n
32633b repl
32634:more1
32635s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32636p
32637g
32638s/.\{148\}//
32639t nl
32640:delim
32641h
32642s/\(.\{148\}\)..*/\1/
32643t more2
32644s/["\\]/\\&/g; s/^/"/; s/$/"/
32645p
32646b
32647:more2
32648s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32649p
32650g
32651s/.\{148\}//
32652t delim
32653' <conf$$subs.awk | sed '
32654/^[^""]/{
32655  N
32656  s/\n//
32657}
32658' >>$CONFIG_STATUS || ac_write_fail=1
32659rm -f conf$$subs.awk
32660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32661_ACAWK
32662cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
32663  for (key in S) S_is_set[key] = 1
32664  FS = ""
32665
32666}
32667{
32668  line = $ 0
32669  nfields = split(line, field, "@")
32670  substed = 0
32671  len = length(field[1])
32672  for (i = 2; i < nfields; i++) {
32673    key = field[i]
32674    keylen = length(key)
32675    if (S_is_set[key]) {
32676      value = S[key]
32677      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32678      len += length(value) + length(field[++i])
32679      substed = 1
32680    } else
32681      len += 1 + keylen
32682  }
32683
32684  print line
32685}
32686
32687_ACAWK
32688_ACEOF
32689cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32690if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32691  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32692else
32693  cat
32694fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
32695  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32696_ACEOF
32697
32698# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32699# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32700# trailing colons and then remove the whole line if VPATH becomes empty
32701# (actually we leave an empty line to preserve line numbers).
32702if test "x$srcdir" = x.; then
32703  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32704h
32705s///
32706s/^/:/
32707s/[	 ]*$/:/
32708s/:\$(srcdir):/:/g
32709s/:\${srcdir}:/:/g
32710s/:@srcdir@:/:/g
32711s/^:*//
32712s/:*$//
32713x
32714s/\(=[	 ]*\).*/\1/
32715G
32716s/\n//
32717s/^[^=]*=[	 ]*$//
32718}'
32719fi
32720
32721cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32722fi # test -n "$CONFIG_FILES"
32723
32724# Set up the scripts for CONFIG_HEADERS section.
32725# No need to generate them if there are no CONFIG_HEADERS.
32726# This happens for instance with `./config.status Makefile'.
32727if test -n "$CONFIG_HEADERS"; then
32728cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
32729BEGIN {
32730_ACEOF
32731
32732# Transform confdefs.h into an awk script `defines.awk', embedded as
32733# here-document in config.status, that substitutes the proper values into
32734# config.h.in to produce config.h.
32735
32736# Create a delimiter string that does not exist in confdefs.h, to ease
32737# handling of long lines.
32738ac_delim='%!_!# '
32739for ac_last_try in false false :; do
32740  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
32741  if test -z "$ac_tt"; then
32742    break
32743  elif $ac_last_try; then
32744    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32745  else
32746    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32747  fi
32748done
32749
32750# For the awk script, D is an array of macro values keyed by name,
32751# likewise P contains macro parameters if any.  Preserve backslash
32752# newline sequences.
32753
32754ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32755sed -n '
32756s/.\{148\}/&'"$ac_delim"'/g
32757t rset
32758:rset
32759s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32760t def
32761d
32762:def
32763s/\\$//
32764t bsnl
32765s/["\\]/\\&/g
32766s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32767D["\1"]=" \3"/p
32768s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32769d
32770:bsnl
32771s/["\\]/\\&/g
32772s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32773D["\1"]=" \3\\\\\\n"\\/p
32774t cont
32775s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32776t cont
32777d
32778:cont
32779n
32780s/.\{148\}/&'"$ac_delim"'/g
32781t clear
32782:clear
32783s/\\$//
32784t bsnlc
32785s/["\\]/\\&/g; s/^/"/; s/$/"/p
32786d
32787:bsnlc
32788s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32789b cont
32790' <confdefs.h | sed '
32791s/'"$ac_delim"'/"\\\
32792"/g' >>$CONFIG_STATUS || ac_write_fail=1
32793
32794cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32795  for (key in D) D_is_set[key] = 1
32796  FS = ""
32797}
32798/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32799  line = \$ 0
32800  split(line, arg, " ")
32801  if (arg[1] == "#") {
32802    defundef = arg[2]
32803    mac1 = arg[3]
32804  } else {
32805    defundef = substr(arg[1], 2)
32806    mac1 = arg[2]
32807  }
32808  split(mac1, mac2, "(") #)
32809  macro = mac2[1]
32810  prefix = substr(line, 1, index(line, defundef) - 1)
32811  if (D_is_set[macro]) {
32812    # Preserve the white space surrounding the "#".
32813    print prefix "define", macro P[macro] D[macro]
32814    next
32815  } else {
32816    # Replace #undef with comments.  This is necessary, for example,
32817    # in the case of _POSIX_SOURCE, which is predefined and required
32818    # on some systems where configure will not decide to define it.
32819    if (defundef == "undef") {
32820      print "/*", prefix defundef, macro, "*/"
32821      next
32822    }
32823  }
32824}
32825{ print }
32826_ACAWK
32827_ACEOF
32828cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32829  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32830fi # test -n "$CONFIG_HEADERS"
32831
32832
32833eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32834shift
32835for ac_tag
32836do
32837  case $ac_tag in
32838  :[FHLC]) ac_mode=$ac_tag; continue;;
32839  esac
32840  case $ac_mode$ac_tag in
32841  :[FHL]*:*);;
32842  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32843  :[FH]-) ac_tag=-:-;;
32844  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32845  esac
32846  ac_save_IFS=$IFS
32847  IFS=:
32848  set x $ac_tag
32849  IFS=$ac_save_IFS
32850  shift
32851  ac_file=$1
32852  shift
32853
32854  case $ac_mode in
32855  :L) ac_source=$1;;
32856  :[FH])
32857    ac_file_inputs=
32858    for ac_f
32859    do
32860      case $ac_f in
32861      -) ac_f="$ac_tmp/stdin";;
32862      *) # Look for the file first in the build tree, then in the source tree
32863	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32864	 # because $ac_f cannot contain `:'.
32865	 test -f "$ac_f" ||
32866	   case $ac_f in
32867	   [\\/$]*) false;;
32868	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32869	   esac ||
32870	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32871      esac
32872      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32873      as_fn_append ac_file_inputs " '$ac_f'"
32874    done
32875
32876    # Let's still pretend it is `configure' which instantiates (i.e., don't
32877    # use $as_me), people would be surprised to read:
32878    #    /* config.h.  Generated by config.status.  */
32879    configure_input='Generated from '`
32880	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32881	`' by configure.'
32882    if test x"$ac_file" != x-; then
32883      configure_input="$ac_file.  $configure_input"
32884      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32885$as_echo "$as_me: creating $ac_file" >&6;}
32886    fi
32887    # Neutralize special characters interpreted by sed in replacement strings.
32888    case $configure_input in #(
32889    *\&* | *\|* | *\\* )
32890       ac_sed_conf_input=`$as_echo "$configure_input" |
32891       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32892    *) ac_sed_conf_input=$configure_input;;
32893    esac
32894
32895    case $ac_tag in
32896    *:-:* | *:-) cat >"$ac_tmp/stdin" \
32897      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32898    esac
32899    ;;
32900  esac
32901
32902  ac_dir=`$as_dirname -- "$ac_file" ||
32903$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32904	 X"$ac_file" : 'X\(//\)[^/]' \| \
32905	 X"$ac_file" : 'X\(//\)$' \| \
32906	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32907$as_echo X"$ac_file" |
32908    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32909	    s//\1/
32910	    q
32911	  }
32912	  /^X\(\/\/\)[^/].*/{
32913	    s//\1/
32914	    q
32915	  }
32916	  /^X\(\/\/\)$/{
32917	    s//\1/
32918	    q
32919	  }
32920	  /^X\(\/\).*/{
32921	    s//\1/
32922	    q
32923	  }
32924	  s/.*/./; q'`
32925  as_dir="$ac_dir"; as_fn_mkdir_p
32926  ac_builddir=.
32927
32928case "$ac_dir" in
32929.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32930*)
32931  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32932  # A ".." for each directory in $ac_dir_suffix.
32933  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32934  case $ac_top_builddir_sub in
32935  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32936  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32937  esac ;;
32938esac
32939ac_abs_top_builddir=$ac_pwd
32940ac_abs_builddir=$ac_pwd$ac_dir_suffix
32941# for backward compatibility:
32942ac_top_builddir=$ac_top_build_prefix
32943
32944case $srcdir in
32945  .)  # We are building in place.
32946    ac_srcdir=.
32947    ac_top_srcdir=$ac_top_builddir_sub
32948    ac_abs_top_srcdir=$ac_pwd ;;
32949  [\\/]* | ?:[\\/]* )  # Absolute name.
32950    ac_srcdir=$srcdir$ac_dir_suffix;
32951    ac_top_srcdir=$srcdir
32952    ac_abs_top_srcdir=$srcdir ;;
32953  *) # Relative name.
32954    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32955    ac_top_srcdir=$ac_top_build_prefix$srcdir
32956    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32957esac
32958ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32959
32960
32961  case $ac_mode in
32962  :F)
32963  #
32964  # CONFIG_FILE
32965  #
32966
32967_ACEOF
32968
32969cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32970# If the template does not know about datarootdir, expand it.
32971# FIXME: This hack should be removed a few years after 2.60.
32972ac_datarootdir_hack=; ac_datarootdir_seen=
32973ac_sed_dataroot='
32974/datarootdir/ {
32975  p
32976  q
32977}
32978/@datadir@/p
32979/@docdir@/p
32980/@infodir@/p
32981/@localedir@/p
32982/@mandir@/p'
32983case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32984*datarootdir*) ac_datarootdir_seen=yes;;
32985*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32986  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32987$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32988_ACEOF
32989cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32990  ac_datarootdir_hack='
32991  s&@datadir@&$datadir&g
32992  s&@docdir@&$docdir&g
32993  s&@infodir@&$infodir&g
32994  s&@localedir@&$localedir&g
32995  s&@mandir@&$mandir&g
32996  s&\\\${datarootdir}&$datarootdir&g' ;;
32997esac
32998_ACEOF
32999
33000# Neutralize VPATH when `$srcdir' = `.'.
33001# Shell code in configure.ac might set extrasub.
33002# FIXME: do we really want to maintain this feature?
33003cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33004ac_sed_extra="$ac_vpsub
33005$extrasub
33006_ACEOF
33007cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33008:t
33009/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33010s|@configure_input@|$ac_sed_conf_input|;t t
33011s&@top_builddir@&$ac_top_builddir_sub&;t t
33012s&@top_build_prefix@&$ac_top_build_prefix&;t t
33013s&@srcdir@&$ac_srcdir&;t t
33014s&@abs_srcdir@&$ac_abs_srcdir&;t t
33015s&@top_srcdir@&$ac_top_srcdir&;t t
33016s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33017s&@builddir@&$ac_builddir&;t t
33018s&@abs_builddir@&$ac_abs_builddir&;t t
33019s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33020$ac_datarootdir_hack
33021"
33022eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33023  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33024
33025test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33026  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33027  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
33028      "$ac_tmp/out"`; test -z "$ac_out"; } &&
33029  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33030which seems to be undefined.  Please make sure it is defined" >&5
33031$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33032which seems to be undefined.  Please make sure it is defined" >&2;}
33033
33034  rm -f "$ac_tmp/stdin"
33035  case $ac_file in
33036  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33037  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33038  esac \
33039  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33040 ;;
33041  :H)
33042  #
33043  # CONFIG_HEADER
33044  #
33045  if test x"$ac_file" != x-; then
33046    {
33047      $as_echo "/* $configure_input  */" \
33048      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33049    } >"$ac_tmp/config.h" \
33050      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33051    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33052      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33053$as_echo "$as_me: $ac_file is unchanged" >&6;}
33054    else
33055      rm -f "$ac_file"
33056      mv "$ac_tmp/config.h" "$ac_file" \
33057	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33058    fi
33059  else
33060    $as_echo "/* $configure_input  */" \
33061      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33062      || as_fn_error $? "could not create -" "$LINENO" 5
33063  fi
33064 ;;
33065
33066
33067  esac
33068
33069done # for ac_tag
33070
33071
33072as_fn_exit 0
33073_ACEOF
33074ac_clean_files=$ac_clean_files_save
33075
33076test $ac_write_fail = 0 ||
33077  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33078
33079
33080# configure is writing to config.log, and then calls config.status.
33081# config.status does its own redirection, appending to config.log.
33082# Unfortunately, on DOS this fails, as config.log is still kept open
33083# by configure, so config.status won't be able to write to it; its
33084# output is simply discarded.  So we exec the FD to /dev/null,
33085# effectively closing config.log, so it can be properly (re)opened and
33086# appended to by config.status.  When coming back to configure, we
33087# need to make the FD available again.
33088if test "$no_create" != yes; then
33089  ac_cs_success=:
33090  ac_config_status_args=
33091  test "$silent" = yes &&
33092    ac_config_status_args="$ac_config_status_args --quiet"
33093  exec 5>/dev/null
33094  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33095  exec 5>>config.log
33096  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33097  # would make configure fail if this is the last instruction.
33098  $ac_cs_success || as_fn_exit 1
33099fi
33100if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33101  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33102$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33103fi
33104
33105
33106# Make the compare script executable
33107$CHMOD +x $OUTPUT_ROOT/compare.sh
33108
33109# Finally output some useful information to the user
33110
33111# Finally output some useful information to the user
33112
33113if test "x$CCACHE_FOUND" != x; then
33114	if  test "x$HAS_GOOD_CCACHE" = x; then
33115		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33116		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33117	else
33118		CCACHE_STATUS="installed and in use"
33119	fi
33120else
33121	if test "x$GCC" = xyes; then
33122		CCACHE_STATUS="not installed (consider installing)"
33123		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33124	else
33125		CCACHE_STATUS="not available for your system"
33126	fi
33127fi
33128
33129printf "\n"
33130printf "====================================================\n"
33131printf "A new configuration has been successfully created in\n"
33132printf "$OUTPUT_ROOT\n"
33133if test "x$CONFIGURE_COMMAND_LINE" != x; then
33134	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33135else
33136	printf "using default settings.\n"
33137fi
33138
33139printf "\n"
33140printf "Configuration summary:\n"
33141printf "* Debug level:    $DEBUG_LEVEL\n"
33142printf "* JDK variant:    $JDK_VARIANT\n"
33143printf "* JVM variants:   $with_jvm_variants\n"
33144printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33145
33146printf "\n"
33147printf "Tools summary:\n"
33148if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33149  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33150fi
33151printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33152printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33153printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33154
33155printf "\n"
33156printf "Build performance summary:\n"
33157printf "* Cores to use:   $NUM_CORES\n"
33158printf "* Memory limit:   $MEMORY_SIZE MB\n"
33159printf "* ccache status:  $CCACHE_STATUS\n"
33160printf "\n"
33161
33162if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33163	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33164	printf "$CCACHE_HELP_MSG\n"
33165
33166    # Print a helpful message on how to acquire the necessary build dependency.
33167    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33168    MISSING_DEPENDENCY=ccache
33169    PKGHANDLER_COMMAND=
33170
33171    case $PKGHANDLER in
33172	apt-get)
33173                apt_help     $MISSING_DEPENDENCY ;;
33174    yum)
33175                yum_help     $MISSING_DEPENDENCY ;;
33176	port)
33177                port_help    $MISSING_DEPENDENCY ;;
33178	pkgutil)
33179                pkgutil_help $MISSING_DEPENDENCY ;;
33180	pkgadd)
33181                pkgadd_help  $MISSING_DEPENDENCY ;;
33182    * )
33183      break ;;
33184    esac
33185
33186    if test "x$PKGHANDLER_COMMAND" != x; then
33187        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33188    fi
33189
33190	printf "$HELP_MSG\n"
33191	printf "\n"
33192fi
33193
33194if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33195	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33196	printf "will result in longer build times.\n"
33197	printf "\n"
33198fi
33199
33200if test "x$FOUND_ALT_VARIABLES" != "x"; then
33201	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33202	printf "These are not respected, and will be ignored. It is recommended\n"
33203	printf "that you clean your environment. The following variables are set:\n"
33204	printf "$FOUND_ALT_VARIABLES\n"
33205	printf "\n"
33206fi
33207
33208if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33209	printf "WARNING: Your build output directory is not on a local disk.\n"
33210	printf "This will severely degrade build performance!\n"
33211	printf "It is recommended that you create an output directory on a local disk,\n"
33212	printf "and run the configure script again from that directory.\n"
33213	printf "\n"
33214fi
33215
33216if test "x$IS_RECONFIGURE" = "xyes"; then
33217	printf "WARNING: The result of this configuration has overridden an older\n"
33218	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33219	printf "proper build. Failure to do so might result in strange build problems.\n"
33220	printf "\n"
33221fi
33222
33223