generated-configure.sh revision 622:7ed0c9db6943
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=1358742326
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"
10789else
10790  MILESTONE=internal
10791fi
10792
10793
10794# Check whether --with-build-number was given.
10795if test "${with_build_number+set}" = set; then :
10796  withval=$with_build_number;
10797fi
10798
10799if test "x$with_build_number" = xyes; then
10800  as_fn_error $? "Build number must have a value" "$LINENO" 5
10801elif test "x$with_build_number" != x; then
10802  JDK_BUILD_NUMBER="$with_build_number"
10803fi
10804if test "x$JDK_BUILD_NUMBER" = x; then
10805  JDK_BUILD_NUMBER=b00
10806fi
10807
10808
10809# Check whether --with-user-release-suffix was given.
10810if test "${with_user_release_suffix+set}" = set; then :
10811  withval=$with_user_release_suffix;
10812fi
10813
10814if test "x$with_user_release_suffix" = xyes; then
10815  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10816elif test "x$with_user_release_suffix" != x; then
10817  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10818else
10819  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10820  # Avoid [:alnum:] since it depends on the locale.
10821  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10822  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10823fi
10824
10825
10826# Now set the JDK version, milestone, build number etc.
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841COPYRIGHT_YEAR=`date +'%Y'`
10842
10843
10844if test "x$JDK_UPDATE_VERSION" != x; then
10845  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10846else
10847  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10848fi
10849
10850
10851COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10852
10853
10854
10855###############################################################################
10856#
10857# Setup BootJDK, used to bootstrap the build.
10858#
10859###############################################################################
10860
10861
10862BOOT_JDK_FOUND=no
10863
10864# Check whether --with-boot-jdk was given.
10865if test "${with_boot_jdk+set}" = set; then :
10866  withval=$with_boot_jdk;
10867fi
10868
10869
10870# We look for the Boot JDK through various means, going from more certain to
10871# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10872# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10873# must check if this is indeed valid; otherwise we'll continue looking.
10874
10875# Test: Is bootjdk explicitely set by command line arguments?
10876
10877  if test "x$BOOT_JDK_FOUND" = xno; then
10878    # Now execute the test
10879
10880if test "x$with_boot_jdk" != x; then
10881    BOOT_JDK=$with_boot_jdk
10882    BOOT_JDK_FOUND=maybe
10883    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10884$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10885fi
10886
10887
10888    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10889    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10890      # Do we have a bin/java?
10891      if test ! -x "$BOOT_JDK/bin/java"; then
10892        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10894        BOOT_JDK_FOUND=no
10895      else
10896        # Do we have a bin/javac?
10897        if test ! -x "$BOOT_JDK/bin/javac"; then
10898          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10900          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10901$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10902          BOOT_JDK_FOUND=no
10903        else
10904          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10905          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10906            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10908            BOOT_JDK_FOUND=no
10909          else
10910            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10911            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10912
10913            # Extra M4 quote needed to protect [] in grep expression.
10914            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10915            if test "x$FOUND_VERSION_78" = x; then
10916              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10918              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10919$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10920              BOOT_JDK_FOUND=no
10921            else
10922              # We're done! :-)
10923              BOOT_JDK_FOUND=yes
10924
10925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10926
10927  # Input might be given as Windows format, start by converting to
10928  # unix format.
10929  path="$BOOT_JDK"
10930  new_path=`$CYGPATH -u "$path"`
10931
10932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10935  # "foo.exe" is OK but "foo" is an error.
10936  #
10937  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10938  # It is also a way to make sure we got the proper file name for the real test later on.
10939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10940  if test "x$test_shortpath" = x; then
10941    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10943    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10944  fi
10945
10946  # Call helper function which possibly converts this using DOS-style short mode.
10947  # If so, the updated path is stored in $new_path.
10948
10949  input_path="$new_path"
10950  # Check if we need to convert this using DOS-style short mode. If the path
10951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10952  # take no chances and rewrite it.
10953  # Note: m4 eats our [], so we need to use [ and ] instead.
10954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10955  if test "x$has_forbidden_chars" != x; then
10956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10960      # Going to short mode and back again did indeed matter. Since short mode is
10961      # case insensitive, let's make it lowercase to improve readability.
10962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10963      # Now convert it back to Unix-stile (cygpath)
10964      input_path=`$CYGPATH -u "$shortmode_path"`
10965      new_path="$input_path"
10966    fi
10967  fi
10968
10969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10970  if test "x$test_cygdrive_prefix" = x; then
10971    # As a simple fix, exclude /usr/bin since it's not a real path.
10972    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10974      # a path prefixed by /cygdrive for fixpath to work.
10975      new_path="$CYGWIN_ROOT_PATH$input_path"
10976    fi
10977  fi
10978
10979
10980  if test "x$path" != "x$new_path"; then
10981    BOOT_JDK="$new_path"
10982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10983$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10984  fi
10985
10986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10987
10988  path="$BOOT_JDK"
10989  has_colon=`$ECHO $path | $GREP ^.:`
10990  new_path="$path"
10991  if test "x$has_colon" = x; then
10992    # Not in mixed or Windows style, start by that.
10993    new_path=`cmd //c echo $path`
10994  fi
10995
10996
10997  input_path="$new_path"
10998  # Check if we need to convert this using DOS-style short mode. If the path
10999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11000  # take no chances and rewrite it.
11001  # Note: m4 eats our [], so we need to use [ and ] instead.
11002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11003  if test "x$has_forbidden_chars" != x; then
11004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11006  fi
11007
11008
11009  windows_path="$new_path"
11010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11011    unix_path=`$CYGPATH -u "$windows_path"`
11012    new_path="$unix_path"
11013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11015    new_path="$unix_path"
11016  fi
11017
11018  if test "x$path" != "x$new_path"; then
11019    BOOT_JDK="$new_path"
11020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11021$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11022  fi
11023
11024  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11025  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11026
11027  else
11028    # We're on a posix platform. Hooray! :)
11029    path="$BOOT_JDK"
11030
11031    if test ! -f "$path" && test ! -d "$path"; then
11032      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11033    fi
11034
11035    has_space=`$ECHO "$path" | $GREP " "`
11036    if test "x$has_space" != x; then
11037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11039      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11040    fi
11041  fi
11042
11043              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11044$as_echo_n "checking for Boot JDK... " >&6; }
11045              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11046$as_echo "$BOOT_JDK" >&6; }
11047              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11048$as_echo_n "checking Boot JDK version... " >&6; }
11049              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11050              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11051$as_echo "$BOOT_JDK_VERSION" >&6; }
11052            fi # end check jdk version
11053          fi # end check rt.jar
11054        fi # end check javac
11055      fi # end check java
11056    fi # end check boot jdk found
11057  fi
11058
11059if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11060  # Having specified an argument which is incorrect will produce an instant failure;
11061  # we should not go on looking
11062  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11063fi
11064
11065# Test: Is bootjdk available from builddeps?
11066
11067  if test "x$BOOT_JDK_FOUND" = xno; then
11068    # Now execute the test
11069
11070
11071
11072    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11073        # Source the builddeps file again, to make sure it uses the latest variables!
11074        . $builddepsfile
11075        # Look for a target and build machine specific resource!
11076        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11077        if test "x$resource" = x; then
11078            # Ok, lets instead look for a target specific resource
11079            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11080        fi
11081        if test "x$resource" = x; then
11082            # Ok, lets instead look for a build specific resource
11083            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11084        fi
11085        if test "x$resource" = x; then
11086            # Ok, lets instead look for a generic resource
11087            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11088            resource=${builddep_bootjdk}
11089        fi
11090        if test "x$resource" != x; then
11091            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11092$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11093	    # If the resource in the builddeps.conf file is an existing directory,
11094	    # for example /java/linux/cups
11095	    if test -d ${resource}; then
11096	       depdir=${resource}
11097	    else
11098
11099# bootjdk is for example mymodule
11100# $resource is for example libs/general/libmymod_1_2_3.zip
11101# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11102# $with_builddeps_dir is for example /localhome/builddeps
11103# depdir is the name of the variable into which we store the depdir, eg MYMOD
11104# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11105# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11106    filename=`basename $resource`
11107    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11108    filebase=${filename%%.*}
11109    extension=${filename#*.}
11110    installdir=$with_builddeps_dir/$filebase
11111    if test ! -f $installdir/$filename.unpacked; then
11112        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11113$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11114        if test ! -d $installdir; then
11115            mkdir -p $installdir
11116        fi
11117        if test ! -d $installdir; then
11118            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11119        fi
11120        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11121        touch $tmpfile
11122        if test ! -f $tmpfile; then
11123            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11124        fi
11125
11126    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11127    # $tmpfile is the local file name for the downloaded file.
11128    VALID_TOOL=no
11129    if test "x$BDEPS_FTP" = xwget; then
11130       VALID_TOOL=yes
11131       wget -O $tmpfile $with_builddeps_server/$resource
11132    fi
11133    if test "x$BDEPS_FTP" = xlftp; then
11134       VALID_TOOL=yes
11135       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11136    fi
11137    if test "x$BDEPS_FTP" = xftp; then
11138        VALID_TOOL=yes
11139        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11140        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11141        FTPUSERPWD=${FTPSERVER%%@*}
11142        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11143            FTPUSER=${userpwd%%:*}
11144            FTPPWD=${userpwd#*@}
11145            FTPSERVER=${FTPSERVER#*@}
11146        else
11147            FTPUSER=ftp
11148            FTPPWD=ftp
11149        fi
11150        # the "pass" command does not work on some
11151        # ftp clients (read ftp.exe) but if it works,
11152        # passive mode is better!
11153        (\
11154            echo "user $FTPUSER $FTPPWD"        ;\
11155            echo "pass"                         ;\
11156            echo "bin"                          ;\
11157            echo "get $FTPPATH $tmpfile"              ;\
11158        ) | ftp -in $FTPSERVER
11159    fi
11160    if test "x$VALID_TOOL" != xyes; then
11161       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11162    fi
11163
11164        mv $tmpfile $installdir/$filename
11165        if test ! -s $installdir/$filename; then
11166            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11167        fi
11168        case "$extension" in
11169            zip)  echo "Unzipping $installdir/$filename..."
11170               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11171            ;;
11172            tar.gz) echo "Untaring $installdir/$filename..."
11173               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11174            ;;
11175            tgz) echo "Untaring $installdir/$filename..."
11176               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11177            ;;
11178            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11179            ;;
11180        esac
11181    fi
11182    if test -f $installdir/$filename.unpacked; then
11183        depdir=$installdir
11184    fi
11185
11186	    fi
11187            # Source the builddeps file again, because in the previous command, the depdir
11188            # was updated to point at the current build dependency install directory.
11189            . $builddepsfile
11190            # Now extract variables from the builddeps.conf files.
11191            theroot=${builddep_bootjdk_ROOT}
11192            thecflags=${builddep_bootjdk_CFLAGS}
11193            thelibs=${builddep_bootjdk_LIBS}
11194            if test "x$depdir" = x; then
11195                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11196            fi
11197            BOOT_JDK=$depdir
11198            if test "x$theroot" != x; then
11199               BOOT_JDK="$theroot"
11200            fi
11201            if test "x$thecflags" != x; then
11202               BOOT_JDK_CFLAGS="$thecflags"
11203            fi
11204            if test "x$thelibs" != x; then
11205               BOOT_JDK_LIBS="$thelibs"
11206            fi
11207            BOOT_JDK_FOUND=maybe
11208            else BOOT_JDK_FOUND=no
11209
11210        fi
11211        else BOOT_JDK_FOUND=no
11212
11213    fi
11214
11215
11216
11217    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11218    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11219      # Do we have a bin/java?
11220      if test ! -x "$BOOT_JDK/bin/java"; then
11221        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11223        BOOT_JDK_FOUND=no
11224      else
11225        # Do we have a bin/javac?
11226        if test ! -x "$BOOT_JDK/bin/javac"; then
11227          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11229          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11230$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11231          BOOT_JDK_FOUND=no
11232        else
11233          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11234          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11235            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11237            BOOT_JDK_FOUND=no
11238          else
11239            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11240            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11241
11242            # Extra M4 quote needed to protect [] in grep expression.
11243            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11244            if test "x$FOUND_VERSION_78" = x; then
11245              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11247              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11248$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11249              BOOT_JDK_FOUND=no
11250            else
11251              # We're done! :-)
11252              BOOT_JDK_FOUND=yes
11253
11254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11255
11256  # Input might be given as Windows format, start by converting to
11257  # unix format.
11258  path="$BOOT_JDK"
11259  new_path=`$CYGPATH -u "$path"`
11260
11261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11264  # "foo.exe" is OK but "foo" is an error.
11265  #
11266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11267  # It is also a way to make sure we got the proper file name for the real test later on.
11268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11269  if test "x$test_shortpath" = x; then
11270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11271$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11272    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11273  fi
11274
11275  # Call helper function which possibly converts this using DOS-style short mode.
11276  # If so, the updated path is stored in $new_path.
11277
11278  input_path="$new_path"
11279  # Check if we need to convert this using DOS-style short mode. If the path
11280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11281  # take no chances and rewrite it.
11282  # Note: m4 eats our [], so we need to use [ and ] instead.
11283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11284  if test "x$has_forbidden_chars" != x; then
11285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11289      # Going to short mode and back again did indeed matter. Since short mode is
11290      # case insensitive, let's make it lowercase to improve readability.
11291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11292      # Now convert it back to Unix-stile (cygpath)
11293      input_path=`$CYGPATH -u "$shortmode_path"`
11294      new_path="$input_path"
11295    fi
11296  fi
11297
11298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11299  if test "x$test_cygdrive_prefix" = x; then
11300    # As a simple fix, exclude /usr/bin since it's not a real path.
11301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11303      # a path prefixed by /cygdrive for fixpath to work.
11304      new_path="$CYGWIN_ROOT_PATH$input_path"
11305    fi
11306  fi
11307
11308
11309  if test "x$path" != "x$new_path"; then
11310    BOOT_JDK="$new_path"
11311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11312$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11313  fi
11314
11315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11316
11317  path="$BOOT_JDK"
11318  has_colon=`$ECHO $path | $GREP ^.:`
11319  new_path="$path"
11320  if test "x$has_colon" = x; then
11321    # Not in mixed or Windows style, start by that.
11322    new_path=`cmd //c echo $path`
11323  fi
11324
11325
11326  input_path="$new_path"
11327  # Check if we need to convert this using DOS-style short mode. If the path
11328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11329  # take no chances and rewrite it.
11330  # Note: m4 eats our [], so we need to use [ and ] instead.
11331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11332  if test "x$has_forbidden_chars" != x; then
11333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11335  fi
11336
11337
11338  windows_path="$new_path"
11339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11340    unix_path=`$CYGPATH -u "$windows_path"`
11341    new_path="$unix_path"
11342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11344    new_path="$unix_path"
11345  fi
11346
11347  if test "x$path" != "x$new_path"; then
11348    BOOT_JDK="$new_path"
11349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11350$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11351  fi
11352
11353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11355
11356  else
11357    # We're on a posix platform. Hooray! :)
11358    path="$BOOT_JDK"
11359
11360    if test ! -f "$path" && test ! -d "$path"; then
11361      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11362    fi
11363
11364    has_space=`$ECHO "$path" | $GREP " "`
11365    if test "x$has_space" != x; then
11366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11367$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11368      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11369    fi
11370  fi
11371
11372              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11373$as_echo_n "checking for Boot JDK... " >&6; }
11374              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11375$as_echo "$BOOT_JDK" >&6; }
11376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11377$as_echo_n "checking Boot JDK version... " >&6; }
11378              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11379              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11380$as_echo "$BOOT_JDK_VERSION" >&6; }
11381            fi # end check jdk version
11382          fi # end check rt.jar
11383        fi # end check javac
11384      fi # end check java
11385    fi # end check boot jdk found
11386  fi
11387
11388
11389# Test: Is $JAVA_HOME set?
11390
11391  if test "x$BOOT_JDK_FOUND" = xno; then
11392    # Now execute the test
11393
11394    if test "x$JAVA_HOME" != x; then
11395        JAVA_HOME_PROCESSED="$JAVA_HOME"
11396
11397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11398
11399  # Input might be given as Windows format, start by converting to
11400  # unix format.
11401  path="$JAVA_HOME_PROCESSED"
11402  new_path=`$CYGPATH -u "$path"`
11403
11404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11407  # "foo.exe" is OK but "foo" is an error.
11408  #
11409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11410  # It is also a way to make sure we got the proper file name for the real test later on.
11411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11412  if test "x$test_shortpath" = x; then
11413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11414$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11415    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11416  fi
11417
11418  # Call helper function which possibly converts this using DOS-style short mode.
11419  # If so, the updated path is stored in $new_path.
11420
11421  input_path="$new_path"
11422  # Check if we need to convert this using DOS-style short mode. If the path
11423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11424  # take no chances and rewrite it.
11425  # Note: m4 eats our [], so we need to use [ and ] instead.
11426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11427  if test "x$has_forbidden_chars" != x; then
11428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11432      # Going to short mode and back again did indeed matter. Since short mode is
11433      # case insensitive, let's make it lowercase to improve readability.
11434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11435      # Now convert it back to Unix-stile (cygpath)
11436      input_path=`$CYGPATH -u "$shortmode_path"`
11437      new_path="$input_path"
11438    fi
11439  fi
11440
11441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11442  if test "x$test_cygdrive_prefix" = x; then
11443    # As a simple fix, exclude /usr/bin since it's not a real path.
11444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11446      # a path prefixed by /cygdrive for fixpath to work.
11447      new_path="$CYGWIN_ROOT_PATH$input_path"
11448    fi
11449  fi
11450
11451
11452  if test "x$path" != "x$new_path"; then
11453    JAVA_HOME_PROCESSED="$new_path"
11454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11455$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11456  fi
11457
11458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11459
11460  path="$JAVA_HOME_PROCESSED"
11461  has_colon=`$ECHO $path | $GREP ^.:`
11462  new_path="$path"
11463  if test "x$has_colon" = x; then
11464    # Not in mixed or Windows style, start by that.
11465    new_path=`cmd //c echo $path`
11466  fi
11467
11468
11469  input_path="$new_path"
11470  # Check if we need to convert this using DOS-style short mode. If the path
11471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11472  # take no chances and rewrite it.
11473  # Note: m4 eats our [], so we need to use [ and ] instead.
11474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11475  if test "x$has_forbidden_chars" != x; then
11476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11478  fi
11479
11480
11481  windows_path="$new_path"
11482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11483    unix_path=`$CYGPATH -u "$windows_path"`
11484    new_path="$unix_path"
11485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11487    new_path="$unix_path"
11488  fi
11489
11490  if test "x$path" != "x$new_path"; then
11491    JAVA_HOME_PROCESSED="$new_path"
11492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11493$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11494  fi
11495
11496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11498
11499  else
11500    # We're on a posix platform. Hooray! :)
11501    path="$JAVA_HOME_PROCESSED"
11502
11503    if test ! -f "$path" && test ! -d "$path"; then
11504      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11505    fi
11506
11507    has_space=`$ECHO "$path" | $GREP " "`
11508    if test "x$has_space" != x; then
11509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11510$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11511      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11512    fi
11513  fi
11514
11515        if test ! -d "$JAVA_HOME_PROCESSED"; then
11516            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11517$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11518        else
11519          # Aha, the user has set a JAVA_HOME
11520          # let us use that as the Boot JDK.
11521          BOOT_JDK="$JAVA_HOME_PROCESSED"
11522          BOOT_JDK_FOUND=maybe
11523          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11524$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11525        fi
11526    fi
11527
11528
11529    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11530    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11531      # Do we have a bin/java?
11532      if test ! -x "$BOOT_JDK/bin/java"; then
11533        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11535        BOOT_JDK_FOUND=no
11536      else
11537        # Do we have a bin/javac?
11538        if test ! -x "$BOOT_JDK/bin/javac"; then
11539          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11541          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11542$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11543          BOOT_JDK_FOUND=no
11544        else
11545          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11546          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11547            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11549            BOOT_JDK_FOUND=no
11550          else
11551            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11552            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11553
11554            # Extra M4 quote needed to protect [] in grep expression.
11555            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11556            if test "x$FOUND_VERSION_78" = x; then
11557              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11559              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11560$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11561              BOOT_JDK_FOUND=no
11562            else
11563              # We're done! :-)
11564              BOOT_JDK_FOUND=yes
11565
11566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11567
11568  # Input might be given as Windows format, start by converting to
11569  # unix format.
11570  path="$BOOT_JDK"
11571  new_path=`$CYGPATH -u "$path"`
11572
11573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11576  # "foo.exe" is OK but "foo" is an error.
11577  #
11578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11579  # It is also a way to make sure we got the proper file name for the real test later on.
11580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11581  if test "x$test_shortpath" = x; then
11582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11583$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11584    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11585  fi
11586
11587  # Call helper function which possibly converts this using DOS-style short mode.
11588  # If so, the updated path is stored in $new_path.
11589
11590  input_path="$new_path"
11591  # Check if we need to convert this using DOS-style short mode. If the path
11592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11593  # take no chances and rewrite it.
11594  # Note: m4 eats our [], so we need to use [ and ] instead.
11595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11596  if test "x$has_forbidden_chars" != x; then
11597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11601      # Going to short mode and back again did indeed matter. Since short mode is
11602      # case insensitive, let's make it lowercase to improve readability.
11603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11604      # Now convert it back to Unix-stile (cygpath)
11605      input_path=`$CYGPATH -u "$shortmode_path"`
11606      new_path="$input_path"
11607    fi
11608  fi
11609
11610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11611  if test "x$test_cygdrive_prefix" = x; then
11612    # As a simple fix, exclude /usr/bin since it's not a real path.
11613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11615      # a path prefixed by /cygdrive for fixpath to work.
11616      new_path="$CYGWIN_ROOT_PATH$input_path"
11617    fi
11618  fi
11619
11620
11621  if test "x$path" != "x$new_path"; then
11622    BOOT_JDK="$new_path"
11623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11624$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11625  fi
11626
11627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11628
11629  path="$BOOT_JDK"
11630  has_colon=`$ECHO $path | $GREP ^.:`
11631  new_path="$path"
11632  if test "x$has_colon" = x; then
11633    # Not in mixed or Windows style, start by that.
11634    new_path=`cmd //c echo $path`
11635  fi
11636
11637
11638  input_path="$new_path"
11639  # Check if we need to convert this using DOS-style short mode. If the path
11640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11641  # take no chances and rewrite it.
11642  # Note: m4 eats our [], so we need to use [ and ] instead.
11643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11644  if test "x$has_forbidden_chars" != x; then
11645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11647  fi
11648
11649
11650  windows_path="$new_path"
11651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11652    unix_path=`$CYGPATH -u "$windows_path"`
11653    new_path="$unix_path"
11654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11656    new_path="$unix_path"
11657  fi
11658
11659  if test "x$path" != "x$new_path"; then
11660    BOOT_JDK="$new_path"
11661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11662$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11663  fi
11664
11665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11667
11668  else
11669    # We're on a posix platform. Hooray! :)
11670    path="$BOOT_JDK"
11671
11672    if test ! -f "$path" && test ! -d "$path"; then
11673      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11674    fi
11675
11676    has_space=`$ECHO "$path" | $GREP " "`
11677    if test "x$has_space" != x; then
11678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11680      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11681    fi
11682  fi
11683
11684              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11685$as_echo_n "checking for Boot JDK... " >&6; }
11686              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11687$as_echo "$BOOT_JDK" >&6; }
11688              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11689$as_echo_n "checking Boot JDK version... " >&6; }
11690              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11691              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11692$as_echo "$BOOT_JDK_VERSION" >&6; }
11693            fi # end check jdk version
11694          fi # end check rt.jar
11695        fi # end check javac
11696      fi # end check java
11697    fi # end check boot jdk found
11698  fi
11699
11700
11701# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11702
11703  if test "x$BOOT_JDK_FOUND" = xno; then
11704    # Now execute the test
11705
11706    if test -x /usr/libexec/java_home; then
11707        BOOT_JDK=`/usr/libexec/java_home`
11708        BOOT_JDK_FOUND=maybe
11709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11710$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11711    fi
11712
11713
11714    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11715    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11716      # Do we have a bin/java?
11717      if test ! -x "$BOOT_JDK/bin/java"; then
11718        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11720        BOOT_JDK_FOUND=no
11721      else
11722        # Do we have a bin/javac?
11723        if test ! -x "$BOOT_JDK/bin/javac"; then
11724          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11726          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11727$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11728          BOOT_JDK_FOUND=no
11729        else
11730          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11731          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11732            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11734            BOOT_JDK_FOUND=no
11735          else
11736            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11737            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11738
11739            # Extra M4 quote needed to protect [] in grep expression.
11740            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11741            if test "x$FOUND_VERSION_78" = x; then
11742              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11744              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11745$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11746              BOOT_JDK_FOUND=no
11747            else
11748              # We're done! :-)
11749              BOOT_JDK_FOUND=yes
11750
11751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11752
11753  # Input might be given as Windows format, start by converting to
11754  # unix format.
11755  path="$BOOT_JDK"
11756  new_path=`$CYGPATH -u "$path"`
11757
11758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11761  # "foo.exe" is OK but "foo" is an error.
11762  #
11763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11764  # It is also a way to make sure we got the proper file name for the real test later on.
11765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11766  if test "x$test_shortpath" = x; then
11767    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11768$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11769    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11770  fi
11771
11772  # Call helper function which possibly converts this using DOS-style short mode.
11773  # If so, the updated path is stored in $new_path.
11774
11775  input_path="$new_path"
11776  # Check if we need to convert this using DOS-style short mode. If the path
11777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11778  # take no chances and rewrite it.
11779  # Note: m4 eats our [], so we need to use [ and ] instead.
11780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11781  if test "x$has_forbidden_chars" != x; then
11782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11786      # Going to short mode and back again did indeed matter. Since short mode is
11787      # case insensitive, let's make it lowercase to improve readability.
11788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11789      # Now convert it back to Unix-stile (cygpath)
11790      input_path=`$CYGPATH -u "$shortmode_path"`
11791      new_path="$input_path"
11792    fi
11793  fi
11794
11795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11796  if test "x$test_cygdrive_prefix" = x; then
11797    # As a simple fix, exclude /usr/bin since it's not a real path.
11798    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11800      # a path prefixed by /cygdrive for fixpath to work.
11801      new_path="$CYGWIN_ROOT_PATH$input_path"
11802    fi
11803  fi
11804
11805
11806  if test "x$path" != "x$new_path"; then
11807    BOOT_JDK="$new_path"
11808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11810  fi
11811
11812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11813
11814  path="$BOOT_JDK"
11815  has_colon=`$ECHO $path | $GREP ^.:`
11816  new_path="$path"
11817  if test "x$has_colon" = x; then
11818    # Not in mixed or Windows style, start by that.
11819    new_path=`cmd //c echo $path`
11820  fi
11821
11822
11823  input_path="$new_path"
11824  # Check if we need to convert this using DOS-style short mode. If the path
11825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11826  # take no chances and rewrite it.
11827  # Note: m4 eats our [], so we need to use [ and ] instead.
11828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11829  if test "x$has_forbidden_chars" != x; then
11830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11832  fi
11833
11834
11835  windows_path="$new_path"
11836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11837    unix_path=`$CYGPATH -u "$windows_path"`
11838    new_path="$unix_path"
11839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11841    new_path="$unix_path"
11842  fi
11843
11844  if test "x$path" != "x$new_path"; then
11845    BOOT_JDK="$new_path"
11846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11848  fi
11849
11850  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11851  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11852
11853  else
11854    # We're on a posix platform. Hooray! :)
11855    path="$BOOT_JDK"
11856
11857    if test ! -f "$path" && test ! -d "$path"; then
11858      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11859    fi
11860
11861    has_space=`$ECHO "$path" | $GREP " "`
11862    if test "x$has_space" != x; then
11863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11864$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11865      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11866    fi
11867  fi
11868
11869              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11870$as_echo_n "checking for Boot JDK... " >&6; }
11871              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11872$as_echo "$BOOT_JDK" >&6; }
11873              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11874$as_echo_n "checking Boot JDK version... " >&6; }
11875              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11876              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11877$as_echo "$BOOT_JDK_VERSION" >&6; }
11878            fi # end check jdk version
11879          fi # end check rt.jar
11880        fi # end check javac
11881      fi # end check java
11882    fi # end check boot jdk found
11883  fi
11884
11885
11886# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11887
11888  if test "x$BOOT_JDK_FOUND" = xno; then
11889    # Now execute the test
11890
11891    # Extract the first word of "javac", so it can be a program name with args.
11892set dummy javac; ac_word=$2
11893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11894$as_echo_n "checking for $ac_word... " >&6; }
11895if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11896  $as_echo_n "(cached) " >&6
11897else
11898  case $JAVAC_CHECK in
11899  [\\/]* | ?:[\\/]*)
11900  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11901  ;;
11902  *)
11903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11904for as_dir in $PATH
11905do
11906  IFS=$as_save_IFS
11907  test -z "$as_dir" && as_dir=.
11908    for ac_exec_ext in '' $ac_executable_extensions; do
11909  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11910    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11912    break 2
11913  fi
11914done
11915  done
11916IFS=$as_save_IFS
11917
11918  ;;
11919esac
11920fi
11921JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11922if test -n "$JAVAC_CHECK"; then
11923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11924$as_echo "$JAVAC_CHECK" >&6; }
11925else
11926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11927$as_echo "no" >&6; }
11928fi
11929
11930
11931    # Extract the first word of "java", so it can be a program name with args.
11932set dummy java; ac_word=$2
11933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11934$as_echo_n "checking for $ac_word... " >&6; }
11935if ${ac_cv_path_JAVA_CHECK+:} false; then :
11936  $as_echo_n "(cached) " >&6
11937else
11938  case $JAVA_CHECK in
11939  [\\/]* | ?:[\\/]*)
11940  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11941  ;;
11942  *)
11943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11944for as_dir in $PATH
11945do
11946  IFS=$as_save_IFS
11947  test -z "$as_dir" && as_dir=.
11948    for ac_exec_ext in '' $ac_executable_extensions; do
11949  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11950    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11952    break 2
11953  fi
11954done
11955  done
11956IFS=$as_save_IFS
11957
11958  ;;
11959esac
11960fi
11961JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11962if test -n "$JAVA_CHECK"; then
11963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11964$as_echo "$JAVA_CHECK" >&6; }
11965else
11966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11967$as_echo "no" >&6; }
11968fi
11969
11970
11971    BINARY="$JAVAC_CHECK"
11972    if test "x$JAVAC_CHECK" = x; then
11973        BINARY="$JAVA_CHECK"
11974    fi
11975    if test "x$BINARY" != x; then
11976        # So there is a java(c) binary, it might be part of a JDK.
11977        # Lets find the JDK/JRE directory by following symbolic links.
11978        # Linux/GNU systems often have links from /usr/bin/java to
11979        # /etc/alternatives/java to the real JDK binary.
11980
11981    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11982        # Follow a chain of symbolic links. Use readlink
11983        # where it exists, else fall back to horribly
11984        # complicated shell code.
11985        if test "x$READLINK_TESTED" != yes; then
11986            # On MacOSX there is a readlink tool with a different
11987            # purpose than the GNU readlink tool. Check the found readlink.
11988            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11989            if test "x$ISGNU" = x; then
11990                 # A readlink that we do not know how to use.
11991                 # Are there other non-GNU readlinks out there?
11992                 READLINK_TESTED=yes
11993                 READLINK=
11994            fi
11995        fi
11996
11997        if test "x$READLINK" != x; then
11998            BINARY=`$READLINK -f $BINARY`
11999        else
12000            # Save the current directory for restoring afterwards
12001            STARTDIR=$PWD
12002            COUNTER=0
12003            sym_link_dir=`$DIRNAME $BINARY`
12004            sym_link_file=`$BASENAME $BINARY`
12005            # Use the system pwd and not the shell builtin to resolve directory symlinks
12006            cd $sym_link_dir
12007            cd `$THEPWDCMD`
12008            sym_link_dir=`$THEPWDCMD`
12009            # Resolve file symlinks
12010            while test $COUNTER -lt 20; do
12011                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12012                if test "x$ISLINK" == x; then
12013                    # This is not a symbolic link! We are done!
12014                    break
12015                fi
12016                # Again resolve directory symlinks since the target of the just found
12017                # link could be in a different directory
12018                cd `$DIRNAME $ISLINK`
12019                sym_link_dir=`$THEPWDCMD`
12020                sym_link_file=`$BASENAME $ISLINK`
12021                let COUNTER=COUNTER+1
12022            done
12023            cd $STARTDIR
12024            BINARY=$sym_link_dir/$sym_link_file
12025        fi
12026    fi
12027
12028        BOOT_JDK=`dirname "$BINARY"`
12029        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12030        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12031            # Looks like we found ourselves an JDK
12032            BOOT_JDK_FOUND=maybe
12033            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12034$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12035        fi
12036    fi
12037
12038
12039    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12040    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12041      # Do we have a bin/java?
12042      if test ! -x "$BOOT_JDK/bin/java"; then
12043        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12045        BOOT_JDK_FOUND=no
12046      else
12047        # Do we have a bin/javac?
12048        if test ! -x "$BOOT_JDK/bin/javac"; then
12049          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12051          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12052$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12053          BOOT_JDK_FOUND=no
12054        else
12055          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12056          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12059            BOOT_JDK_FOUND=no
12060          else
12061            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12062            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12063
12064            # Extra M4 quote needed to protect [] in grep expression.
12065            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12066            if test "x$FOUND_VERSION_78" = x; then
12067              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12069              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12070$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12071              BOOT_JDK_FOUND=no
12072            else
12073              # We're done! :-)
12074              BOOT_JDK_FOUND=yes
12075
12076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12077
12078  # Input might be given as Windows format, start by converting to
12079  # unix format.
12080  path="$BOOT_JDK"
12081  new_path=`$CYGPATH -u "$path"`
12082
12083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12086  # "foo.exe" is OK but "foo" is an error.
12087  #
12088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12089  # It is also a way to make sure we got the proper file name for the real test later on.
12090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12091  if test "x$test_shortpath" = x; then
12092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12094    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12095  fi
12096
12097  # Call helper function which possibly converts this using DOS-style short mode.
12098  # If so, the updated path is stored in $new_path.
12099
12100  input_path="$new_path"
12101  # Check if we need to convert this using DOS-style short mode. If the path
12102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12103  # take no chances and rewrite it.
12104  # Note: m4 eats our [], so we need to use [ and ] instead.
12105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12106  if test "x$has_forbidden_chars" != x; then
12107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12111      # Going to short mode and back again did indeed matter. Since short mode is
12112      # case insensitive, let's make it lowercase to improve readability.
12113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12114      # Now convert it back to Unix-stile (cygpath)
12115      input_path=`$CYGPATH -u "$shortmode_path"`
12116      new_path="$input_path"
12117    fi
12118  fi
12119
12120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12121  if test "x$test_cygdrive_prefix" = x; then
12122    # As a simple fix, exclude /usr/bin since it's not a real path.
12123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12125      # a path prefixed by /cygdrive for fixpath to work.
12126      new_path="$CYGWIN_ROOT_PATH$input_path"
12127    fi
12128  fi
12129
12130
12131  if test "x$path" != "x$new_path"; then
12132    BOOT_JDK="$new_path"
12133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12135  fi
12136
12137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12138
12139  path="$BOOT_JDK"
12140  has_colon=`$ECHO $path | $GREP ^.:`
12141  new_path="$path"
12142  if test "x$has_colon" = x; then
12143    # Not in mixed or Windows style, start by that.
12144    new_path=`cmd //c echo $path`
12145  fi
12146
12147
12148  input_path="$new_path"
12149  # Check if we need to convert this using DOS-style short mode. If the path
12150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12151  # take no chances and rewrite it.
12152  # Note: m4 eats our [], so we need to use [ and ] instead.
12153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12154  if test "x$has_forbidden_chars" != x; then
12155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12157  fi
12158
12159
12160  windows_path="$new_path"
12161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12162    unix_path=`$CYGPATH -u "$windows_path"`
12163    new_path="$unix_path"
12164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12166    new_path="$unix_path"
12167  fi
12168
12169  if test "x$path" != "x$new_path"; then
12170    BOOT_JDK="$new_path"
12171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12173  fi
12174
12175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12177
12178  else
12179    # We're on a posix platform. Hooray! :)
12180    path="$BOOT_JDK"
12181
12182    if test ! -f "$path" && test ! -d "$path"; then
12183      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12184    fi
12185
12186    has_space=`$ECHO "$path" | $GREP " "`
12187    if test "x$has_space" != x; then
12188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12191    fi
12192  fi
12193
12194              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12195$as_echo_n "checking for Boot JDK... " >&6; }
12196              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12197$as_echo "$BOOT_JDK" >&6; }
12198              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12199$as_echo_n "checking Boot JDK version... " >&6; }
12200              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12201              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12202$as_echo "$BOOT_JDK_VERSION" >&6; }
12203            fi # end check jdk version
12204          fi # end check rt.jar
12205        fi # end check javac
12206      fi # end check java
12207    fi # end check boot jdk found
12208  fi
12209
12210
12211# Test: Is there a JDK installed in default, well-known locations?
12212
12213  if test "x$BOOT_JDK_FOUND" = xno; then
12214    # Now execute the test
12215
12216  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12217
12218  if test "x$BOOT_JDK_FOUND" = xno; then
12219    # Now execute the test
12220
12221  if test "x$ProgramW6432" != x; then
12222    VIRTUAL_DIR="$ProgramW6432/Java"
12223
12224  windows_path="$VIRTUAL_DIR"
12225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12226    unix_path=`$CYGPATH -u "$windows_path"`
12227    VIRTUAL_DIR="$unix_path"
12228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12230    VIRTUAL_DIR="$unix_path"
12231  fi
12232
12233
12234  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12235  BOOT_JDK_SUFFIX=""
12236  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12237  if test "x$ALL_JDKS_FOUND" != x; then
12238    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12239
12240  if test "x$BOOT_JDK_FOUND" = xno; then
12241    # Now execute the test
12242
12243        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12244        if test -d "$BOOT_JDK"; then
12245          BOOT_JDK_FOUND=maybe
12246          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12247$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12248        fi
12249
12250
12251    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12252    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12253      # Do we have a bin/java?
12254      if test ! -x "$BOOT_JDK/bin/java"; then
12255        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12257        BOOT_JDK_FOUND=no
12258      else
12259        # Do we have a bin/javac?
12260        if test ! -x "$BOOT_JDK/bin/javac"; then
12261          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12263          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12264$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12265          BOOT_JDK_FOUND=no
12266        else
12267          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12268          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12269            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12271            BOOT_JDK_FOUND=no
12272          else
12273            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12274            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12275
12276            # Extra M4 quote needed to protect [] in grep expression.
12277            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12278            if test "x$FOUND_VERSION_78" = x; then
12279              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12281              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12282$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12283              BOOT_JDK_FOUND=no
12284            else
12285              # We're done! :-)
12286              BOOT_JDK_FOUND=yes
12287
12288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12289
12290  # Input might be given as Windows format, start by converting to
12291  # unix format.
12292  path="$BOOT_JDK"
12293  new_path=`$CYGPATH -u "$path"`
12294
12295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12298  # "foo.exe" is OK but "foo" is an error.
12299  #
12300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12301  # It is also a way to make sure we got the proper file name for the real test later on.
12302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12303  if test "x$test_shortpath" = x; then
12304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12305$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12306    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12307  fi
12308
12309  # Call helper function which possibly converts this using DOS-style short mode.
12310  # If so, the updated path is stored in $new_path.
12311
12312  input_path="$new_path"
12313  # Check if we need to convert this using DOS-style short mode. If the path
12314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12315  # take no chances and rewrite it.
12316  # Note: m4 eats our [], so we need to use [ and ] instead.
12317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12318  if test "x$has_forbidden_chars" != x; then
12319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12323      # Going to short mode and back again did indeed matter. Since short mode is
12324      # case insensitive, let's make it lowercase to improve readability.
12325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12326      # Now convert it back to Unix-stile (cygpath)
12327      input_path=`$CYGPATH -u "$shortmode_path"`
12328      new_path="$input_path"
12329    fi
12330  fi
12331
12332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12333  if test "x$test_cygdrive_prefix" = x; then
12334    # As a simple fix, exclude /usr/bin since it's not a real path.
12335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12337      # a path prefixed by /cygdrive for fixpath to work.
12338      new_path="$CYGWIN_ROOT_PATH$input_path"
12339    fi
12340  fi
12341
12342
12343  if test "x$path" != "x$new_path"; then
12344    BOOT_JDK="$new_path"
12345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12346$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12347  fi
12348
12349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12350
12351  path="$BOOT_JDK"
12352  has_colon=`$ECHO $path | $GREP ^.:`
12353  new_path="$path"
12354  if test "x$has_colon" = x; then
12355    # Not in mixed or Windows style, start by that.
12356    new_path=`cmd //c echo $path`
12357  fi
12358
12359
12360  input_path="$new_path"
12361  # Check if we need to convert this using DOS-style short mode. If the path
12362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12363  # take no chances and rewrite it.
12364  # Note: m4 eats our [], so we need to use [ and ] instead.
12365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12366  if test "x$has_forbidden_chars" != x; then
12367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12369  fi
12370
12371
12372  windows_path="$new_path"
12373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12374    unix_path=`$CYGPATH -u "$windows_path"`
12375    new_path="$unix_path"
12376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12378    new_path="$unix_path"
12379  fi
12380
12381  if test "x$path" != "x$new_path"; then
12382    BOOT_JDK="$new_path"
12383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12385  fi
12386
12387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12389
12390  else
12391    # We're on a posix platform. Hooray! :)
12392    path="$BOOT_JDK"
12393
12394    if test ! -f "$path" && test ! -d "$path"; then
12395      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12396    fi
12397
12398    has_space=`$ECHO "$path" | $GREP " "`
12399    if test "x$has_space" != x; then
12400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12402      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12403    fi
12404  fi
12405
12406              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12407$as_echo_n "checking for Boot JDK... " >&6; }
12408              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12409$as_echo "$BOOT_JDK" >&6; }
12410              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12411$as_echo_n "checking Boot JDK version... " >&6; }
12412              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12413              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12414$as_echo "$BOOT_JDK_VERSION" >&6; }
12415            fi # end check jdk version
12416          fi # end check rt.jar
12417        fi # end check javac
12418      fi # end check java
12419    fi # end check boot jdk found
12420  fi
12421
12422    done
12423  fi
12424
12425  fi
12426
12427
12428    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12429    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12430      # Do we have a bin/java?
12431      if test ! -x "$BOOT_JDK/bin/java"; then
12432        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12434        BOOT_JDK_FOUND=no
12435      else
12436        # Do we have a bin/javac?
12437        if test ! -x "$BOOT_JDK/bin/javac"; then
12438          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12440          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12441$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12442          BOOT_JDK_FOUND=no
12443        else
12444          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12445          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12446            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12448            BOOT_JDK_FOUND=no
12449          else
12450            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12451            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12452
12453            # Extra M4 quote needed to protect [] in grep expression.
12454            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12455            if test "x$FOUND_VERSION_78" = x; then
12456              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12458              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12459$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12460              BOOT_JDK_FOUND=no
12461            else
12462              # We're done! :-)
12463              BOOT_JDK_FOUND=yes
12464
12465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12466
12467  # Input might be given as Windows format, start by converting to
12468  # unix format.
12469  path="$BOOT_JDK"
12470  new_path=`$CYGPATH -u "$path"`
12471
12472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12475  # "foo.exe" is OK but "foo" is an error.
12476  #
12477  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12478  # It is also a way to make sure we got the proper file name for the real test later on.
12479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12480  if test "x$test_shortpath" = x; then
12481    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12482$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12483    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12484  fi
12485
12486  # Call helper function which possibly converts this using DOS-style short mode.
12487  # If so, the updated path is stored in $new_path.
12488
12489  input_path="$new_path"
12490  # Check if we need to convert this using DOS-style short mode. If the path
12491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12492  # take no chances and rewrite it.
12493  # Note: m4 eats our [], so we need to use [ and ] instead.
12494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12495  if test "x$has_forbidden_chars" != x; then
12496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12500      # Going to short mode and back again did indeed matter. Since short mode is
12501      # case insensitive, let's make it lowercase to improve readability.
12502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12503      # Now convert it back to Unix-stile (cygpath)
12504      input_path=`$CYGPATH -u "$shortmode_path"`
12505      new_path="$input_path"
12506    fi
12507  fi
12508
12509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12510  if test "x$test_cygdrive_prefix" = x; then
12511    # As a simple fix, exclude /usr/bin since it's not a real path.
12512    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12514      # a path prefixed by /cygdrive for fixpath to work.
12515      new_path="$CYGWIN_ROOT_PATH$input_path"
12516    fi
12517  fi
12518
12519
12520  if test "x$path" != "x$new_path"; then
12521    BOOT_JDK="$new_path"
12522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12523$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12524  fi
12525
12526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12527
12528  path="$BOOT_JDK"
12529  has_colon=`$ECHO $path | $GREP ^.:`
12530  new_path="$path"
12531  if test "x$has_colon" = x; then
12532    # Not in mixed or Windows style, start by that.
12533    new_path=`cmd //c echo $path`
12534  fi
12535
12536
12537  input_path="$new_path"
12538  # Check if we need to convert this using DOS-style short mode. If the path
12539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12540  # take no chances and rewrite it.
12541  # Note: m4 eats our [], so we need to use [ and ] instead.
12542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12543  if test "x$has_forbidden_chars" != x; then
12544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12546  fi
12547
12548
12549  windows_path="$new_path"
12550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12551    unix_path=`$CYGPATH -u "$windows_path"`
12552    new_path="$unix_path"
12553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12555    new_path="$unix_path"
12556  fi
12557
12558  if test "x$path" != "x$new_path"; then
12559    BOOT_JDK="$new_path"
12560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12561$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12562  fi
12563
12564  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12565  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12566
12567  else
12568    # We're on a posix platform. Hooray! :)
12569    path="$BOOT_JDK"
12570
12571    if test ! -f "$path" && test ! -d "$path"; then
12572      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12573    fi
12574
12575    has_space=`$ECHO "$path" | $GREP " "`
12576    if test "x$has_space" != x; then
12577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12579      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12580    fi
12581  fi
12582
12583              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12584$as_echo_n "checking for Boot JDK... " >&6; }
12585              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12586$as_echo "$BOOT_JDK" >&6; }
12587              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12588$as_echo_n "checking Boot JDK version... " >&6; }
12589              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12590              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12591$as_echo "$BOOT_JDK_VERSION" >&6; }
12592            fi # end check jdk version
12593          fi # end check rt.jar
12594        fi # end check javac
12595      fi # end check java
12596    fi # end check boot jdk found
12597  fi
12598
12599
12600  if test "x$BOOT_JDK_FOUND" = xno; then
12601    # Now execute the test
12602
12603  if test "x$PROGRAMW6432" != x; then
12604    VIRTUAL_DIR="$PROGRAMW6432/Java"
12605
12606  windows_path="$VIRTUAL_DIR"
12607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12608    unix_path=`$CYGPATH -u "$windows_path"`
12609    VIRTUAL_DIR="$unix_path"
12610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12612    VIRTUAL_DIR="$unix_path"
12613  fi
12614
12615
12616  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12617  BOOT_JDK_SUFFIX=""
12618  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12619  if test "x$ALL_JDKS_FOUND" != x; then
12620    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12621
12622  if test "x$BOOT_JDK_FOUND" = xno; then
12623    # Now execute the test
12624
12625        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12626        if test -d "$BOOT_JDK"; then
12627          BOOT_JDK_FOUND=maybe
12628          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12629$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12630        fi
12631
12632
12633    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12634    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12635      # Do we have a bin/java?
12636      if test ! -x "$BOOT_JDK/bin/java"; then
12637        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12639        BOOT_JDK_FOUND=no
12640      else
12641        # Do we have a bin/javac?
12642        if test ! -x "$BOOT_JDK/bin/javac"; then
12643          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12645          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12646$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12647          BOOT_JDK_FOUND=no
12648        else
12649          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12650          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12651            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12653            BOOT_JDK_FOUND=no
12654          else
12655            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12656            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12657
12658            # Extra M4 quote needed to protect [] in grep expression.
12659            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12660            if test "x$FOUND_VERSION_78" = x; then
12661              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12663              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12664$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12665              BOOT_JDK_FOUND=no
12666            else
12667              # We're done! :-)
12668              BOOT_JDK_FOUND=yes
12669
12670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12671
12672  # Input might be given as Windows format, start by converting to
12673  # unix format.
12674  path="$BOOT_JDK"
12675  new_path=`$CYGPATH -u "$path"`
12676
12677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12680  # "foo.exe" is OK but "foo" is an error.
12681  #
12682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12683  # It is also a way to make sure we got the proper file name for the real test later on.
12684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12685  if test "x$test_shortpath" = x; then
12686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12687$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12688    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12689  fi
12690
12691  # Call helper function which possibly converts this using DOS-style short mode.
12692  # If so, the updated path is stored in $new_path.
12693
12694  input_path="$new_path"
12695  # Check if we need to convert this using DOS-style short mode. If the path
12696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12697  # take no chances and rewrite it.
12698  # Note: m4 eats our [], so we need to use [ and ] instead.
12699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12700  if test "x$has_forbidden_chars" != x; then
12701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12705      # Going to short mode and back again did indeed matter. Since short mode is
12706      # case insensitive, let's make it lowercase to improve readability.
12707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12708      # Now convert it back to Unix-stile (cygpath)
12709      input_path=`$CYGPATH -u "$shortmode_path"`
12710      new_path="$input_path"
12711    fi
12712  fi
12713
12714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12715  if test "x$test_cygdrive_prefix" = x; then
12716    # As a simple fix, exclude /usr/bin since it's not a real path.
12717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12719      # a path prefixed by /cygdrive for fixpath to work.
12720      new_path="$CYGWIN_ROOT_PATH$input_path"
12721    fi
12722  fi
12723
12724
12725  if test "x$path" != "x$new_path"; then
12726    BOOT_JDK="$new_path"
12727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12728$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12729  fi
12730
12731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12732
12733  path="$BOOT_JDK"
12734  has_colon=`$ECHO $path | $GREP ^.:`
12735  new_path="$path"
12736  if test "x$has_colon" = x; then
12737    # Not in mixed or Windows style, start by that.
12738    new_path=`cmd //c echo $path`
12739  fi
12740
12741
12742  input_path="$new_path"
12743  # Check if we need to convert this using DOS-style short mode. If the path
12744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12745  # take no chances and rewrite it.
12746  # Note: m4 eats our [], so we need to use [ and ] instead.
12747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12748  if test "x$has_forbidden_chars" != x; then
12749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12751  fi
12752
12753
12754  windows_path="$new_path"
12755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12756    unix_path=`$CYGPATH -u "$windows_path"`
12757    new_path="$unix_path"
12758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12760    new_path="$unix_path"
12761  fi
12762
12763  if test "x$path" != "x$new_path"; then
12764    BOOT_JDK="$new_path"
12765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12767  fi
12768
12769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12771
12772  else
12773    # We're on a posix platform. Hooray! :)
12774    path="$BOOT_JDK"
12775
12776    if test ! -f "$path" && test ! -d "$path"; then
12777      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12778    fi
12779
12780    has_space=`$ECHO "$path" | $GREP " "`
12781    if test "x$has_space" != x; then
12782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12783$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12784      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12785    fi
12786  fi
12787
12788              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12789$as_echo_n "checking for Boot JDK... " >&6; }
12790              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12791$as_echo "$BOOT_JDK" >&6; }
12792              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12793$as_echo_n "checking Boot JDK version... " >&6; }
12794              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12795              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12796$as_echo "$BOOT_JDK_VERSION" >&6; }
12797            fi # end check jdk version
12798          fi # end check rt.jar
12799        fi # end check javac
12800      fi # end check java
12801    fi # end check boot jdk found
12802  fi
12803
12804    done
12805  fi
12806
12807  fi
12808
12809
12810    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12811    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12812      # Do we have a bin/java?
12813      if test ! -x "$BOOT_JDK/bin/java"; then
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12816        BOOT_JDK_FOUND=no
12817      else
12818        # Do we have a bin/javac?
12819        if test ! -x "$BOOT_JDK/bin/javac"; then
12820          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12822          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12823$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12824          BOOT_JDK_FOUND=no
12825        else
12826          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12827          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12828            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12830            BOOT_JDK_FOUND=no
12831          else
12832            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12833            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12834
12835            # Extra M4 quote needed to protect [] in grep expression.
12836            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12837            if test "x$FOUND_VERSION_78" = x; then
12838              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12840              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12841$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12842              BOOT_JDK_FOUND=no
12843            else
12844              # We're done! :-)
12845              BOOT_JDK_FOUND=yes
12846
12847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12848
12849  # Input might be given as Windows format, start by converting to
12850  # unix format.
12851  path="$BOOT_JDK"
12852  new_path=`$CYGPATH -u "$path"`
12853
12854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12857  # "foo.exe" is OK but "foo" is an error.
12858  #
12859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12860  # It is also a way to make sure we got the proper file name for the real test later on.
12861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12862  if test "x$test_shortpath" = x; then
12863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12864$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12865    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12866  fi
12867
12868  # Call helper function which possibly converts this using DOS-style short mode.
12869  # If so, the updated path is stored in $new_path.
12870
12871  input_path="$new_path"
12872  # Check if we need to convert this using DOS-style short mode. If the path
12873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12874  # take no chances and rewrite it.
12875  # Note: m4 eats our [], so we need to use [ and ] instead.
12876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12877  if test "x$has_forbidden_chars" != x; then
12878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12882      # Going to short mode and back again did indeed matter. Since short mode is
12883      # case insensitive, let's make it lowercase to improve readability.
12884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12885      # Now convert it back to Unix-stile (cygpath)
12886      input_path=`$CYGPATH -u "$shortmode_path"`
12887      new_path="$input_path"
12888    fi
12889  fi
12890
12891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12892  if test "x$test_cygdrive_prefix" = x; then
12893    # As a simple fix, exclude /usr/bin since it's not a real path.
12894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12896      # a path prefixed by /cygdrive for fixpath to work.
12897      new_path="$CYGWIN_ROOT_PATH$input_path"
12898    fi
12899  fi
12900
12901
12902  if test "x$path" != "x$new_path"; then
12903    BOOT_JDK="$new_path"
12904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12905$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12906  fi
12907
12908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12909
12910  path="$BOOT_JDK"
12911  has_colon=`$ECHO $path | $GREP ^.:`
12912  new_path="$path"
12913  if test "x$has_colon" = x; then
12914    # Not in mixed or Windows style, start by that.
12915    new_path=`cmd //c echo $path`
12916  fi
12917
12918
12919  input_path="$new_path"
12920  # Check if we need to convert this using DOS-style short mode. If the path
12921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12922  # take no chances and rewrite it.
12923  # Note: m4 eats our [], so we need to use [ and ] instead.
12924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12925  if test "x$has_forbidden_chars" != x; then
12926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12928  fi
12929
12930
12931  windows_path="$new_path"
12932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12933    unix_path=`$CYGPATH -u "$windows_path"`
12934    new_path="$unix_path"
12935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12937    new_path="$unix_path"
12938  fi
12939
12940  if test "x$path" != "x$new_path"; then
12941    BOOT_JDK="$new_path"
12942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12943$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12944  fi
12945
12946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12948
12949  else
12950    # We're on a posix platform. Hooray! :)
12951    path="$BOOT_JDK"
12952
12953    if test ! -f "$path" && test ! -d "$path"; then
12954      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12955    fi
12956
12957    has_space=`$ECHO "$path" | $GREP " "`
12958    if test "x$has_space" != x; then
12959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12960$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12961      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12962    fi
12963  fi
12964
12965              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12966$as_echo_n "checking for Boot JDK... " >&6; }
12967              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12968$as_echo "$BOOT_JDK" >&6; }
12969              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12970$as_echo_n "checking Boot JDK version... " >&6; }
12971              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12972              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12973$as_echo "$BOOT_JDK_VERSION" >&6; }
12974            fi # end check jdk version
12975          fi # end check rt.jar
12976        fi # end check javac
12977      fi # end check java
12978    fi # end check boot jdk found
12979  fi
12980
12981
12982  if test "x$BOOT_JDK_FOUND" = xno; then
12983    # Now execute the test
12984
12985  if test "x$PROGRAMFILES" != x; then
12986    VIRTUAL_DIR="$PROGRAMFILES/Java"
12987
12988  windows_path="$VIRTUAL_DIR"
12989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12990    unix_path=`$CYGPATH -u "$windows_path"`
12991    VIRTUAL_DIR="$unix_path"
12992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12994    VIRTUAL_DIR="$unix_path"
12995  fi
12996
12997
12998  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12999  BOOT_JDK_SUFFIX=""
13000  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13001  if test "x$ALL_JDKS_FOUND" != x; then
13002    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13003
13004  if test "x$BOOT_JDK_FOUND" = xno; then
13005    # Now execute the test
13006
13007        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13008        if test -d "$BOOT_JDK"; then
13009          BOOT_JDK_FOUND=maybe
13010          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13011$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13012        fi
13013
13014
13015    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13016    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13017      # Do we have a bin/java?
13018      if test ! -x "$BOOT_JDK/bin/java"; then
13019        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13021        BOOT_JDK_FOUND=no
13022      else
13023        # Do we have a bin/javac?
13024        if test ! -x "$BOOT_JDK/bin/javac"; then
13025          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13027          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13028$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13029          BOOT_JDK_FOUND=no
13030        else
13031          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13032          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13033            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13035            BOOT_JDK_FOUND=no
13036          else
13037            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13038            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13039
13040            # Extra M4 quote needed to protect [] in grep expression.
13041            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13042            if test "x$FOUND_VERSION_78" = x; then
13043              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13045              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13046$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13047              BOOT_JDK_FOUND=no
13048            else
13049              # We're done! :-)
13050              BOOT_JDK_FOUND=yes
13051
13052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13053
13054  # Input might be given as Windows format, start by converting to
13055  # unix format.
13056  path="$BOOT_JDK"
13057  new_path=`$CYGPATH -u "$path"`
13058
13059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13062  # "foo.exe" is OK but "foo" is an error.
13063  #
13064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13065  # It is also a way to make sure we got the proper file name for the real test later on.
13066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13067  if test "x$test_shortpath" = x; then
13068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13069$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13070    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13071  fi
13072
13073  # Call helper function which possibly converts this using DOS-style short mode.
13074  # If so, the updated path is stored in $new_path.
13075
13076  input_path="$new_path"
13077  # Check if we need to convert this using DOS-style short mode. If the path
13078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13079  # take no chances and rewrite it.
13080  # Note: m4 eats our [], so we need to use [ and ] instead.
13081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13082  if test "x$has_forbidden_chars" != x; then
13083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13087      # Going to short mode and back again did indeed matter. Since short mode is
13088      # case insensitive, let's make it lowercase to improve readability.
13089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13090      # Now convert it back to Unix-stile (cygpath)
13091      input_path=`$CYGPATH -u "$shortmode_path"`
13092      new_path="$input_path"
13093    fi
13094  fi
13095
13096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13097  if test "x$test_cygdrive_prefix" = x; then
13098    # As a simple fix, exclude /usr/bin since it's not a real path.
13099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13101      # a path prefixed by /cygdrive for fixpath to work.
13102      new_path="$CYGWIN_ROOT_PATH$input_path"
13103    fi
13104  fi
13105
13106
13107  if test "x$path" != "x$new_path"; then
13108    BOOT_JDK="$new_path"
13109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13110$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13111  fi
13112
13113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13114
13115  path="$BOOT_JDK"
13116  has_colon=`$ECHO $path | $GREP ^.:`
13117  new_path="$path"
13118  if test "x$has_colon" = x; then
13119    # Not in mixed or Windows style, start by that.
13120    new_path=`cmd //c echo $path`
13121  fi
13122
13123
13124  input_path="$new_path"
13125  # Check if we need to convert this using DOS-style short mode. If the path
13126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13127  # take no chances and rewrite it.
13128  # Note: m4 eats our [], so we need to use [ and ] instead.
13129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13130  if test "x$has_forbidden_chars" != x; then
13131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13133  fi
13134
13135
13136  windows_path="$new_path"
13137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13138    unix_path=`$CYGPATH -u "$windows_path"`
13139    new_path="$unix_path"
13140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13142    new_path="$unix_path"
13143  fi
13144
13145  if test "x$path" != "x$new_path"; then
13146    BOOT_JDK="$new_path"
13147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13148$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13149  fi
13150
13151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13153
13154  else
13155    # We're on a posix platform. Hooray! :)
13156    path="$BOOT_JDK"
13157
13158    if test ! -f "$path" && test ! -d "$path"; then
13159      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13160    fi
13161
13162    has_space=`$ECHO "$path" | $GREP " "`
13163    if test "x$has_space" != x; then
13164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13165$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13166      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13167    fi
13168  fi
13169
13170              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13171$as_echo_n "checking for Boot JDK... " >&6; }
13172              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13173$as_echo "$BOOT_JDK" >&6; }
13174              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13175$as_echo_n "checking Boot JDK version... " >&6; }
13176              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13177              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13178$as_echo "$BOOT_JDK_VERSION" >&6; }
13179            fi # end check jdk version
13180          fi # end check rt.jar
13181        fi # end check javac
13182      fi # end check java
13183    fi # end check boot jdk found
13184  fi
13185
13186    done
13187  fi
13188
13189  fi
13190
13191
13192    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13193    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13194      # Do we have a bin/java?
13195      if test ! -x "$BOOT_JDK/bin/java"; then
13196        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13198        BOOT_JDK_FOUND=no
13199      else
13200        # Do we have a bin/javac?
13201        if test ! -x "$BOOT_JDK/bin/javac"; then
13202          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13204          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13205$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13206          BOOT_JDK_FOUND=no
13207        else
13208          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13209          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13210            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13212            BOOT_JDK_FOUND=no
13213          else
13214            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13215            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13216
13217            # Extra M4 quote needed to protect [] in grep expression.
13218            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13219            if test "x$FOUND_VERSION_78" = x; then
13220              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13222              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13223$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13224              BOOT_JDK_FOUND=no
13225            else
13226              # We're done! :-)
13227              BOOT_JDK_FOUND=yes
13228
13229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13230
13231  # Input might be given as Windows format, start by converting to
13232  # unix format.
13233  path="$BOOT_JDK"
13234  new_path=`$CYGPATH -u "$path"`
13235
13236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13239  # "foo.exe" is OK but "foo" is an error.
13240  #
13241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13242  # It is also a way to make sure we got the proper file name for the real test later on.
13243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13244  if test "x$test_shortpath" = x; then
13245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13247    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13248  fi
13249
13250  # Call helper function which possibly converts this using DOS-style short mode.
13251  # If so, the updated path is stored in $new_path.
13252
13253  input_path="$new_path"
13254  # Check if we need to convert this using DOS-style short mode. If the path
13255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13256  # take no chances and rewrite it.
13257  # Note: m4 eats our [], so we need to use [ and ] instead.
13258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13259  if test "x$has_forbidden_chars" != x; then
13260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13264      # Going to short mode and back again did indeed matter. Since short mode is
13265      # case insensitive, let's make it lowercase to improve readability.
13266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13267      # Now convert it back to Unix-stile (cygpath)
13268      input_path=`$CYGPATH -u "$shortmode_path"`
13269      new_path="$input_path"
13270    fi
13271  fi
13272
13273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13274  if test "x$test_cygdrive_prefix" = x; then
13275    # As a simple fix, exclude /usr/bin since it's not a real path.
13276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13278      # a path prefixed by /cygdrive for fixpath to work.
13279      new_path="$CYGWIN_ROOT_PATH$input_path"
13280    fi
13281  fi
13282
13283
13284  if test "x$path" != "x$new_path"; then
13285    BOOT_JDK="$new_path"
13286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13288  fi
13289
13290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13291
13292  path="$BOOT_JDK"
13293  has_colon=`$ECHO $path | $GREP ^.:`
13294  new_path="$path"
13295  if test "x$has_colon" = x; then
13296    # Not in mixed or Windows style, start by that.
13297    new_path=`cmd //c echo $path`
13298  fi
13299
13300
13301  input_path="$new_path"
13302  # Check if we need to convert this using DOS-style short mode. If the path
13303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13304  # take no chances and rewrite it.
13305  # Note: m4 eats our [], so we need to use [ and ] instead.
13306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13307  if test "x$has_forbidden_chars" != x; then
13308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13310  fi
13311
13312
13313  windows_path="$new_path"
13314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13315    unix_path=`$CYGPATH -u "$windows_path"`
13316    new_path="$unix_path"
13317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13319    new_path="$unix_path"
13320  fi
13321
13322  if test "x$path" != "x$new_path"; then
13323    BOOT_JDK="$new_path"
13324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13326  fi
13327
13328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13330
13331  else
13332    # We're on a posix platform. Hooray! :)
13333    path="$BOOT_JDK"
13334
13335    if test ! -f "$path" && test ! -d "$path"; then
13336      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13337    fi
13338
13339    has_space=`$ECHO "$path" | $GREP " "`
13340    if test "x$has_space" != x; then
13341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13342$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13343      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13344    fi
13345  fi
13346
13347              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13348$as_echo_n "checking for Boot JDK... " >&6; }
13349              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13350$as_echo "$BOOT_JDK" >&6; }
13351              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13352$as_echo_n "checking Boot JDK version... " >&6; }
13353              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13354              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13355$as_echo "$BOOT_JDK_VERSION" >&6; }
13356            fi # end check jdk version
13357          fi # end check rt.jar
13358        fi # end check javac
13359      fi # end check java
13360    fi # end check boot jdk found
13361  fi
13362
13363
13364  if test "x$BOOT_JDK_FOUND" = xno; then
13365    # Now execute the test
13366
13367  if test "x$ProgramFiles" != x; then
13368    VIRTUAL_DIR="$ProgramFiles/Java"
13369
13370  windows_path="$VIRTUAL_DIR"
13371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13372    unix_path=`$CYGPATH -u "$windows_path"`
13373    VIRTUAL_DIR="$unix_path"
13374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13376    VIRTUAL_DIR="$unix_path"
13377  fi
13378
13379
13380  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13381  BOOT_JDK_SUFFIX=""
13382  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13383  if test "x$ALL_JDKS_FOUND" != x; then
13384    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13385
13386  if test "x$BOOT_JDK_FOUND" = xno; then
13387    # Now execute the test
13388
13389        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13390        if test -d "$BOOT_JDK"; then
13391          BOOT_JDK_FOUND=maybe
13392          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13393$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13394        fi
13395
13396
13397    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13398    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13399      # Do we have a bin/java?
13400      if test ! -x "$BOOT_JDK/bin/java"; then
13401        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13403        BOOT_JDK_FOUND=no
13404      else
13405        # Do we have a bin/javac?
13406        if test ! -x "$BOOT_JDK/bin/javac"; then
13407          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13409          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13410$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13411          BOOT_JDK_FOUND=no
13412        else
13413          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13414          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13415            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13417            BOOT_JDK_FOUND=no
13418          else
13419            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13420            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13421
13422            # Extra M4 quote needed to protect [] in grep expression.
13423            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13424            if test "x$FOUND_VERSION_78" = x; then
13425              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13427              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13428$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13429              BOOT_JDK_FOUND=no
13430            else
13431              # We're done! :-)
13432              BOOT_JDK_FOUND=yes
13433
13434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13435
13436  # Input might be given as Windows format, start by converting to
13437  # unix format.
13438  path="$BOOT_JDK"
13439  new_path=`$CYGPATH -u "$path"`
13440
13441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13444  # "foo.exe" is OK but "foo" is an error.
13445  #
13446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13447  # It is also a way to make sure we got the proper file name for the real test later on.
13448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13449  if test "x$test_shortpath" = x; then
13450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13452    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13453  fi
13454
13455  # Call helper function which possibly converts this using DOS-style short mode.
13456  # If so, the updated path is stored in $new_path.
13457
13458  input_path="$new_path"
13459  # Check if we need to convert this using DOS-style short mode. If the path
13460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13461  # take no chances and rewrite it.
13462  # Note: m4 eats our [], so we need to use [ and ] instead.
13463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13464  if test "x$has_forbidden_chars" != x; then
13465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13469      # Going to short mode and back again did indeed matter. Since short mode is
13470      # case insensitive, let's make it lowercase to improve readability.
13471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13472      # Now convert it back to Unix-stile (cygpath)
13473      input_path=`$CYGPATH -u "$shortmode_path"`
13474      new_path="$input_path"
13475    fi
13476  fi
13477
13478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13479  if test "x$test_cygdrive_prefix" = x; then
13480    # As a simple fix, exclude /usr/bin since it's not a real path.
13481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13483      # a path prefixed by /cygdrive for fixpath to work.
13484      new_path="$CYGWIN_ROOT_PATH$input_path"
13485    fi
13486  fi
13487
13488
13489  if test "x$path" != "x$new_path"; then
13490    BOOT_JDK="$new_path"
13491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13493  fi
13494
13495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13496
13497  path="$BOOT_JDK"
13498  has_colon=`$ECHO $path | $GREP ^.:`
13499  new_path="$path"
13500  if test "x$has_colon" = x; then
13501    # Not in mixed or Windows style, start by that.
13502    new_path=`cmd //c echo $path`
13503  fi
13504
13505
13506  input_path="$new_path"
13507  # Check if we need to convert this using DOS-style short mode. If the path
13508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13509  # take no chances and rewrite it.
13510  # Note: m4 eats our [], so we need to use [ and ] instead.
13511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13512  if test "x$has_forbidden_chars" != x; then
13513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13515  fi
13516
13517
13518  windows_path="$new_path"
13519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13520    unix_path=`$CYGPATH -u "$windows_path"`
13521    new_path="$unix_path"
13522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13524    new_path="$unix_path"
13525  fi
13526
13527  if test "x$path" != "x$new_path"; then
13528    BOOT_JDK="$new_path"
13529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13531  fi
13532
13533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13535
13536  else
13537    # We're on a posix platform. Hooray! :)
13538    path="$BOOT_JDK"
13539
13540    if test ! -f "$path" && test ! -d "$path"; then
13541      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13542    fi
13543
13544    has_space=`$ECHO "$path" | $GREP " "`
13545    if test "x$has_space" != x; then
13546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13548      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13549    fi
13550  fi
13551
13552              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13553$as_echo_n "checking for Boot JDK... " >&6; }
13554              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13555$as_echo "$BOOT_JDK" >&6; }
13556              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13557$as_echo_n "checking Boot JDK version... " >&6; }
13558              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13559              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13560$as_echo "$BOOT_JDK_VERSION" >&6; }
13561            fi # end check jdk version
13562          fi # end check rt.jar
13563        fi # end check javac
13564      fi # end check java
13565    fi # end check boot jdk found
13566  fi
13567
13568    done
13569  fi
13570
13571  fi
13572
13573
13574    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13575    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13576      # Do we have a bin/java?
13577      if test ! -x "$BOOT_JDK/bin/java"; then
13578        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13580        BOOT_JDK_FOUND=no
13581      else
13582        # Do we have a bin/javac?
13583        if test ! -x "$BOOT_JDK/bin/javac"; then
13584          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13586          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13587$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13588          BOOT_JDK_FOUND=no
13589        else
13590          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13591          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13592            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13594            BOOT_JDK_FOUND=no
13595          else
13596            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13598
13599            # Extra M4 quote needed to protect [] in grep expression.
13600            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13601            if test "x$FOUND_VERSION_78" = x; then
13602              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13604              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13605$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13606              BOOT_JDK_FOUND=no
13607            else
13608              # We're done! :-)
13609              BOOT_JDK_FOUND=yes
13610
13611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13612
13613  # Input might be given as Windows format, start by converting to
13614  # unix format.
13615  path="$BOOT_JDK"
13616  new_path=`$CYGPATH -u "$path"`
13617
13618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13621  # "foo.exe" is OK but "foo" is an error.
13622  #
13623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13624  # It is also a way to make sure we got the proper file name for the real test later on.
13625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13626  if test "x$test_shortpath" = x; then
13627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13629    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13630  fi
13631
13632  # Call helper function which possibly converts this using DOS-style short mode.
13633  # If so, the updated path is stored in $new_path.
13634
13635  input_path="$new_path"
13636  # Check if we need to convert this using DOS-style short mode. If the path
13637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13638  # take no chances and rewrite it.
13639  # Note: m4 eats our [], so we need to use [ and ] instead.
13640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13641  if test "x$has_forbidden_chars" != x; then
13642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13646      # Going to short mode and back again did indeed matter. Since short mode is
13647      # case insensitive, let's make it lowercase to improve readability.
13648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13649      # Now convert it back to Unix-stile (cygpath)
13650      input_path=`$CYGPATH -u "$shortmode_path"`
13651      new_path="$input_path"
13652    fi
13653  fi
13654
13655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13656  if test "x$test_cygdrive_prefix" = x; then
13657    # As a simple fix, exclude /usr/bin since it's not a real path.
13658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13660      # a path prefixed by /cygdrive for fixpath to work.
13661      new_path="$CYGWIN_ROOT_PATH$input_path"
13662    fi
13663  fi
13664
13665
13666  if test "x$path" != "x$new_path"; then
13667    BOOT_JDK="$new_path"
13668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13669$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13670  fi
13671
13672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13673
13674  path="$BOOT_JDK"
13675  has_colon=`$ECHO $path | $GREP ^.:`
13676  new_path="$path"
13677  if test "x$has_colon" = x; then
13678    # Not in mixed or Windows style, start by that.
13679    new_path=`cmd //c echo $path`
13680  fi
13681
13682
13683  input_path="$new_path"
13684  # Check if we need to convert this using DOS-style short mode. If the path
13685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13686  # take no chances and rewrite it.
13687  # Note: m4 eats our [], so we need to use [ and ] instead.
13688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13689  if test "x$has_forbidden_chars" != x; then
13690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13692  fi
13693
13694
13695  windows_path="$new_path"
13696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13697    unix_path=`$CYGPATH -u "$windows_path"`
13698    new_path="$unix_path"
13699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13701    new_path="$unix_path"
13702  fi
13703
13704  if test "x$path" != "x$new_path"; then
13705    BOOT_JDK="$new_path"
13706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13708  fi
13709
13710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13712
13713  else
13714    # We're on a posix platform. Hooray! :)
13715    path="$BOOT_JDK"
13716
13717    if test ! -f "$path" && test ! -d "$path"; then
13718      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13719    fi
13720
13721    has_space=`$ECHO "$path" | $GREP " "`
13722    if test "x$has_space" != x; then
13723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13724$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13725      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13726    fi
13727  fi
13728
13729              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13730$as_echo_n "checking for Boot JDK... " >&6; }
13731              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13732$as_echo "$BOOT_JDK" >&6; }
13733              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13734$as_echo_n "checking Boot JDK version... " >&6; }
13735              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13736              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13737$as_echo "$BOOT_JDK_VERSION" >&6; }
13738            fi # end check jdk version
13739          fi # end check rt.jar
13740        fi # end check javac
13741      fi # end check java
13742    fi # end check boot jdk found
13743  fi
13744
13745
13746  if test "x$BOOT_JDK_FOUND" = xno; then
13747    # Now execute the test
13748
13749  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13750  BOOT_JDK_SUFFIX=""
13751  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13752  if test "x$ALL_JDKS_FOUND" != x; then
13753    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13754
13755  if test "x$BOOT_JDK_FOUND" = xno; then
13756    # Now execute the test
13757
13758        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13759        if test -d "$BOOT_JDK"; then
13760          BOOT_JDK_FOUND=maybe
13761          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13762$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13763        fi
13764
13765
13766    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13767    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13768      # Do we have a bin/java?
13769      if test ! -x "$BOOT_JDK/bin/java"; then
13770        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13772        BOOT_JDK_FOUND=no
13773      else
13774        # Do we have a bin/javac?
13775        if test ! -x "$BOOT_JDK/bin/javac"; then
13776          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13778          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13779$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13780          BOOT_JDK_FOUND=no
13781        else
13782          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13783          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13784            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13786            BOOT_JDK_FOUND=no
13787          else
13788            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13789            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13790
13791            # Extra M4 quote needed to protect [] in grep expression.
13792            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13793            if test "x$FOUND_VERSION_78" = x; then
13794              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13796              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13797$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13798              BOOT_JDK_FOUND=no
13799            else
13800              # We're done! :-)
13801              BOOT_JDK_FOUND=yes
13802
13803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13804
13805  # Input might be given as Windows format, start by converting to
13806  # unix format.
13807  path="$BOOT_JDK"
13808  new_path=`$CYGPATH -u "$path"`
13809
13810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13813  # "foo.exe" is OK but "foo" is an error.
13814  #
13815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13816  # It is also a way to make sure we got the proper file name for the real test later on.
13817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13818  if test "x$test_shortpath" = x; then
13819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13821    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13822  fi
13823
13824  # Call helper function which possibly converts this using DOS-style short mode.
13825  # If so, the updated path is stored in $new_path.
13826
13827  input_path="$new_path"
13828  # Check if we need to convert this using DOS-style short mode. If the path
13829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13830  # take no chances and rewrite it.
13831  # Note: m4 eats our [], so we need to use [ and ] instead.
13832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13833  if test "x$has_forbidden_chars" != x; then
13834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13838      # Going to short mode and back again did indeed matter. Since short mode is
13839      # case insensitive, let's make it lowercase to improve readability.
13840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13841      # Now convert it back to Unix-stile (cygpath)
13842      input_path=`$CYGPATH -u "$shortmode_path"`
13843      new_path="$input_path"
13844    fi
13845  fi
13846
13847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13848  if test "x$test_cygdrive_prefix" = x; then
13849    # As a simple fix, exclude /usr/bin since it's not a real path.
13850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13852      # a path prefixed by /cygdrive for fixpath to work.
13853      new_path="$CYGWIN_ROOT_PATH$input_path"
13854    fi
13855  fi
13856
13857
13858  if test "x$path" != "x$new_path"; then
13859    BOOT_JDK="$new_path"
13860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13861$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13862  fi
13863
13864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13865
13866  path="$BOOT_JDK"
13867  has_colon=`$ECHO $path | $GREP ^.:`
13868  new_path="$path"
13869  if test "x$has_colon" = x; then
13870    # Not in mixed or Windows style, start by that.
13871    new_path=`cmd //c echo $path`
13872  fi
13873
13874
13875  input_path="$new_path"
13876  # Check if we need to convert this using DOS-style short mode. If the path
13877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13878  # take no chances and rewrite it.
13879  # Note: m4 eats our [], so we need to use [ and ] instead.
13880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13881  if test "x$has_forbidden_chars" != x; then
13882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13884  fi
13885
13886
13887  windows_path="$new_path"
13888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13889    unix_path=`$CYGPATH -u "$windows_path"`
13890    new_path="$unix_path"
13891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13893    new_path="$unix_path"
13894  fi
13895
13896  if test "x$path" != "x$new_path"; then
13897    BOOT_JDK="$new_path"
13898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13899$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13900  fi
13901
13902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13904
13905  else
13906    # We're on a posix platform. Hooray! :)
13907    path="$BOOT_JDK"
13908
13909    if test ! -f "$path" && test ! -d "$path"; then
13910      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13911    fi
13912
13913    has_space=`$ECHO "$path" | $GREP " "`
13914    if test "x$has_space" != x; then
13915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13917      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13918    fi
13919  fi
13920
13921              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13922$as_echo_n "checking for Boot JDK... " >&6; }
13923              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13924$as_echo "$BOOT_JDK" >&6; }
13925              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13926$as_echo_n "checking Boot JDK version... " >&6; }
13927              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13928              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13929$as_echo "$BOOT_JDK_VERSION" >&6; }
13930            fi # end check jdk version
13931          fi # end check rt.jar
13932        fi # end check javac
13933      fi # end check java
13934    fi # end check boot jdk found
13935  fi
13936
13937    done
13938  fi
13939
13940
13941    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13942    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13943      # Do we have a bin/java?
13944      if test ! -x "$BOOT_JDK/bin/java"; then
13945        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13947        BOOT_JDK_FOUND=no
13948      else
13949        # Do we have a bin/javac?
13950        if test ! -x "$BOOT_JDK/bin/javac"; then
13951          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13953          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13954$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13955          BOOT_JDK_FOUND=no
13956        else
13957          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13958          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13959            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13961            BOOT_JDK_FOUND=no
13962          else
13963            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13964            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13965
13966            # Extra M4 quote needed to protect [] in grep expression.
13967            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13968            if test "x$FOUND_VERSION_78" = x; then
13969              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13971              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13972$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13973              BOOT_JDK_FOUND=no
13974            else
13975              # We're done! :-)
13976              BOOT_JDK_FOUND=yes
13977
13978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13979
13980  # Input might be given as Windows format, start by converting to
13981  # unix format.
13982  path="$BOOT_JDK"
13983  new_path=`$CYGPATH -u "$path"`
13984
13985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13988  # "foo.exe" is OK but "foo" is an error.
13989  #
13990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13991  # It is also a way to make sure we got the proper file name for the real test later on.
13992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13993  if test "x$test_shortpath" = x; then
13994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13995$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13996    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13997  fi
13998
13999  # Call helper function which possibly converts this using DOS-style short mode.
14000  # If so, the updated path is stored in $new_path.
14001
14002  input_path="$new_path"
14003  # Check if we need to convert this using DOS-style short mode. If the path
14004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14005  # take no chances and rewrite it.
14006  # Note: m4 eats our [], so we need to use [ and ] instead.
14007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14008  if test "x$has_forbidden_chars" != x; then
14009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14013      # Going to short mode and back again did indeed matter. Since short mode is
14014      # case insensitive, let's make it lowercase to improve readability.
14015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14016      # Now convert it back to Unix-stile (cygpath)
14017      input_path=`$CYGPATH -u "$shortmode_path"`
14018      new_path="$input_path"
14019    fi
14020  fi
14021
14022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14023  if test "x$test_cygdrive_prefix" = x; then
14024    # As a simple fix, exclude /usr/bin since it's not a real path.
14025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14027      # a path prefixed by /cygdrive for fixpath to work.
14028      new_path="$CYGWIN_ROOT_PATH$input_path"
14029    fi
14030  fi
14031
14032
14033  if test "x$path" != "x$new_path"; then
14034    BOOT_JDK="$new_path"
14035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14037  fi
14038
14039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14040
14041  path="$BOOT_JDK"
14042  has_colon=`$ECHO $path | $GREP ^.:`
14043  new_path="$path"
14044  if test "x$has_colon" = x; then
14045    # Not in mixed or Windows style, start by that.
14046    new_path=`cmd //c echo $path`
14047  fi
14048
14049
14050  input_path="$new_path"
14051  # Check if we need to convert this using DOS-style short mode. If the path
14052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14053  # take no chances and rewrite it.
14054  # Note: m4 eats our [], so we need to use [ and ] instead.
14055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14056  if test "x$has_forbidden_chars" != x; then
14057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14059  fi
14060
14061
14062  windows_path="$new_path"
14063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14064    unix_path=`$CYGPATH -u "$windows_path"`
14065    new_path="$unix_path"
14066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14068    new_path="$unix_path"
14069  fi
14070
14071  if test "x$path" != "x$new_path"; then
14072    BOOT_JDK="$new_path"
14073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14075  fi
14076
14077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14079
14080  else
14081    # We're on a posix platform. Hooray! :)
14082    path="$BOOT_JDK"
14083
14084    if test ! -f "$path" && test ! -d "$path"; then
14085      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14086    fi
14087
14088    has_space=`$ECHO "$path" | $GREP " "`
14089    if test "x$has_space" != x; then
14090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14092      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14093    fi
14094  fi
14095
14096              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14097$as_echo_n "checking for Boot JDK... " >&6; }
14098              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14099$as_echo "$BOOT_JDK" >&6; }
14100              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14101$as_echo_n "checking Boot JDK version... " >&6; }
14102              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14103              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14104$as_echo "$BOOT_JDK_VERSION" >&6; }
14105            fi # end check jdk version
14106          fi # end check rt.jar
14107        fi # end check javac
14108      fi # end check java
14109    fi # end check boot jdk found
14110  fi
14111
14112  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14113
14114  if test "x$BOOT_JDK_FOUND" = xno; then
14115    # Now execute the test
14116
14117  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14118  BOOT_JDK_SUFFIX="/Contents/Home"
14119  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14120  if test "x$ALL_JDKS_FOUND" != x; then
14121    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14122
14123  if test "x$BOOT_JDK_FOUND" = xno; then
14124    # Now execute the test
14125
14126        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14127        if test -d "$BOOT_JDK"; then
14128          BOOT_JDK_FOUND=maybe
14129          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14130$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14131        fi
14132
14133
14134    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14135    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14136      # Do we have a bin/java?
14137      if test ! -x "$BOOT_JDK/bin/java"; then
14138        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14140        BOOT_JDK_FOUND=no
14141      else
14142        # Do we have a bin/javac?
14143        if test ! -x "$BOOT_JDK/bin/javac"; then
14144          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14146          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14147$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14148          BOOT_JDK_FOUND=no
14149        else
14150          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14151          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14152            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14154            BOOT_JDK_FOUND=no
14155          else
14156            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14157            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14158
14159            # Extra M4 quote needed to protect [] in grep expression.
14160            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14161            if test "x$FOUND_VERSION_78" = x; then
14162              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14164              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14165$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14166              BOOT_JDK_FOUND=no
14167            else
14168              # We're done! :-)
14169              BOOT_JDK_FOUND=yes
14170
14171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14172
14173  # Input might be given as Windows format, start by converting to
14174  # unix format.
14175  path="$BOOT_JDK"
14176  new_path=`$CYGPATH -u "$path"`
14177
14178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14181  # "foo.exe" is OK but "foo" is an error.
14182  #
14183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14184  # It is also a way to make sure we got the proper file name for the real test later on.
14185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14186  if test "x$test_shortpath" = x; then
14187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14189    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14190  fi
14191
14192  # Call helper function which possibly converts this using DOS-style short mode.
14193  # If so, the updated path is stored in $new_path.
14194
14195  input_path="$new_path"
14196  # Check if we need to convert this using DOS-style short mode. If the path
14197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14198  # take no chances and rewrite it.
14199  # Note: m4 eats our [], so we need to use [ and ] instead.
14200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14201  if test "x$has_forbidden_chars" != x; then
14202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14206      # Going to short mode and back again did indeed matter. Since short mode is
14207      # case insensitive, let's make it lowercase to improve readability.
14208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14209      # Now convert it back to Unix-stile (cygpath)
14210      input_path=`$CYGPATH -u "$shortmode_path"`
14211      new_path="$input_path"
14212    fi
14213  fi
14214
14215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14216  if test "x$test_cygdrive_prefix" = x; then
14217    # As a simple fix, exclude /usr/bin since it's not a real path.
14218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14220      # a path prefixed by /cygdrive for fixpath to work.
14221      new_path="$CYGWIN_ROOT_PATH$input_path"
14222    fi
14223  fi
14224
14225
14226  if test "x$path" != "x$new_path"; then
14227    BOOT_JDK="$new_path"
14228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14230  fi
14231
14232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14233
14234  path="$BOOT_JDK"
14235  has_colon=`$ECHO $path | $GREP ^.:`
14236  new_path="$path"
14237  if test "x$has_colon" = x; then
14238    # Not in mixed or Windows style, start by that.
14239    new_path=`cmd //c echo $path`
14240  fi
14241
14242
14243  input_path="$new_path"
14244  # Check if we need to convert this using DOS-style short mode. If the path
14245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14246  # take no chances and rewrite it.
14247  # Note: m4 eats our [], so we need to use [ and ] instead.
14248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14249  if test "x$has_forbidden_chars" != x; then
14250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14252  fi
14253
14254
14255  windows_path="$new_path"
14256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14257    unix_path=`$CYGPATH -u "$windows_path"`
14258    new_path="$unix_path"
14259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14261    new_path="$unix_path"
14262  fi
14263
14264  if test "x$path" != "x$new_path"; then
14265    BOOT_JDK="$new_path"
14266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14268  fi
14269
14270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14272
14273  else
14274    # We're on a posix platform. Hooray! :)
14275    path="$BOOT_JDK"
14276
14277    if test ! -f "$path" && test ! -d "$path"; then
14278      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14279    fi
14280
14281    has_space=`$ECHO "$path" | $GREP " "`
14282    if test "x$has_space" != x; then
14283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14285      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14286    fi
14287  fi
14288
14289              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14290$as_echo_n "checking for Boot JDK... " >&6; }
14291              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14292$as_echo "$BOOT_JDK" >&6; }
14293              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14294$as_echo_n "checking Boot JDK version... " >&6; }
14295              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14296              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14297$as_echo "$BOOT_JDK_VERSION" >&6; }
14298            fi # end check jdk version
14299          fi # end check rt.jar
14300        fi # end check javac
14301      fi # end check java
14302    fi # end check boot jdk found
14303  fi
14304
14305    done
14306  fi
14307
14308
14309    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14310    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14311      # Do we have a bin/java?
14312      if test ! -x "$BOOT_JDK/bin/java"; then
14313        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14315        BOOT_JDK_FOUND=no
14316      else
14317        # Do we have a bin/javac?
14318        if test ! -x "$BOOT_JDK/bin/javac"; then
14319          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14321          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14322$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14323          BOOT_JDK_FOUND=no
14324        else
14325          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14326          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14327            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14329            BOOT_JDK_FOUND=no
14330          else
14331            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14332            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14333
14334            # Extra M4 quote needed to protect [] in grep expression.
14335            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14336            if test "x$FOUND_VERSION_78" = x; then
14337              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14339              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14340$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14341              BOOT_JDK_FOUND=no
14342            else
14343              # We're done! :-)
14344              BOOT_JDK_FOUND=yes
14345
14346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14347
14348  # Input might be given as Windows format, start by converting to
14349  # unix format.
14350  path="$BOOT_JDK"
14351  new_path=`$CYGPATH -u "$path"`
14352
14353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14356  # "foo.exe" is OK but "foo" is an error.
14357  #
14358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14359  # It is also a way to make sure we got the proper file name for the real test later on.
14360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14361  if test "x$test_shortpath" = x; then
14362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14364    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14365  fi
14366
14367  # Call helper function which possibly converts this using DOS-style short mode.
14368  # If so, the updated path is stored in $new_path.
14369
14370  input_path="$new_path"
14371  # Check if we need to convert this using DOS-style short mode. If the path
14372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14373  # take no chances and rewrite it.
14374  # Note: m4 eats our [], so we need to use [ and ] instead.
14375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14376  if test "x$has_forbidden_chars" != x; then
14377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14381      # Going to short mode and back again did indeed matter. Since short mode is
14382      # case insensitive, let's make it lowercase to improve readability.
14383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14384      # Now convert it back to Unix-stile (cygpath)
14385      input_path=`$CYGPATH -u "$shortmode_path"`
14386      new_path="$input_path"
14387    fi
14388  fi
14389
14390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14391  if test "x$test_cygdrive_prefix" = x; then
14392    # As a simple fix, exclude /usr/bin since it's not a real path.
14393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14395      # a path prefixed by /cygdrive for fixpath to work.
14396      new_path="$CYGWIN_ROOT_PATH$input_path"
14397    fi
14398  fi
14399
14400
14401  if test "x$path" != "x$new_path"; then
14402    BOOT_JDK="$new_path"
14403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14405  fi
14406
14407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14408
14409  path="$BOOT_JDK"
14410  has_colon=`$ECHO $path | $GREP ^.:`
14411  new_path="$path"
14412  if test "x$has_colon" = x; then
14413    # Not in mixed or Windows style, start by that.
14414    new_path=`cmd //c echo $path`
14415  fi
14416
14417
14418  input_path="$new_path"
14419  # Check if we need to convert this using DOS-style short mode. If the path
14420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14421  # take no chances and rewrite it.
14422  # Note: m4 eats our [], so we need to use [ and ] instead.
14423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14424  if test "x$has_forbidden_chars" != x; then
14425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14427  fi
14428
14429
14430  windows_path="$new_path"
14431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14432    unix_path=`$CYGPATH -u "$windows_path"`
14433    new_path="$unix_path"
14434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14436    new_path="$unix_path"
14437  fi
14438
14439  if test "x$path" != "x$new_path"; then
14440    BOOT_JDK="$new_path"
14441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14443  fi
14444
14445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14447
14448  else
14449    # We're on a posix platform. Hooray! :)
14450    path="$BOOT_JDK"
14451
14452    if test ! -f "$path" && test ! -d "$path"; then
14453      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14454    fi
14455
14456    has_space=`$ECHO "$path" | $GREP " "`
14457    if test "x$has_space" != x; then
14458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14460      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14461    fi
14462  fi
14463
14464              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14465$as_echo_n "checking for Boot JDK... " >&6; }
14466              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14467$as_echo "$BOOT_JDK" >&6; }
14468              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14469$as_echo_n "checking Boot JDK version... " >&6; }
14470              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14471              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14472$as_echo "$BOOT_JDK_VERSION" >&6; }
14473            fi # end check jdk version
14474          fi # end check rt.jar
14475        fi # end check javac
14476      fi # end check java
14477    fi # end check boot jdk found
14478  fi
14479
14480
14481  if test "x$BOOT_JDK_FOUND" = xno; then
14482    # Now execute the test
14483
14484  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14485  BOOT_JDK_SUFFIX="/Contents/Home"
14486  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14487  if test "x$ALL_JDKS_FOUND" != x; then
14488    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14489
14490  if test "x$BOOT_JDK_FOUND" = xno; then
14491    # Now execute the test
14492
14493        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14494        if test -d "$BOOT_JDK"; then
14495          BOOT_JDK_FOUND=maybe
14496          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14497$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14498        fi
14499
14500
14501    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14502    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14503      # Do we have a bin/java?
14504      if test ! -x "$BOOT_JDK/bin/java"; then
14505        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14507        BOOT_JDK_FOUND=no
14508      else
14509        # Do we have a bin/javac?
14510        if test ! -x "$BOOT_JDK/bin/javac"; then
14511          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14513          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14514$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14515          BOOT_JDK_FOUND=no
14516        else
14517          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14518          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14519            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14521            BOOT_JDK_FOUND=no
14522          else
14523            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14524            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14525
14526            # Extra M4 quote needed to protect [] in grep expression.
14527            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14528            if test "x$FOUND_VERSION_78" = x; then
14529              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14531              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14532$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14533              BOOT_JDK_FOUND=no
14534            else
14535              # We're done! :-)
14536              BOOT_JDK_FOUND=yes
14537
14538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14539
14540  # Input might be given as Windows format, start by converting to
14541  # unix format.
14542  path="$BOOT_JDK"
14543  new_path=`$CYGPATH -u "$path"`
14544
14545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14548  # "foo.exe" is OK but "foo" is an error.
14549  #
14550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14551  # It is also a way to make sure we got the proper file name for the real test later on.
14552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14553  if test "x$test_shortpath" = x; then
14554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14556    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14557  fi
14558
14559  # Call helper function which possibly converts this using DOS-style short mode.
14560  # If so, the updated path is stored in $new_path.
14561
14562  input_path="$new_path"
14563  # Check if we need to convert this using DOS-style short mode. If the path
14564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14565  # take no chances and rewrite it.
14566  # Note: m4 eats our [], so we need to use [ and ] instead.
14567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14568  if test "x$has_forbidden_chars" != x; then
14569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14573      # Going to short mode and back again did indeed matter. Since short mode is
14574      # case insensitive, let's make it lowercase to improve readability.
14575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14576      # Now convert it back to Unix-stile (cygpath)
14577      input_path=`$CYGPATH -u "$shortmode_path"`
14578      new_path="$input_path"
14579    fi
14580  fi
14581
14582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14583  if test "x$test_cygdrive_prefix" = x; then
14584    # As a simple fix, exclude /usr/bin since it's not a real path.
14585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14587      # a path prefixed by /cygdrive for fixpath to work.
14588      new_path="$CYGWIN_ROOT_PATH$input_path"
14589    fi
14590  fi
14591
14592
14593  if test "x$path" != "x$new_path"; then
14594    BOOT_JDK="$new_path"
14595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14596$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14597  fi
14598
14599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14600
14601  path="$BOOT_JDK"
14602  has_colon=`$ECHO $path | $GREP ^.:`
14603  new_path="$path"
14604  if test "x$has_colon" = x; then
14605    # Not in mixed or Windows style, start by that.
14606    new_path=`cmd //c echo $path`
14607  fi
14608
14609
14610  input_path="$new_path"
14611  # Check if we need to convert this using DOS-style short mode. If the path
14612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14613  # take no chances and rewrite it.
14614  # Note: m4 eats our [], so we need to use [ and ] instead.
14615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14616  if test "x$has_forbidden_chars" != x; then
14617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14619  fi
14620
14621
14622  windows_path="$new_path"
14623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14624    unix_path=`$CYGPATH -u "$windows_path"`
14625    new_path="$unix_path"
14626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14628    new_path="$unix_path"
14629  fi
14630
14631  if test "x$path" != "x$new_path"; then
14632    BOOT_JDK="$new_path"
14633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14634$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14635  fi
14636
14637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14639
14640  else
14641    # We're on a posix platform. Hooray! :)
14642    path="$BOOT_JDK"
14643
14644    if test ! -f "$path" && test ! -d "$path"; then
14645      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14646    fi
14647
14648    has_space=`$ECHO "$path" | $GREP " "`
14649    if test "x$has_space" != x; then
14650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14652      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14653    fi
14654  fi
14655
14656              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14657$as_echo_n "checking for Boot JDK... " >&6; }
14658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14659$as_echo "$BOOT_JDK" >&6; }
14660              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14661$as_echo_n "checking Boot JDK version... " >&6; }
14662              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14663              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14664$as_echo "$BOOT_JDK_VERSION" >&6; }
14665            fi # end check jdk version
14666          fi # end check rt.jar
14667        fi # end check javac
14668      fi # end check java
14669    fi # end check boot jdk found
14670  fi
14671
14672    done
14673  fi
14674
14675
14676    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14677    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14678      # Do we have a bin/java?
14679      if test ! -x "$BOOT_JDK/bin/java"; then
14680        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14682        BOOT_JDK_FOUND=no
14683      else
14684        # Do we have a bin/javac?
14685        if test ! -x "$BOOT_JDK/bin/javac"; then
14686          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14688          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14689$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14690          BOOT_JDK_FOUND=no
14691        else
14692          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14693          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14694            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14696            BOOT_JDK_FOUND=no
14697          else
14698            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14699            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14700
14701            # Extra M4 quote needed to protect [] in grep expression.
14702            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14703            if test "x$FOUND_VERSION_78" = x; then
14704              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14706              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14707$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14708              BOOT_JDK_FOUND=no
14709            else
14710              # We're done! :-)
14711              BOOT_JDK_FOUND=yes
14712
14713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14714
14715  # Input might be given as Windows format, start by converting to
14716  # unix format.
14717  path="$BOOT_JDK"
14718  new_path=`$CYGPATH -u "$path"`
14719
14720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14723  # "foo.exe" is OK but "foo" is an error.
14724  #
14725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14726  # It is also a way to make sure we got the proper file name for the real test later on.
14727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14728  if test "x$test_shortpath" = x; then
14729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14731    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14732  fi
14733
14734  # Call helper function which possibly converts this using DOS-style short mode.
14735  # If so, the updated path is stored in $new_path.
14736
14737  input_path="$new_path"
14738  # Check if we need to convert this using DOS-style short mode. If the path
14739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14740  # take no chances and rewrite it.
14741  # Note: m4 eats our [], so we need to use [ and ] instead.
14742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14743  if test "x$has_forbidden_chars" != x; then
14744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14748      # Going to short mode and back again did indeed matter. Since short mode is
14749      # case insensitive, let's make it lowercase to improve readability.
14750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14751      # Now convert it back to Unix-stile (cygpath)
14752      input_path=`$CYGPATH -u "$shortmode_path"`
14753      new_path="$input_path"
14754    fi
14755  fi
14756
14757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14758  if test "x$test_cygdrive_prefix" = x; then
14759    # As a simple fix, exclude /usr/bin since it's not a real path.
14760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14762      # a path prefixed by /cygdrive for fixpath to work.
14763      new_path="$CYGWIN_ROOT_PATH$input_path"
14764    fi
14765  fi
14766
14767
14768  if test "x$path" != "x$new_path"; then
14769    BOOT_JDK="$new_path"
14770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14772  fi
14773
14774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14775
14776  path="$BOOT_JDK"
14777  has_colon=`$ECHO $path | $GREP ^.:`
14778  new_path="$path"
14779  if test "x$has_colon" = x; then
14780    # Not in mixed or Windows style, start by that.
14781    new_path=`cmd //c echo $path`
14782  fi
14783
14784
14785  input_path="$new_path"
14786  # Check if we need to convert this using DOS-style short mode. If the path
14787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14788  # take no chances and rewrite it.
14789  # Note: m4 eats our [], so we need to use [ and ] instead.
14790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14791  if test "x$has_forbidden_chars" != x; then
14792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14794  fi
14795
14796
14797  windows_path="$new_path"
14798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14799    unix_path=`$CYGPATH -u "$windows_path"`
14800    new_path="$unix_path"
14801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14803    new_path="$unix_path"
14804  fi
14805
14806  if test "x$path" != "x$new_path"; then
14807    BOOT_JDK="$new_path"
14808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14810  fi
14811
14812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14814
14815  else
14816    # We're on a posix platform. Hooray! :)
14817    path="$BOOT_JDK"
14818
14819    if test ! -f "$path" && test ! -d "$path"; then
14820      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14821    fi
14822
14823    has_space=`$ECHO "$path" | $GREP " "`
14824    if test "x$has_space" != x; then
14825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14826$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14827      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14828    fi
14829  fi
14830
14831              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14832$as_echo_n "checking for Boot JDK... " >&6; }
14833              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14834$as_echo "$BOOT_JDK" >&6; }
14835              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14836$as_echo_n "checking Boot JDK version... " >&6; }
14837              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14838              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14839$as_echo "$BOOT_JDK_VERSION" >&6; }
14840            fi # end check jdk version
14841          fi # end check rt.jar
14842        fi # end check javac
14843      fi # end check java
14844    fi # end check boot jdk found
14845  fi
14846
14847  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14848
14849  if test "x$BOOT_JDK_FOUND" = xno; then
14850    # Now execute the test
14851
14852  BOOT_JDK_PREFIX="/usr/lib/jvm"
14853  BOOT_JDK_SUFFIX=""
14854  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14855  if test "x$ALL_JDKS_FOUND" != x; then
14856    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14857
14858  if test "x$BOOT_JDK_FOUND" = xno; then
14859    # Now execute the test
14860
14861        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14862        if test -d "$BOOT_JDK"; then
14863          BOOT_JDK_FOUND=maybe
14864          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14865$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14866        fi
14867
14868
14869    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14870    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14871      # Do we have a bin/java?
14872      if test ! -x "$BOOT_JDK/bin/java"; then
14873        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14875        BOOT_JDK_FOUND=no
14876      else
14877        # Do we have a bin/javac?
14878        if test ! -x "$BOOT_JDK/bin/javac"; then
14879          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14881          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14882$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14883          BOOT_JDK_FOUND=no
14884        else
14885          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14886          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14887            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14889            BOOT_JDK_FOUND=no
14890          else
14891            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14892            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14893
14894            # Extra M4 quote needed to protect [] in grep expression.
14895            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14896            if test "x$FOUND_VERSION_78" = x; then
14897              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14899              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14900$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14901              BOOT_JDK_FOUND=no
14902            else
14903              # We're done! :-)
14904              BOOT_JDK_FOUND=yes
14905
14906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14907
14908  # Input might be given as Windows format, start by converting to
14909  # unix format.
14910  path="$BOOT_JDK"
14911  new_path=`$CYGPATH -u "$path"`
14912
14913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14916  # "foo.exe" is OK but "foo" is an error.
14917  #
14918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14919  # It is also a way to make sure we got the proper file name for the real test later on.
14920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14921  if test "x$test_shortpath" = x; then
14922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14923$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14924    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14925  fi
14926
14927  # Call helper function which possibly converts this using DOS-style short mode.
14928  # If so, the updated path is stored in $new_path.
14929
14930  input_path="$new_path"
14931  # Check if we need to convert this using DOS-style short mode. If the path
14932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14933  # take no chances and rewrite it.
14934  # Note: m4 eats our [], so we need to use [ and ] instead.
14935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14936  if test "x$has_forbidden_chars" != x; then
14937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14941      # Going to short mode and back again did indeed matter. Since short mode is
14942      # case insensitive, let's make it lowercase to improve readability.
14943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14944      # Now convert it back to Unix-stile (cygpath)
14945      input_path=`$CYGPATH -u "$shortmode_path"`
14946      new_path="$input_path"
14947    fi
14948  fi
14949
14950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14951  if test "x$test_cygdrive_prefix" = x; then
14952    # As a simple fix, exclude /usr/bin since it's not a real path.
14953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14955      # a path prefixed by /cygdrive for fixpath to work.
14956      new_path="$CYGWIN_ROOT_PATH$input_path"
14957    fi
14958  fi
14959
14960
14961  if test "x$path" != "x$new_path"; then
14962    BOOT_JDK="$new_path"
14963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14965  fi
14966
14967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14968
14969  path="$BOOT_JDK"
14970  has_colon=`$ECHO $path | $GREP ^.:`
14971  new_path="$path"
14972  if test "x$has_colon" = x; then
14973    # Not in mixed or Windows style, start by that.
14974    new_path=`cmd //c echo $path`
14975  fi
14976
14977
14978  input_path="$new_path"
14979  # Check if we need to convert this using DOS-style short mode. If the path
14980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14981  # take no chances and rewrite it.
14982  # Note: m4 eats our [], so we need to use [ and ] instead.
14983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14984  if test "x$has_forbidden_chars" != x; then
14985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14987  fi
14988
14989
14990  windows_path="$new_path"
14991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14992    unix_path=`$CYGPATH -u "$windows_path"`
14993    new_path="$unix_path"
14994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14996    new_path="$unix_path"
14997  fi
14998
14999  if test "x$path" != "x$new_path"; then
15000    BOOT_JDK="$new_path"
15001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15003  fi
15004
15005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15007
15008  else
15009    # We're on a posix platform. Hooray! :)
15010    path="$BOOT_JDK"
15011
15012    if test ! -f "$path" && test ! -d "$path"; then
15013      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15014    fi
15015
15016    has_space=`$ECHO "$path" | $GREP " "`
15017    if test "x$has_space" != x; then
15018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15020      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15021    fi
15022  fi
15023
15024              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15025$as_echo_n "checking for Boot JDK... " >&6; }
15026              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15027$as_echo "$BOOT_JDK" >&6; }
15028              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15029$as_echo_n "checking Boot JDK version... " >&6; }
15030              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15031              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15032$as_echo "$BOOT_JDK_VERSION" >&6; }
15033            fi # end check jdk version
15034          fi # end check rt.jar
15035        fi # end check javac
15036      fi # end check java
15037    fi # end check boot jdk found
15038  fi
15039
15040    done
15041  fi
15042
15043
15044    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15045    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15046      # Do we have a bin/java?
15047      if test ! -x "$BOOT_JDK/bin/java"; then
15048        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15050        BOOT_JDK_FOUND=no
15051      else
15052        # Do we have a bin/javac?
15053        if test ! -x "$BOOT_JDK/bin/javac"; then
15054          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15056          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15057$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15058          BOOT_JDK_FOUND=no
15059        else
15060          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15061          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15062            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15064            BOOT_JDK_FOUND=no
15065          else
15066            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15067            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15068
15069            # Extra M4 quote needed to protect [] in grep expression.
15070            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15071            if test "x$FOUND_VERSION_78" = x; then
15072              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15074              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15075$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15076              BOOT_JDK_FOUND=no
15077            else
15078              # We're done! :-)
15079              BOOT_JDK_FOUND=yes
15080
15081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15082
15083  # Input might be given as Windows format, start by converting to
15084  # unix format.
15085  path="$BOOT_JDK"
15086  new_path=`$CYGPATH -u "$path"`
15087
15088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15091  # "foo.exe" is OK but "foo" is an error.
15092  #
15093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15094  # It is also a way to make sure we got the proper file name for the real test later on.
15095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15096  if test "x$test_shortpath" = x; then
15097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15099    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15100  fi
15101
15102  # Call helper function which possibly converts this using DOS-style short mode.
15103  # If so, the updated path is stored in $new_path.
15104
15105  input_path="$new_path"
15106  # Check if we need to convert this using DOS-style short mode. If the path
15107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15108  # take no chances and rewrite it.
15109  # Note: m4 eats our [], so we need to use [ and ] instead.
15110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15111  if test "x$has_forbidden_chars" != x; then
15112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15116      # Going to short mode and back again did indeed matter. Since short mode is
15117      # case insensitive, let's make it lowercase to improve readability.
15118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15119      # Now convert it back to Unix-stile (cygpath)
15120      input_path=`$CYGPATH -u "$shortmode_path"`
15121      new_path="$input_path"
15122    fi
15123  fi
15124
15125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15126  if test "x$test_cygdrive_prefix" = x; then
15127    # As a simple fix, exclude /usr/bin since it's not a real path.
15128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15130      # a path prefixed by /cygdrive for fixpath to work.
15131      new_path="$CYGWIN_ROOT_PATH$input_path"
15132    fi
15133  fi
15134
15135
15136  if test "x$path" != "x$new_path"; then
15137    BOOT_JDK="$new_path"
15138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15140  fi
15141
15142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15143
15144  path="$BOOT_JDK"
15145  has_colon=`$ECHO $path | $GREP ^.:`
15146  new_path="$path"
15147  if test "x$has_colon" = x; then
15148    # Not in mixed or Windows style, start by that.
15149    new_path=`cmd //c echo $path`
15150  fi
15151
15152
15153  input_path="$new_path"
15154  # Check if we need to convert this using DOS-style short mode. If the path
15155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15156  # take no chances and rewrite it.
15157  # Note: m4 eats our [], so we need to use [ and ] instead.
15158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15159  if test "x$has_forbidden_chars" != x; then
15160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15162  fi
15163
15164
15165  windows_path="$new_path"
15166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15167    unix_path=`$CYGPATH -u "$windows_path"`
15168    new_path="$unix_path"
15169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15171    new_path="$unix_path"
15172  fi
15173
15174  if test "x$path" != "x$new_path"; then
15175    BOOT_JDK="$new_path"
15176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15178  fi
15179
15180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15182
15183  else
15184    # We're on a posix platform. Hooray! :)
15185    path="$BOOT_JDK"
15186
15187    if test ! -f "$path" && test ! -d "$path"; then
15188      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15189    fi
15190
15191    has_space=`$ECHO "$path" | $GREP " "`
15192    if test "x$has_space" != x; then
15193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15194$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15195      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15196    fi
15197  fi
15198
15199              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15200$as_echo_n "checking for Boot JDK... " >&6; }
15201              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15202$as_echo "$BOOT_JDK" >&6; }
15203              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15204$as_echo_n "checking Boot JDK version... " >&6; }
15205              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15206              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15207$as_echo "$BOOT_JDK_VERSION" >&6; }
15208            fi # end check jdk version
15209          fi # end check rt.jar
15210        fi # end check javac
15211      fi # end check java
15212    fi # end check boot jdk found
15213  fi
15214
15215  fi
15216
15217
15218    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15219    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15220      # Do we have a bin/java?
15221      if test ! -x "$BOOT_JDK/bin/java"; then
15222        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15224        BOOT_JDK_FOUND=no
15225      else
15226        # Do we have a bin/javac?
15227        if test ! -x "$BOOT_JDK/bin/javac"; then
15228          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15230          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15231$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15232          BOOT_JDK_FOUND=no
15233        else
15234          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15235          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15236            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15238            BOOT_JDK_FOUND=no
15239          else
15240            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15242
15243            # Extra M4 quote needed to protect [] in grep expression.
15244            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15245            if test "x$FOUND_VERSION_78" = x; then
15246              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15248              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15249$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15250              BOOT_JDK_FOUND=no
15251            else
15252              # We're done! :-)
15253              BOOT_JDK_FOUND=yes
15254
15255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15256
15257  # Input might be given as Windows format, start by converting to
15258  # unix format.
15259  path="$BOOT_JDK"
15260  new_path=`$CYGPATH -u "$path"`
15261
15262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15265  # "foo.exe" is OK but "foo" is an error.
15266  #
15267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15268  # It is also a way to make sure we got the proper file name for the real test later on.
15269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15270  if test "x$test_shortpath" = x; then
15271    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15273    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15274  fi
15275
15276  # Call helper function which possibly converts this using DOS-style short mode.
15277  # If so, the updated path is stored in $new_path.
15278
15279  input_path="$new_path"
15280  # Check if we need to convert this using DOS-style short mode. If the path
15281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15282  # take no chances and rewrite it.
15283  # Note: m4 eats our [], so we need to use [ and ] instead.
15284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15285  if test "x$has_forbidden_chars" != x; then
15286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15290      # Going to short mode and back again did indeed matter. Since short mode is
15291      # case insensitive, let's make it lowercase to improve readability.
15292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15293      # Now convert it back to Unix-stile (cygpath)
15294      input_path=`$CYGPATH -u "$shortmode_path"`
15295      new_path="$input_path"
15296    fi
15297  fi
15298
15299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15300  if test "x$test_cygdrive_prefix" = x; then
15301    # As a simple fix, exclude /usr/bin since it's not a real path.
15302    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15304      # a path prefixed by /cygdrive for fixpath to work.
15305      new_path="$CYGWIN_ROOT_PATH$input_path"
15306    fi
15307  fi
15308
15309
15310  if test "x$path" != "x$new_path"; then
15311    BOOT_JDK="$new_path"
15312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15314  fi
15315
15316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15317
15318  path="$BOOT_JDK"
15319  has_colon=`$ECHO $path | $GREP ^.:`
15320  new_path="$path"
15321  if test "x$has_colon" = x; then
15322    # Not in mixed or Windows style, start by that.
15323    new_path=`cmd //c echo $path`
15324  fi
15325
15326
15327  input_path="$new_path"
15328  # Check if we need to convert this using DOS-style short mode. If the path
15329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15330  # take no chances and rewrite it.
15331  # Note: m4 eats our [], so we need to use [ and ] instead.
15332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15333  if test "x$has_forbidden_chars" != x; then
15334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15336  fi
15337
15338
15339  windows_path="$new_path"
15340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15341    unix_path=`$CYGPATH -u "$windows_path"`
15342    new_path="$unix_path"
15343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15345    new_path="$unix_path"
15346  fi
15347
15348  if test "x$path" != "x$new_path"; then
15349    BOOT_JDK="$new_path"
15350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15352  fi
15353
15354  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15355  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15356
15357  else
15358    # We're on a posix platform. Hooray! :)
15359    path="$BOOT_JDK"
15360
15361    if test ! -f "$path" && test ! -d "$path"; then
15362      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15363    fi
15364
15365    has_space=`$ECHO "$path" | $GREP " "`
15366    if test "x$has_space" != x; then
15367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15369      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15370    fi
15371  fi
15372
15373              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15374$as_echo_n "checking for Boot JDK... " >&6; }
15375              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15376$as_echo "$BOOT_JDK" >&6; }
15377              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15378$as_echo_n "checking Boot JDK version... " >&6; }
15379              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15380              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15381$as_echo "$BOOT_JDK_VERSION" >&6; }
15382            fi # end check jdk version
15383          fi # end check rt.jar
15384        fi # end check javac
15385      fi # end check java
15386    fi # end check boot jdk found
15387  fi
15388
15389
15390# If we haven't found anything yet, we've truly lost. Give up.
15391if test "x$BOOT_JDK_FOUND" = xno; then
15392
15393    # Print a helpful message on how to acquire the necessary build dependency.
15394    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15395    MISSING_DEPENDENCY=openjdk
15396    PKGHANDLER_COMMAND=
15397
15398    case $PKGHANDLER in
15399	apt-get)
15400                apt_help     $MISSING_DEPENDENCY ;;
15401    yum)
15402                yum_help     $MISSING_DEPENDENCY ;;
15403	port)
15404                port_help    $MISSING_DEPENDENCY ;;
15405	pkgutil)
15406                pkgutil_help $MISSING_DEPENDENCY ;;
15407	pkgadd)
15408                pkgadd_help  $MISSING_DEPENDENCY ;;
15409    * )
15410      break ;;
15411    esac
15412
15413    if test "x$PKGHANDLER_COMMAND" != x; then
15414        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15415    fi
15416
15417  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15418$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15419  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15420$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15421  as_fn_error $? "Cannot continue" "$LINENO" 5
15422fi
15423
15424# Setup proper paths for what we found
15425BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15426if test ! -f "$BOOT_RTJAR"; then
15427    # On MacOSX it is called classes.jar
15428    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15429    if test -f "$BOOT_RTJAR"; then
15430      # Remove the ..
15431      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15432    fi
15433fi
15434BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15435BOOT_JDK="$BOOT_JDK"
15436
15437
15438
15439
15440# Setup tools from the Boot JDK.
15441
15442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15443$as_echo_n "checking for java in Boot JDK... " >&6; }
15444  JAVA=$BOOT_JDK/bin/java
15445  if test ! -x $JAVA; then
15446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15447$as_echo "not found" >&6; }
15448      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15449$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15450      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15451  fi
15452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15453$as_echo "ok" >&6; }
15454
15455
15456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15457$as_echo_n "checking for javac in Boot JDK... " >&6; }
15458  JAVAC=$BOOT_JDK/bin/javac
15459  if test ! -x $JAVAC; then
15460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15461$as_echo "not found" >&6; }
15462      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15463$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15464      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15465  fi
15466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15467$as_echo "ok" >&6; }
15468
15469
15470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15471$as_echo_n "checking for javah in Boot JDK... " >&6; }
15472  JAVAH=$BOOT_JDK/bin/javah
15473  if test ! -x $JAVAH; then
15474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15475$as_echo "not found" >&6; }
15476      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15477$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15478      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15479  fi
15480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15481$as_echo "ok" >&6; }
15482
15483
15484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15485$as_echo_n "checking for javap in Boot JDK... " >&6; }
15486  JAVAP=$BOOT_JDK/bin/javap
15487  if test ! -x $JAVAP; then
15488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15489$as_echo "not found" >&6; }
15490      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15491$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15492      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15493  fi
15494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15495$as_echo "ok" >&6; }
15496
15497
15498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15499$as_echo_n "checking for jar in Boot JDK... " >&6; }
15500  JAR=$BOOT_JDK/bin/jar
15501  if test ! -x $JAR; then
15502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15503$as_echo "not found" >&6; }
15504      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15505$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15506      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15507  fi
15508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15509$as_echo "ok" >&6; }
15510
15511
15512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15513$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15514  RMIC=$BOOT_JDK/bin/rmic
15515  if test ! -x $RMIC; then
15516      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15517$as_echo "not found" >&6; }
15518      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15519$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15520      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15521  fi
15522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15523$as_echo "ok" >&6; }
15524
15525
15526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15527$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15528  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15529  if test ! -x $NATIVE2ASCII; then
15530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15531$as_echo "not found" >&6; }
15532      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15533$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15534      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15535  fi
15536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15537$as_echo "ok" >&6; }
15538
15539
15540# Finally, set some other options...
15541
15542# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15543BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15544
15545
15546
15547
15548##############################################################################
15549#
15550# Specify options for anything that is run with the Boot JDK.
15551#
15552
15553# Check whether --with-boot-jdk-jvmargs was given.
15554if test "${with_boot_jdk_jvmargs+set}" = set; then :
15555  withval=$with_boot_jdk_jvmargs;
15556fi
15557
15558
15559if test "x$with_boot_jdk_jvmargs" = x; then
15560    # Not all JVM:s accept the same arguments on the command line.
15561    # OpenJDK specific increase in thread stack for JDK build,
15562    # well more specifically, when running javac.
15563    if test "x$BUILD_NUM_BITS" = x32; then
15564       STACK_SIZE=768
15565    else
15566       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15567       # since 64-bit pointers are pushed on the stach. Apparently, we need
15568       # to increase the stack space when javacing the JDK....
15569       STACK_SIZE=1536
15570    fi
15571
15572    # Minimum amount of heap memory.
15573
15574    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15575    # If so, then append -Xms64M to boot_jdk_jvmargs
15576    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15577    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15578    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15579        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15580    fi
15581
15582    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15583        # Why does macosx need more heap? Its the huge JDK batch.
15584
15585    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15586    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15587    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15588    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15589    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15590        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15591    fi
15592
15593    else
15594
15595    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15596    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15597    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15598    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15599    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15600        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15601    fi
15602
15603    fi
15604    # When is adding -client something that speeds up the JVM?
15605    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15606
15607    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15608    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15609    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15610    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15611    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15612        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15613    fi
15614
15615
15616    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15617    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15618    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15619    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15620    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15621        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15622    fi
15623
15624
15625    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15626    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15627    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15628    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15629    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15630        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15631    fi
15632
15633    # Disable special log output when a debug build is used as Boot JDK...
15634
15635    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15636    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15637    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15638    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15639    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15640        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15641    fi
15642
15643fi
15644
15645BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15646
15647
15648
15649###############################################################################
15650#
15651# Configure the sources to use. We can add or override individual directories.
15652#
15653###############################################################################
15654
15655
15656
15657# Where are the sources. Any of these can be overridden
15658# using --with-override-corba and the likes.
15659LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15660CORBA_TOPDIR="$SRC_ROOT/corba"
15661JAXP_TOPDIR="$SRC_ROOT/jaxp"
15662JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15663HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15664JDK_TOPDIR="$SRC_ROOT/jdk"
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674###############################################################################
15675#
15676# Pickup additional source for a component from outside of the source root
15677# or override source for a component.
15678#
15679
15680# Check whether --with-add-source-root was given.
15681if test "${with_add_source_root+set}" = set; then :
15682  withval=$with_add_source_root;
15683fi
15684
15685
15686
15687# Check whether --with-override-source-root was given.
15688if test "${with_override_source_root+set}" = set; then :
15689  withval=$with_override_source_root;
15690fi
15691
15692
15693
15694# Check whether --with-adds-and-overrides was given.
15695if test "${with_adds_and_overrides+set}" = set; then :
15696  withval=$with_adds_and_overrides;
15697fi
15698
15699
15700if test "x$with_adds_and_overrides" != x; then
15701    with_add_source_root="$with_adds_and_overrides/adds"
15702    with_override_source_root="$with_adds_and_overrides/overrides"
15703fi
15704
15705if test "x$with_add_source_root" != x; then
15706    if ! test -d $with_add_source_root; then
15707       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15708    fi
15709    CURDIR="$PWD"
15710    cd "$with_add_source_root"
15711    ADD_SRC_ROOT="`pwd`"
15712    cd "$CURDIR"
15713    # Verify that the addon source root does not have any root makefiles.
15714    # If it does, then it is usually an error, prevent this.
15715    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15716       test -f $with_add_source_root/langtools/make/Makefile; then
15717        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
15718    fi
15719    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15720       test -f $with_add_source_root/corba/make/Makefile; then
15721        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
15722    fi
15723    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15724       test -f $with_add_source_root/jaxp/make/Makefile; then
15725        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
15726    fi
15727    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15728       test -f $with_add_source_root/jaxws/make/Makefile; then
15729        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
15730    fi
15731    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15732       test -f $with_add_source_root/hotspot/make/Makefile; then
15733        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
15734    fi
15735    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15736       test -f $with_add_source_root/jdk/make/Makefile; then
15737        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
15738    fi
15739fi
15740
15741
15742if test "x$with_override_source_root" != x; then
15743    if ! test -d $with_override_source_root; then
15744       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15745    fi
15746    CURDIR="$PWD"
15747    cd "$with_override_source_root"
15748    OVERRIDE_SRC_ROOT="`pwd`"
15749    cd "$CURDIR"
15750    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15751       test -f $with_override_source_root/langtools/make/Makefile; then
15752        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
15753    fi
15754    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15755       test -f $with_override_source_root/corba/make/Makefile; then
15756        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
15757    fi
15758    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15759       test -f $with_override_source_root/jaxp/make/Makefile; then
15760        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
15761    fi
15762    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15763       test -f $with_override_source_root/jaxws/make/Makefile; then
15764        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
15765    fi
15766    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15767       test -f $with_override_source_root/hotspot/make/Makefile; then
15768        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
15769    fi
15770    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15771       test -f $with_override_source_root/jdk/make/Makefile; then
15772        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
15773    fi
15774fi
15775
15776
15777###############################################################################
15778#
15779# Override a repo completely, this is used for example when you have 3 small
15780# development sandboxes of the langtools sources and want to avoid having 3 full
15781# OpenJDK sources checked out on disk.
15782#
15783# Assuming that the 3 langtools sandboxes are located here:
15784# /home/fredrik/sandbox1/langtools
15785# /home/fredrik/sandbox2/langtools
15786# /home/fredrik/sandbox3/langtools
15787#
15788# From the source root you create build subdirs manually:
15789#     mkdir -p build1 build2 build3
15790# in each build directory run:
15791#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15792#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15793#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15794#
15795
15796
15797# Check whether --with-override-langtools was given.
15798if test "${with_override_langtools+set}" = set; then :
15799  withval=$with_override_langtools;
15800fi
15801
15802
15803
15804# Check whether --with-override-corba was given.
15805if test "${with_override_corba+set}" = set; then :
15806  withval=$with_override_corba;
15807fi
15808
15809
15810
15811# Check whether --with-override-jaxp was given.
15812if test "${with_override_jaxp+set}" = set; then :
15813  withval=$with_override_jaxp;
15814fi
15815
15816
15817
15818# Check whether --with-override-jaxws was given.
15819if test "${with_override_jaxws+set}" = set; then :
15820  withval=$with_override_jaxws;
15821fi
15822
15823
15824
15825# Check whether --with-override-hotspot was given.
15826if test "${with_override_hotspot+set}" = set; then :
15827  withval=$with_override_hotspot;
15828fi
15829
15830
15831
15832# Check whether --with-override-jdk was given.
15833if test "${with_override_jdk+set}" = set; then :
15834  withval=$with_override_jdk;
15835fi
15836
15837
15838if test "x$with_override_langtools" != x; then
15839    CURDIR="$PWD"
15840    cd "$with_override_langtools"
15841    LANGTOOLS_TOPDIR="`pwd`"
15842    cd "$CURDIR"
15843    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15844        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15845    fi
15846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15847$as_echo_n "checking if langtools should be overridden... " >&6; }
15848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15849$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15850fi
15851if test "x$with_override_corba" != x; then
15852    CURDIR="$PWD"
15853    cd "$with_override_corba"
15854    CORBA_TOPDIR="`pwd`"
15855    cd "$CURDIR"
15856    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15857        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15858    fi
15859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15860$as_echo_n "checking if corba should be overridden... " >&6; }
15861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15862$as_echo "yes with $CORBA_TOPDIR" >&6; }
15863fi
15864if test "x$with_override_jaxp" != x; then
15865    CURDIR="$PWD"
15866    cd "$with_override_jaxp"
15867    JAXP_TOPDIR="`pwd`"
15868    cd "$CURDIR"
15869    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15870        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15871    fi
15872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15873$as_echo_n "checking if jaxp should be overridden... " >&6; }
15874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15875$as_echo "yes with $JAXP_TOPDIR" >&6; }
15876fi
15877if test "x$with_override_jaxws" != x; then
15878    CURDIR="$PWD"
15879    cd "$with_override_jaxws"
15880    JAXWS_TOPDIR="`pwd`"
15881    cd "$CURDIR"
15882    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15883        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15884    fi
15885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15886$as_echo_n "checking if jaxws should be overridden... " >&6; }
15887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15888$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15889fi
15890if test "x$with_override_hotspot" != x; then
15891    CURDIR="$PWD"
15892    cd "$with_override_hotspot"
15893    HOTSPOT_TOPDIR="`pwd`"
15894    cd "$CURDIR"
15895    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15896       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15897        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15898    fi
15899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15900$as_echo_n "checking if hotspot should be overridden... " >&6; }
15901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15902$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15903fi
15904if test "x$with_override_jdk" != x; then
15905    CURDIR="$PWD"
15906    cd "$with_override_jdk"
15907    JDK_TOPDIR="`pwd`"
15908    cd "$CURDIR"
15909    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15910        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15911    fi
15912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15913$as_echo_n "checking if JDK should be overridden... " >&6; }
15914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15915$as_echo "yes with $JDK_TOPDIR" >&6; }
15916fi
15917
15918
15919
15920BUILD_OUTPUT="$OUTPUT_ROOT"
15921
15922
15923HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15924BUILD_HOTSPOT=true
15925
15926
15927
15928# Check whether --with-import-hotspot was given.
15929if test "${with_import_hotspot+set}" = set; then :
15930  withval=$with_import_hotspot;
15931fi
15932
15933if test "x$with_import_hotspot" != x; then
15934    CURDIR="$PWD"
15935    cd "$with_import_hotspot"
15936    HOTSPOT_DIST="`pwd`"
15937    cd "$CURDIR"
15938    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15939        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15940    fi
15941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15942$as_echo_n "checking if hotspot should be imported... " >&6; }
15943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15944$as_echo "yes from $HOTSPOT_DIST" >&6; }
15945    BUILD_HOTSPOT=false
15946fi
15947
15948JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15949
15950
15951###############################################################################
15952#
15953# Setup the toolchain (compilers etc), i.e. the tools that need to be
15954# cross-compilation aware.
15955#
15956###############################################################################
15957
15958
15959###############################################################################
15960#
15961# Configure the development tool paths and potential sysroot.
15962#
15963ac_ext=cpp
15964ac_cpp='$CXXCPP $CPPFLAGS'
15965ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15966ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15967ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15968
15969
15970# The option used to specify the target .o,.a or .so file.
15971# When compiling, how to specify the to be created object file.
15972CC_OUT_OPTION='-o$(SPACE)'
15973# When linking, how to specify the to be created executable.
15974EXE_OUT_OPTION='-o$(SPACE)'
15975# When linking, how to specify the to be created dynamically linkable library.
15976LD_OUT_OPTION='-o$(SPACE)'
15977# When archiving, how to specify the to be create static archive for object files.
15978AR_OUT_OPTION='rcs$(SPACE)'
15979
15980
15981
15982
15983
15984# Locate the actual tools
15985
15986if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15987
15988  # Store path to cygwin link.exe to help excluding it when searching for
15989  # VS linker. This must be done before changing the PATH when looking for VS.
15990  # Extract the first word of "link", so it can be a program name with args.
15991set dummy link; ac_word=$2
15992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15993$as_echo_n "checking for $ac_word... " >&6; }
15994if ${ac_cv_path_CYGWIN_LINK+:} false; then :
15995  $as_echo_n "(cached) " >&6
15996else
15997  case $CYGWIN_LINK in
15998  [\\/]* | ?:[\\/]*)
15999  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16000  ;;
16001  *)
16002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16003for as_dir in $PATH
16004do
16005  IFS=$as_save_IFS
16006  test -z "$as_dir" && as_dir=.
16007    for ac_exec_ext in '' $ac_executable_extensions; do
16008  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16009    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16011    break 2
16012  fi
16013done
16014  done
16015IFS=$as_save_IFS
16016
16017  ;;
16018esac
16019fi
16020CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16021if test -n "$CYGWIN_LINK"; then
16022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16023$as_echo "$CYGWIN_LINK" >&6; }
16024else
16025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16026$as_echo "no" >&6; }
16027fi
16028
16029
16030  if test "x$CYGWIN_LINK" != x; then
16031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16032$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16033    "$CYGWIN_LINK" --version > /dev/null
16034    if test $? -eq 0 ; then
16035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16036$as_echo "yes" >&6; }
16037    else
16038      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16039$as_echo "no" >&6; }
16040      # This might be the VS linker. Don't exclude it later on.
16041      CYGWIN_LINK=""
16042    fi
16043  fi
16044
16045  # First-hand choice is to locate and run the vsvars bat file.
16046
16047  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16048    VCVARSFILE="vc/bin/vcvars32.bat"
16049  else
16050    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16051  fi
16052
16053  VS_ENV_CMD=""
16054  VS_ENV_ARGS=""
16055  if test "x$with_toolsdir" != x; then
16056
16057  if test "x$VS_ENV_CMD" = x; then
16058    VS100BASE="$with_toolsdir/../.."
16059    METHOD="--with-tools-dir"
16060
16061  windows_path="$VS100BASE"
16062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16063    unix_path=`$CYGPATH -u "$windows_path"`
16064    VS100BASE="$unix_path"
16065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16067    VS100BASE="$unix_path"
16068  fi
16069
16070    if test -d "$VS100BASE"; then
16071      if test -f "$VS100BASE/$VCVARSFILE"; then
16072        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16073$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16074        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16075      else
16076        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16077$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16078        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16079$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16080      fi
16081    fi
16082  fi
16083
16084  fi
16085
16086  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16087    # Having specified an argument which is incorrect will produce an instant failure;
16088    # we should not go on looking
16089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16090$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16091    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16092$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16093    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16094  fi
16095
16096  if test "x$ProgramW6432" != x; then
16097
16098  if test "x$VS_ENV_CMD" = x; then
16099    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16100    METHOD="well-known name"
16101
16102  windows_path="$WIN_SDK_BASE"
16103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16104    unix_path=`$CYGPATH -u "$windows_path"`
16105    WIN_SDK_BASE="$unix_path"
16106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16108    WIN_SDK_BASE="$unix_path"
16109  fi
16110
16111    if test -d "$WIN_SDK_BASE"; then
16112      # There have been cases of partial or broken SDK installations. A missing
16113      # lib dir is not going to work.
16114      if test ! -d "$WIN_SDK_BASE/../lib"; then
16115        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16116$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16117        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16118$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16119      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16120        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16121$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16122        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16123        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16124          VS_ENV_ARGS="/x86"
16125        else
16126          VS_ENV_ARGS="/x64"
16127        fi
16128      else
16129        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16130$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16131        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16132$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16133      fi
16134    fi
16135  fi
16136
16137  fi
16138  if test "x$PROGRAMW6432" != x; then
16139
16140  if test "x$VS_ENV_CMD" = x; then
16141    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16142    METHOD="well-known name"
16143
16144  windows_path="$WIN_SDK_BASE"
16145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16146    unix_path=`$CYGPATH -u "$windows_path"`
16147    WIN_SDK_BASE="$unix_path"
16148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16150    WIN_SDK_BASE="$unix_path"
16151  fi
16152
16153    if test -d "$WIN_SDK_BASE"; then
16154      # There have been cases of partial or broken SDK installations. A missing
16155      # lib dir is not going to work.
16156      if test ! -d "$WIN_SDK_BASE/../lib"; then
16157        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16158$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16159        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16160$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16161      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16162        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16163$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16164        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16165        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16166          VS_ENV_ARGS="/x86"
16167        else
16168          VS_ENV_ARGS="/x64"
16169        fi
16170      else
16171        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16172$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16173        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16174$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16175      fi
16176    fi
16177  fi
16178
16179  fi
16180  if test "x$PROGRAMFILES" != x; then
16181
16182  if test "x$VS_ENV_CMD" = x; then
16183    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16184    METHOD="well-known name"
16185
16186  windows_path="$WIN_SDK_BASE"
16187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16188    unix_path=`$CYGPATH -u "$windows_path"`
16189    WIN_SDK_BASE="$unix_path"
16190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16192    WIN_SDK_BASE="$unix_path"
16193  fi
16194
16195    if test -d "$WIN_SDK_BASE"; then
16196      # There have been cases of partial or broken SDK installations. A missing
16197      # lib dir is not going to work.
16198      if test ! -d "$WIN_SDK_BASE/../lib"; then
16199        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16200$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16201        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16202$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16203      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16204        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16205$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16206        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16207        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16208          VS_ENV_ARGS="/x86"
16209        else
16210          VS_ENV_ARGS="/x64"
16211        fi
16212      else
16213        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16214$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16215        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16216$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16217      fi
16218    fi
16219  fi
16220
16221  fi
16222
16223  if test "x$VS_ENV_CMD" = x; then
16224    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16225    METHOD="well-known name"
16226
16227  windows_path="$WIN_SDK_BASE"
16228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16229    unix_path=`$CYGPATH -u "$windows_path"`
16230    WIN_SDK_BASE="$unix_path"
16231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16233    WIN_SDK_BASE="$unix_path"
16234  fi
16235
16236    if test -d "$WIN_SDK_BASE"; then
16237      # There have been cases of partial or broken SDK installations. A missing
16238      # lib dir is not going to work.
16239      if test ! -d "$WIN_SDK_BASE/../lib"; then
16240        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16241$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16242        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16243$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16244      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16245        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16246$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16247        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16248        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16249          VS_ENV_ARGS="/x86"
16250        else
16251          VS_ENV_ARGS="/x64"
16252        fi
16253      else
16254        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16255$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16256        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16257$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16258      fi
16259    fi
16260  fi
16261
16262
16263  if test "x$VS_ENV_CMD" = x; then
16264    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16265    METHOD="well-known name"
16266
16267  windows_path="$WIN_SDK_BASE"
16268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16269    unix_path=`$CYGPATH -u "$windows_path"`
16270    WIN_SDK_BASE="$unix_path"
16271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16273    WIN_SDK_BASE="$unix_path"
16274  fi
16275
16276    if test -d "$WIN_SDK_BASE"; then
16277      # There have been cases of partial or broken SDK installations. A missing
16278      # lib dir is not going to work.
16279      if test ! -d "$WIN_SDK_BASE/../lib"; then
16280        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16281$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16282        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16283$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16284      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16285        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16286$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16287        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16288        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16289          VS_ENV_ARGS="/x86"
16290        else
16291          VS_ENV_ARGS="/x64"
16292        fi
16293      else
16294        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16295$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16296        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16297$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16298      fi
16299    fi
16300  fi
16301
16302
16303  if test "x$VS100COMNTOOLS" != x; then
16304
16305  if test "x$VS_ENV_CMD" = x; then
16306    VS100BASE="$VS100COMNTOOLS/../.."
16307    METHOD="VS100COMNTOOLS variable"
16308
16309  windows_path="$VS100BASE"
16310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16311    unix_path=`$CYGPATH -u "$windows_path"`
16312    VS100BASE="$unix_path"
16313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16315    VS100BASE="$unix_path"
16316  fi
16317
16318    if test -d "$VS100BASE"; then
16319      if test -f "$VS100BASE/$VCVARSFILE"; then
16320        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16321$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16322        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16323      else
16324        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16325$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16326        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16327$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16328      fi
16329    fi
16330  fi
16331
16332  fi
16333  if test "x$PROGRAMFILES" != x; then
16334
16335  if test "x$VS_ENV_CMD" = x; then
16336    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16337    METHOD="well-known name"
16338
16339  windows_path="$VS100BASE"
16340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16341    unix_path=`$CYGPATH -u "$windows_path"`
16342    VS100BASE="$unix_path"
16343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16345    VS100BASE="$unix_path"
16346  fi
16347
16348    if test -d "$VS100BASE"; then
16349      if test -f "$VS100BASE/$VCVARSFILE"; then
16350        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16351$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16352        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16353      else
16354        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16355$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16356        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16357$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16358      fi
16359    fi
16360  fi
16361
16362  fi
16363
16364  if test "x$VS_ENV_CMD" = x; then
16365    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16366    METHOD="well-known name"
16367
16368  windows_path="$VS100BASE"
16369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16370    unix_path=`$CYGPATH -u "$windows_path"`
16371    VS100BASE="$unix_path"
16372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16374    VS100BASE="$unix_path"
16375  fi
16376
16377    if test -d "$VS100BASE"; then
16378      if test -f "$VS100BASE/$VCVARSFILE"; then
16379        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16380$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16381        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16382      else
16383        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16384$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16385        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16386$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16387      fi
16388    fi
16389  fi
16390
16391
16392  if test "x$VS_ENV_CMD" = x; then
16393    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16394    METHOD="well-known name"
16395
16396  windows_path="$VS100BASE"
16397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16398    unix_path=`$CYGPATH -u "$windows_path"`
16399    VS100BASE="$unix_path"
16400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16402    VS100BASE="$unix_path"
16403  fi
16404
16405    if test -d "$VS100BASE"; then
16406      if test -f "$VS100BASE/$VCVARSFILE"; then
16407        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16408$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16409        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16410      else
16411        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16412$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16413        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16414$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16415      fi
16416    fi
16417  fi
16418
16419
16420  if test "x$VS_ENV_CMD" != x; then
16421    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16422
16423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16424
16425  # First separate the path from the arguments. This will split at the first
16426  # space.
16427  complete="$VS_ENV_CMD"
16428  path="${complete%% *}"
16429  tmp="$complete EOL"
16430  arguments="${tmp#* }"
16431
16432  # Input might be given as Windows format, start by converting to
16433  # unix format.
16434  new_path=`$CYGPATH -u "$path"`
16435
16436  # Now try to locate executable using which
16437  new_path=`$WHICH "$new_path" 2> /dev/null`
16438  # bat and cmd files are not always considered executable in cygwin causing which
16439  # to not find them
16440  if test "x$new_path" = x \
16441           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16442           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16443    new_path=`$CYGPATH -u "$path"`
16444  fi
16445  if test "x$new_path" = x; then
16446    # Oops. Which didn't find the executable.
16447    # The splitting of arguments from the executable at a space might have been incorrect,
16448    # since paths with space are more likely in Windows. Give it another try with the whole
16449    # argument.
16450    path="$complete"
16451    arguments="EOL"
16452    new_path=`$CYGPATH -u "$path"`
16453    new_path=`$WHICH "$new_path" 2> /dev/null`
16454    # bat and cmd files are not always considered executable in cygwin causing which
16455    # to not find them
16456    if test "x$new_path" = x \
16457             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16458             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16459      new_path=`$CYGPATH -u "$path"`
16460    fi
16461    if test "x$new_path" = x; then
16462      # It's still not found. Now this is an unrecoverable error.
16463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16464$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16465      has_space=`$ECHO "$complete" | $GREP " "`
16466      if test "x$has_space" != x; then
16467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16469      fi
16470      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16471    fi
16472  fi
16473
16474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16477  # "foo.exe" is OK but "foo" is an error.
16478  #
16479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16480  # It is also a way to make sure we got the proper file name for the real test later on.
16481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16482  if test "x$test_shortpath" = x; then
16483    # Short path failed, file does not exist as specified.
16484    # Try adding .exe or .cmd
16485    if test -f "${new_path}.exe"; then
16486       input_to_shortpath="${new_path}.exe"
16487    elif test -f "${new_path}.cmd"; then
16488       input_to_shortpath="${new_path}.cmd"
16489    else
16490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16491$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16492      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16493$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16494      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16495    fi
16496  else
16497    input_to_shortpath="$new_path"
16498  fi
16499
16500  # Call helper function which possibly converts this using DOS-style short mode.
16501  # If so, the updated path is stored in $new_path.
16502  new_path="$input_to_shortpath"
16503
16504  input_path="$input_to_shortpath"
16505  # Check if we need to convert this using DOS-style short mode. If the path
16506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16507  # take no chances and rewrite it.
16508  # Note: m4 eats our [], so we need to use [ and ] instead.
16509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16510  if test "x$has_forbidden_chars" != x; then
16511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16515      # Going to short mode and back again did indeed matter. Since short mode is
16516      # case insensitive, let's make it lowercase to improve readability.
16517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16518      # Now convert it back to Unix-stile (cygpath)
16519      input_path=`$CYGPATH -u "$shortmode_path"`
16520      new_path="$input_path"
16521    fi
16522  fi
16523
16524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16525  if test "x$test_cygdrive_prefix" = x; then
16526    # As a simple fix, exclude /usr/bin since it's not a real path.
16527    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16529      # a path prefixed by /cygdrive for fixpath to work.
16530      new_path="$CYGWIN_ROOT_PATH$input_path"
16531    fi
16532  fi
16533
16534  # remove trailing .exe if any
16535  new_path="${new_path/%.exe/}"
16536
16537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16538
16539  # First separate the path from the arguments. This will split at the first
16540  # space.
16541  complete="$VS_ENV_CMD"
16542  path="${complete%% *}"
16543  tmp="$complete EOL"
16544  arguments="${tmp#* }"
16545
16546  # Input might be given as Windows format, start by converting to
16547  # unix format.
16548  new_path="$path"
16549
16550  windows_path="$new_path"
16551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16552    unix_path=`$CYGPATH -u "$windows_path"`
16553    new_path="$unix_path"
16554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16556    new_path="$unix_path"
16557  fi
16558
16559
16560  # Now try to locate executable using which
16561  new_path=`$WHICH "$new_path" 2> /dev/null`
16562
16563  if test "x$new_path" = x; then
16564    # Oops. Which didn't find the executable.
16565    # The splitting of arguments from the executable at a space might have been incorrect,
16566    # since paths with space are more likely in Windows. Give it another try with the whole
16567    # argument.
16568    path="$complete"
16569    arguments="EOL"
16570    new_path="$path"
16571
16572  windows_path="$new_path"
16573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16574    unix_path=`$CYGPATH -u "$windows_path"`
16575    new_path="$unix_path"
16576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16578    new_path="$unix_path"
16579  fi
16580
16581
16582    new_path=`$WHICH "$new_path" 2> /dev/null`
16583
16584    if test "x$new_path" = x; then
16585      # It's still not found. Now this is an unrecoverable error.
16586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16587$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16588      has_space=`$ECHO "$complete" | $GREP " "`
16589      if test "x$has_space" != x; then
16590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16592      fi
16593      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16594    fi
16595  fi
16596
16597  # Now new_path has a complete unix path to the binary
16598  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16599    # Keep paths in /bin as-is, but remove trailing .exe if any
16600    new_path="${new_path/%.exe/}"
16601    # Do not save /bin paths to all_fixpath_prefixes!
16602  else
16603    # Not in mixed or Windows style, start by that.
16604    new_path=`cmd //c echo $new_path`
16605
16606  input_path="$new_path"
16607  # Check if we need to convert this using DOS-style short mode. If the path
16608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16609  # take no chances and rewrite it.
16610  # Note: m4 eats our [], so we need to use [ and ] instead.
16611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16612  if test "x$has_forbidden_chars" != x; then
16613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16615  fi
16616
16617    # Output is in $new_path
16618
16619  windows_path="$new_path"
16620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16621    unix_path=`$CYGPATH -u "$windows_path"`
16622    new_path="$unix_path"
16623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16625    new_path="$unix_path"
16626  fi
16627
16628    # remove trailing .exe if any
16629    new_path="${new_path/%.exe/}"
16630
16631    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16632    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16633  fi
16634
16635  else
16636    # We're on a posix platform. Hooray! :)
16637    # First separate the path from the arguments. This will split at the first
16638    # space.
16639    complete="$VS_ENV_CMD"
16640    path="${complete%% *}"
16641    tmp="$complete EOL"
16642    arguments="${tmp#* }"
16643
16644    # Cannot rely on the command "which" here since it doesn't always work.
16645    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16646    if test -z "$is_absolute_path"; then
16647      # Path to executable is not absolute. Find it.
16648      IFS_save="$IFS"
16649      IFS=:
16650      for p in $PATH; do
16651        if test -f "$p/$path" && test -x "$p/$path"; then
16652          new_path="$p/$path"
16653          break
16654        fi
16655      done
16656      IFS="$IFS_save"
16657    else
16658      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16659$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16660      new_path="$path"
16661    fi
16662
16663    if test "x$new_path" = x; then
16664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16665$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16666        has_space=`$ECHO "$complete" | $GREP " "`
16667        if test "x$has_space" != x; then
16668          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16669$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16670        fi
16671        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16672      fi
16673  fi
16674
16675      # Now join together the path and the arguments once again
16676      if test "x$arguments" != xEOL; then
16677        new_complete="$new_path ${arguments% *}"
16678      else
16679        new_complete="$new_path"
16680      fi
16681
16682  if test "x$complete" != "x$new_complete"; then
16683      VS_ENV_CMD="$new_complete"
16684      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16685$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16686    fi
16687
16688
16689    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16690    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16691$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16692    cd $OUTPUT_ROOT
16693    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16694    # to autoconf standards.
16695
16696    #----
16697
16698    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16699    # but calculate the difference in Cygwin environment before/after running it and then
16700    # apply the diff.
16701
16702    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16703      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16704      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16705      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16706    else
16707      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16708      _dosbash=`cmd //c echo \`which bash\``
16709    fi
16710
16711    # generate the set of exported vars before/after the vs10 setup
16712    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16713    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16714    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16715    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16716
16717    # Now execute the newly created bat file.
16718    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16719    cmd /c localdevenvtmp.bat | cat
16720
16721    # apply the diff (less some non-vs10 vars named by "!")
16722    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16723    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16724    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16725
16726    # cleanup
16727    $RM localdevenvtmp*
16728    #----
16729    cd $CURDIR
16730    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16732$as_echo "no" >&6; }
16733      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16734$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16735      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16736$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16737      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16738$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16739      as_fn_error $? "Cannot continue" "$LINENO" 5
16740    fi
16741
16742    # Now set all paths and other env variables. This will allow the rest of
16743    # the configure script to find and run the compiler in the proper way.
16744    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16745$as_echo "$as_me: Setting extracted environment variables" >&6;}
16746    . $OUTPUT_ROOT/localdevenv.sh
16747  else
16748    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16749    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16750$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16751  fi
16752
16753  # At this point, we should have corrent variables in the environment, or we can't continue.
16754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16755$as_echo_n "checking for Visual Studio variables... " >&6; }
16756
16757  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16758    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16760$as_echo "present but broken" >&6; }
16761      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16762    else
16763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16764$as_echo "ok" >&6; }
16765      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16766      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16767      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16768      VS_PATH="$PATH"
16769
16770
16771
16772    fi
16773  else
16774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16775$as_echo "not found" >&6; }
16776
16777    if test "x$VS_ENV_CMD" = x; then
16778      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16779$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16780      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16781$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16782    else
16783      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16784$as_echo "$as_me: Running the extraction script failed." >&6;}
16785    fi
16786    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16787$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16788    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16789$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16790    as_fn_error $? "Cannot continue" "$LINENO" 5
16791  fi
16792
16793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16794$as_echo_n "checking for msvcr100.dll... " >&6; }
16795
16796# Check whether --with-msvcr-dll was given.
16797if test "${with_msvcr_dll+set}" = set; then :
16798  withval=$with_msvcr_dll;
16799fi
16800
16801  if test "x$with_msvcr_dll" != x; then
16802    MSVCR_DLL="$with_msvcr_dll"
16803  else
16804    if test "x$VCINSTALLDIR" != x; then
16805      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16806        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16807      else
16808        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16809        if test "x$MSVCR_DLL" = x; then
16810          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16811        fi
16812      fi
16813      if test "x$MSVCR_DLL" != x; then
16814        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16815$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16816      else
16817        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16818$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16819      fi
16820    fi
16821    if test "x$MSVCR_DLL" = x; then
16822      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16823        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16824$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16825        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16826      fi
16827    fi
16828  fi
16829  if test "x$MSVCR_DLL" = x; then
16830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16831$as_echo "no" >&6; }
16832    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16833  fi
16834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16835$as_echo "$MSVCR_DLL" >&6; }
16836
16837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16838
16839  # Input might be given as Windows format, start by converting to
16840  # unix format.
16841  path="$MSVCR_DLL"
16842  new_path=`$CYGPATH -u "$path"`
16843
16844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16847  # "foo.exe" is OK but "foo" is an error.
16848  #
16849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16850  # It is also a way to make sure we got the proper file name for the real test later on.
16851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16852  if test "x$test_shortpath" = x; then
16853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16854$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16855    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16856  fi
16857
16858  # Call helper function which possibly converts this using DOS-style short mode.
16859  # If so, the updated path is stored in $new_path.
16860
16861  input_path="$new_path"
16862  # Check if we need to convert this using DOS-style short mode. If the path
16863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16864  # take no chances and rewrite it.
16865  # Note: m4 eats our [], so we need to use [ and ] instead.
16866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16867  if test "x$has_forbidden_chars" != x; then
16868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16872      # Going to short mode and back again did indeed matter. Since short mode is
16873      # case insensitive, let's make it lowercase to improve readability.
16874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16875      # Now convert it back to Unix-stile (cygpath)
16876      input_path=`$CYGPATH -u "$shortmode_path"`
16877      new_path="$input_path"
16878    fi
16879  fi
16880
16881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16882  if test "x$test_cygdrive_prefix" = x; then
16883    # As a simple fix, exclude /usr/bin since it's not a real path.
16884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16886      # a path prefixed by /cygdrive for fixpath to work.
16887      new_path="$CYGWIN_ROOT_PATH$input_path"
16888    fi
16889  fi
16890
16891
16892  if test "x$path" != "x$new_path"; then
16893    MSVCR_DLL="$new_path"
16894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16895$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16896  fi
16897
16898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16899
16900  path="$MSVCR_DLL"
16901  has_colon=`$ECHO $path | $GREP ^.:`
16902  new_path="$path"
16903  if test "x$has_colon" = x; then
16904    # Not in mixed or Windows style, start by that.
16905    new_path=`cmd //c echo $path`
16906  fi
16907
16908
16909  input_path="$new_path"
16910  # Check if we need to convert this using DOS-style short mode. If the path
16911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16912  # take no chances and rewrite it.
16913  # Note: m4 eats our [], so we need to use [ and ] instead.
16914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16915  if test "x$has_forbidden_chars" != x; then
16916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16918  fi
16919
16920
16921  windows_path="$new_path"
16922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16923    unix_path=`$CYGPATH -u "$windows_path"`
16924    new_path="$unix_path"
16925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16927    new_path="$unix_path"
16928  fi
16929
16930  if test "x$path" != "x$new_path"; then
16931    MSVCR_DLL="$new_path"
16932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16933$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16934  fi
16935
16936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16938
16939  else
16940    # We're on a posix platform. Hooray! :)
16941    path="$MSVCR_DLL"
16942
16943    if test ! -f "$path" && test ! -d "$path"; then
16944      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16945    fi
16946
16947    has_space=`$ECHO "$path" | $GREP " "`
16948    if test "x$has_space" != x; then
16949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16950$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16951      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16952    fi
16953  fi
16954
16955
16956fi
16957
16958
16959
16960# If --build AND --host is set, then the configure script will find any
16961# cross compilation tools in the PATH. Cross compilation tools
16962# follows the cross compilation standard where they are prefixed with ${host}.
16963# For example the binary i686-sun-solaris2.10-gcc
16964# will cross compile for i686-sun-solaris2.10
16965# If neither of build and host is not set, then build=host and the
16966# default compiler found in the path will be used.
16967# Setting only --host, does not seem to be really supported.
16968# Please set both --build and --host if you want to cross compile.
16969
16970if test "x$COMPILE_TYPE" = "xcross"; then
16971    # Now we to find a C/C++ compiler that can build executables for the build
16972    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16973    # once. Also, we need to do this before adding a tools dir to the path,
16974    # otherwise we might pick up cross-compilers which don't use standard naming.
16975    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16976    # to wait until they are properly discovered.
16977    for ac_prog in cl cc gcc
16978do
16979  # Extract the first word of "$ac_prog", so it can be a program name with args.
16980set dummy $ac_prog; ac_word=$2
16981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16982$as_echo_n "checking for $ac_word... " >&6; }
16983if ${ac_cv_path_BUILD_CC+:} false; then :
16984  $as_echo_n "(cached) " >&6
16985else
16986  case $BUILD_CC in
16987  [\\/]* | ?:[\\/]*)
16988  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16989  ;;
16990  *)
16991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16992for as_dir in $PATH
16993do
16994  IFS=$as_save_IFS
16995  test -z "$as_dir" && as_dir=.
16996    for ac_exec_ext in '' $ac_executable_extensions; do
16997  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16998    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17000    break 2
17001  fi
17002done
17003  done
17004IFS=$as_save_IFS
17005
17006  ;;
17007esac
17008fi
17009BUILD_CC=$ac_cv_path_BUILD_CC
17010if test -n "$BUILD_CC"; then
17011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17012$as_echo "$BUILD_CC" >&6; }
17013else
17014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17015$as_echo "no" >&6; }
17016fi
17017
17018
17019  test -n "$BUILD_CC" && break
17020done
17021
17022
17023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17024
17025  # First separate the path from the arguments. This will split at the first
17026  # space.
17027  complete="$BUILD_CC"
17028  path="${complete%% *}"
17029  tmp="$complete EOL"
17030  arguments="${tmp#* }"
17031
17032  # Input might be given as Windows format, start by converting to
17033  # unix format.
17034  new_path=`$CYGPATH -u "$path"`
17035
17036  # Now try to locate executable using which
17037  new_path=`$WHICH "$new_path" 2> /dev/null`
17038  # bat and cmd files are not always considered executable in cygwin causing which
17039  # to not find them
17040  if test "x$new_path" = x \
17041           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17042           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17043    new_path=`$CYGPATH -u "$path"`
17044  fi
17045  if test "x$new_path" = x; then
17046    # Oops. Which didn't find the executable.
17047    # The splitting of arguments from the executable at a space might have been incorrect,
17048    # since paths with space are more likely in Windows. Give it another try with the whole
17049    # argument.
17050    path="$complete"
17051    arguments="EOL"
17052    new_path=`$CYGPATH -u "$path"`
17053    new_path=`$WHICH "$new_path" 2> /dev/null`
17054    # bat and cmd files are not always considered executable in cygwin causing which
17055    # to not find them
17056    if test "x$new_path" = x \
17057             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17058             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17059      new_path=`$CYGPATH -u "$path"`
17060    fi
17061    if test "x$new_path" = x; then
17062      # It's still not found. Now this is an unrecoverable error.
17063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17064$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17065      has_space=`$ECHO "$complete" | $GREP " "`
17066      if test "x$has_space" != x; then
17067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17069      fi
17070      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17071    fi
17072  fi
17073
17074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17077  # "foo.exe" is OK but "foo" is an error.
17078  #
17079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17080  # It is also a way to make sure we got the proper file name for the real test later on.
17081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17082  if test "x$test_shortpath" = x; then
17083    # Short path failed, file does not exist as specified.
17084    # Try adding .exe or .cmd
17085    if test -f "${new_path}.exe"; then
17086       input_to_shortpath="${new_path}.exe"
17087    elif test -f "${new_path}.cmd"; then
17088       input_to_shortpath="${new_path}.cmd"
17089    else
17090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17091$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17094      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17095    fi
17096  else
17097    input_to_shortpath="$new_path"
17098  fi
17099
17100  # Call helper function which possibly converts this using DOS-style short mode.
17101  # If so, the updated path is stored in $new_path.
17102  new_path="$input_to_shortpath"
17103
17104  input_path="$input_to_shortpath"
17105  # Check if we need to convert this using DOS-style short mode. If the path
17106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17107  # take no chances and rewrite it.
17108  # Note: m4 eats our [], so we need to use [ and ] instead.
17109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17110  if test "x$has_forbidden_chars" != x; then
17111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17115      # Going to short mode and back again did indeed matter. Since short mode is
17116      # case insensitive, let's make it lowercase to improve readability.
17117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17118      # Now convert it back to Unix-stile (cygpath)
17119      input_path=`$CYGPATH -u "$shortmode_path"`
17120      new_path="$input_path"
17121    fi
17122  fi
17123
17124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17125  if test "x$test_cygdrive_prefix" = x; then
17126    # As a simple fix, exclude /usr/bin since it's not a real path.
17127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17129      # a path prefixed by /cygdrive for fixpath to work.
17130      new_path="$CYGWIN_ROOT_PATH$input_path"
17131    fi
17132  fi
17133
17134  # remove trailing .exe if any
17135  new_path="${new_path/%.exe/}"
17136
17137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17138
17139  # First separate the path from the arguments. This will split at the first
17140  # space.
17141  complete="$BUILD_CC"
17142  path="${complete%% *}"
17143  tmp="$complete EOL"
17144  arguments="${tmp#* }"
17145
17146  # Input might be given as Windows format, start by converting to
17147  # unix format.
17148  new_path="$path"
17149
17150  windows_path="$new_path"
17151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17152    unix_path=`$CYGPATH -u "$windows_path"`
17153    new_path="$unix_path"
17154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17156    new_path="$unix_path"
17157  fi
17158
17159
17160  # Now try to locate executable using which
17161  new_path=`$WHICH "$new_path" 2> /dev/null`
17162
17163  if test "x$new_path" = x; then
17164    # Oops. Which didn't find the executable.
17165    # The splitting of arguments from the executable at a space might have been incorrect,
17166    # since paths with space are more likely in Windows. Give it another try with the whole
17167    # argument.
17168    path="$complete"
17169    arguments="EOL"
17170    new_path="$path"
17171
17172  windows_path="$new_path"
17173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17174    unix_path=`$CYGPATH -u "$windows_path"`
17175    new_path="$unix_path"
17176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17178    new_path="$unix_path"
17179  fi
17180
17181
17182    new_path=`$WHICH "$new_path" 2> /dev/null`
17183
17184    if test "x$new_path" = x; then
17185      # It's still not found. Now this is an unrecoverable error.
17186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17187$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17188      has_space=`$ECHO "$complete" | $GREP " "`
17189      if test "x$has_space" != x; then
17190        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17191$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17192      fi
17193      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17194    fi
17195  fi
17196
17197  # Now new_path has a complete unix path to the binary
17198  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17199    # Keep paths in /bin as-is, but remove trailing .exe if any
17200    new_path="${new_path/%.exe/}"
17201    # Do not save /bin paths to all_fixpath_prefixes!
17202  else
17203    # Not in mixed or Windows style, start by that.
17204    new_path=`cmd //c echo $new_path`
17205
17206  input_path="$new_path"
17207  # Check if we need to convert this using DOS-style short mode. If the path
17208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17209  # take no chances and rewrite it.
17210  # Note: m4 eats our [], so we need to use [ and ] instead.
17211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17212  if test "x$has_forbidden_chars" != x; then
17213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17215  fi
17216
17217    # Output is in $new_path
17218
17219  windows_path="$new_path"
17220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17221    unix_path=`$CYGPATH -u "$windows_path"`
17222    new_path="$unix_path"
17223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17225    new_path="$unix_path"
17226  fi
17227
17228    # remove trailing .exe if any
17229    new_path="${new_path/%.exe/}"
17230
17231    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17232    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17233  fi
17234
17235  else
17236    # We're on a posix platform. Hooray! :)
17237    # First separate the path from the arguments. This will split at the first
17238    # space.
17239    complete="$BUILD_CC"
17240    path="${complete%% *}"
17241    tmp="$complete EOL"
17242    arguments="${tmp#* }"
17243
17244    # Cannot rely on the command "which" here since it doesn't always work.
17245    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17246    if test -z "$is_absolute_path"; then
17247      # Path to executable is not absolute. Find it.
17248      IFS_save="$IFS"
17249      IFS=:
17250      for p in $PATH; do
17251        if test -f "$p/$path" && test -x "$p/$path"; then
17252          new_path="$p/$path"
17253          break
17254        fi
17255      done
17256      IFS="$IFS_save"
17257    else
17258      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17259$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17260      new_path="$path"
17261    fi
17262
17263    if test "x$new_path" = x; then
17264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17265$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17266        has_space=`$ECHO "$complete" | $GREP " "`
17267        if test "x$has_space" != x; then
17268          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17269$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17270        fi
17271        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17272      fi
17273  fi
17274
17275      # Now join together the path and the arguments once again
17276      if test "x$arguments" != xEOL; then
17277        new_complete="$new_path ${arguments% *}"
17278      else
17279        new_complete="$new_path"
17280      fi
17281
17282  if test "x$complete" != "x$new_complete"; then
17283      BUILD_CC="$new_complete"
17284      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17285$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17286    fi
17287
17288    for ac_prog in cl CC g++
17289do
17290  # Extract the first word of "$ac_prog", so it can be a program name with args.
17291set dummy $ac_prog; ac_word=$2
17292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17293$as_echo_n "checking for $ac_word... " >&6; }
17294if ${ac_cv_path_BUILD_CXX+:} false; then :
17295  $as_echo_n "(cached) " >&6
17296else
17297  case $BUILD_CXX in
17298  [\\/]* | ?:[\\/]*)
17299  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17300  ;;
17301  *)
17302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17303for as_dir in $PATH
17304do
17305  IFS=$as_save_IFS
17306  test -z "$as_dir" && as_dir=.
17307    for ac_exec_ext in '' $ac_executable_extensions; do
17308  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17309    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17311    break 2
17312  fi
17313done
17314  done
17315IFS=$as_save_IFS
17316
17317  ;;
17318esac
17319fi
17320BUILD_CXX=$ac_cv_path_BUILD_CXX
17321if test -n "$BUILD_CXX"; then
17322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17323$as_echo "$BUILD_CXX" >&6; }
17324else
17325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17326$as_echo "no" >&6; }
17327fi
17328
17329
17330  test -n "$BUILD_CXX" && break
17331done
17332
17333
17334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17335
17336  # First separate the path from the arguments. This will split at the first
17337  # space.
17338  complete="$BUILD_CXX"
17339  path="${complete%% *}"
17340  tmp="$complete EOL"
17341  arguments="${tmp#* }"
17342
17343  # Input might be given as Windows format, start by converting to
17344  # unix format.
17345  new_path=`$CYGPATH -u "$path"`
17346
17347  # Now try to locate executable using which
17348  new_path=`$WHICH "$new_path" 2> /dev/null`
17349  # bat and cmd files are not always considered executable in cygwin causing which
17350  # to not find them
17351  if test "x$new_path" = x \
17352           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17353           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17354    new_path=`$CYGPATH -u "$path"`
17355  fi
17356  if test "x$new_path" = x; then
17357    # Oops. Which didn't find the executable.
17358    # The splitting of arguments from the executable at a space might have been incorrect,
17359    # since paths with space are more likely in Windows. Give it another try with the whole
17360    # argument.
17361    path="$complete"
17362    arguments="EOL"
17363    new_path=`$CYGPATH -u "$path"`
17364    new_path=`$WHICH "$new_path" 2> /dev/null`
17365    # bat and cmd files are not always considered executable in cygwin causing which
17366    # to not find them
17367    if test "x$new_path" = x \
17368             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17369             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17370      new_path=`$CYGPATH -u "$path"`
17371    fi
17372    if test "x$new_path" = x; then
17373      # It's still not found. Now this is an unrecoverable error.
17374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17375$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17376      has_space=`$ECHO "$complete" | $GREP " "`
17377      if test "x$has_space" != x; then
17378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17380      fi
17381      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17382    fi
17383  fi
17384
17385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17388  # "foo.exe" is OK but "foo" is an error.
17389  #
17390  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17391  # It is also a way to make sure we got the proper file name for the real test later on.
17392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17393  if test "x$test_shortpath" = x; then
17394    # Short path failed, file does not exist as specified.
17395    # Try adding .exe or .cmd
17396    if test -f "${new_path}.exe"; then
17397       input_to_shortpath="${new_path}.exe"
17398    elif test -f "${new_path}.cmd"; then
17399       input_to_shortpath="${new_path}.cmd"
17400    else
17401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17402$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17403      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17404$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17405      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17406    fi
17407  else
17408    input_to_shortpath="$new_path"
17409  fi
17410
17411  # Call helper function which possibly converts this using DOS-style short mode.
17412  # If so, the updated path is stored in $new_path.
17413  new_path="$input_to_shortpath"
17414
17415  input_path="$input_to_shortpath"
17416  # Check if we need to convert this using DOS-style short mode. If the path
17417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17418  # take no chances and rewrite it.
17419  # Note: m4 eats our [], so we need to use [ and ] instead.
17420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17421  if test "x$has_forbidden_chars" != x; then
17422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17426      # Going to short mode and back again did indeed matter. Since short mode is
17427      # case insensitive, let's make it lowercase to improve readability.
17428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17429      # Now convert it back to Unix-stile (cygpath)
17430      input_path=`$CYGPATH -u "$shortmode_path"`
17431      new_path="$input_path"
17432    fi
17433  fi
17434
17435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17436  if test "x$test_cygdrive_prefix" = x; then
17437    # As a simple fix, exclude /usr/bin since it's not a real path.
17438    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17440      # a path prefixed by /cygdrive for fixpath to work.
17441      new_path="$CYGWIN_ROOT_PATH$input_path"
17442    fi
17443  fi
17444
17445  # remove trailing .exe if any
17446  new_path="${new_path/%.exe/}"
17447
17448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17449
17450  # First separate the path from the arguments. This will split at the first
17451  # space.
17452  complete="$BUILD_CXX"
17453  path="${complete%% *}"
17454  tmp="$complete EOL"
17455  arguments="${tmp#* }"
17456
17457  # Input might be given as Windows format, start by converting to
17458  # unix format.
17459  new_path="$path"
17460
17461  windows_path="$new_path"
17462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17463    unix_path=`$CYGPATH -u "$windows_path"`
17464    new_path="$unix_path"
17465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17467    new_path="$unix_path"
17468  fi
17469
17470
17471  # Now try to locate executable using which
17472  new_path=`$WHICH "$new_path" 2> /dev/null`
17473
17474  if test "x$new_path" = x; then
17475    # Oops. Which didn't find the executable.
17476    # The splitting of arguments from the executable at a space might have been incorrect,
17477    # since paths with space are more likely in Windows. Give it another try with the whole
17478    # argument.
17479    path="$complete"
17480    arguments="EOL"
17481    new_path="$path"
17482
17483  windows_path="$new_path"
17484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17485    unix_path=`$CYGPATH -u "$windows_path"`
17486    new_path="$unix_path"
17487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17489    new_path="$unix_path"
17490  fi
17491
17492
17493    new_path=`$WHICH "$new_path" 2> /dev/null`
17494
17495    if test "x$new_path" = x; then
17496      # It's still not found. Now this is an unrecoverable error.
17497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17498$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17499      has_space=`$ECHO "$complete" | $GREP " "`
17500      if test "x$has_space" != x; then
17501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17503      fi
17504      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17505    fi
17506  fi
17507
17508  # Now new_path has a complete unix path to the binary
17509  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17510    # Keep paths in /bin as-is, but remove trailing .exe if any
17511    new_path="${new_path/%.exe/}"
17512    # Do not save /bin paths to all_fixpath_prefixes!
17513  else
17514    # Not in mixed or Windows style, start by that.
17515    new_path=`cmd //c echo $new_path`
17516
17517  input_path="$new_path"
17518  # Check if we need to convert this using DOS-style short mode. If the path
17519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17520  # take no chances and rewrite it.
17521  # Note: m4 eats our [], so we need to use [ and ] instead.
17522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17523  if test "x$has_forbidden_chars" != x; then
17524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17526  fi
17527
17528    # Output is in $new_path
17529
17530  windows_path="$new_path"
17531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17532    unix_path=`$CYGPATH -u "$windows_path"`
17533    new_path="$unix_path"
17534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17536    new_path="$unix_path"
17537  fi
17538
17539    # remove trailing .exe if any
17540    new_path="${new_path/%.exe/}"
17541
17542    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17543    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17544  fi
17545
17546  else
17547    # We're on a posix platform. Hooray! :)
17548    # First separate the path from the arguments. This will split at the first
17549    # space.
17550    complete="$BUILD_CXX"
17551    path="${complete%% *}"
17552    tmp="$complete EOL"
17553    arguments="${tmp#* }"
17554
17555    # Cannot rely on the command "which" here since it doesn't always work.
17556    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17557    if test -z "$is_absolute_path"; then
17558      # Path to executable is not absolute. Find it.
17559      IFS_save="$IFS"
17560      IFS=:
17561      for p in $PATH; do
17562        if test -f "$p/$path" && test -x "$p/$path"; then
17563          new_path="$p/$path"
17564          break
17565        fi
17566      done
17567      IFS="$IFS_save"
17568    else
17569      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17570$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17571      new_path="$path"
17572    fi
17573
17574    if test "x$new_path" = x; then
17575        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17576$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17577        has_space=`$ECHO "$complete" | $GREP " "`
17578        if test "x$has_space" != x; then
17579          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17580$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17581        fi
17582        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17583      fi
17584  fi
17585
17586      # Now join together the path and the arguments once again
17587      if test "x$arguments" != xEOL; then
17588        new_complete="$new_path ${arguments% *}"
17589      else
17590        new_complete="$new_path"
17591      fi
17592
17593  if test "x$complete" != "x$new_complete"; then
17594      BUILD_CXX="$new_complete"
17595      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17596$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17597    fi
17598
17599    # Extract the first word of "ld", so it can be a program name with args.
17600set dummy ld; ac_word=$2
17601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17602$as_echo_n "checking for $ac_word... " >&6; }
17603if ${ac_cv_path_BUILD_LD+:} false; then :
17604  $as_echo_n "(cached) " >&6
17605else
17606  case $BUILD_LD in
17607  [\\/]* | ?:[\\/]*)
17608  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17609  ;;
17610  *)
17611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17612for as_dir in $PATH
17613do
17614  IFS=$as_save_IFS
17615  test -z "$as_dir" && as_dir=.
17616    for ac_exec_ext in '' $ac_executable_extensions; do
17617  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17618    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17620    break 2
17621  fi
17622done
17623  done
17624IFS=$as_save_IFS
17625
17626  ;;
17627esac
17628fi
17629BUILD_LD=$ac_cv_path_BUILD_LD
17630if test -n "$BUILD_LD"; then
17631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17632$as_echo "$BUILD_LD" >&6; }
17633else
17634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17635$as_echo "no" >&6; }
17636fi
17637
17638
17639
17640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17641
17642  # First separate the path from the arguments. This will split at the first
17643  # space.
17644  complete="$BUILD_LD"
17645  path="${complete%% *}"
17646  tmp="$complete EOL"
17647  arguments="${tmp#* }"
17648
17649  # Input might be given as Windows format, start by converting to
17650  # unix format.
17651  new_path=`$CYGPATH -u "$path"`
17652
17653  # Now try to locate executable using which
17654  new_path=`$WHICH "$new_path" 2> /dev/null`
17655  # bat and cmd files are not always considered executable in cygwin causing which
17656  # to not find them
17657  if test "x$new_path" = x \
17658           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17659           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17660    new_path=`$CYGPATH -u "$path"`
17661  fi
17662  if test "x$new_path" = x; then
17663    # Oops. Which didn't find the executable.
17664    # The splitting of arguments from the executable at a space might have been incorrect,
17665    # since paths with space are more likely in Windows. Give it another try with the whole
17666    # argument.
17667    path="$complete"
17668    arguments="EOL"
17669    new_path=`$CYGPATH -u "$path"`
17670    new_path=`$WHICH "$new_path" 2> /dev/null`
17671    # bat and cmd files are not always considered executable in cygwin causing which
17672    # to not find them
17673    if test "x$new_path" = x \
17674             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17675             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17676      new_path=`$CYGPATH -u "$path"`
17677    fi
17678    if test "x$new_path" = x; then
17679      # It's still not found. Now this is an unrecoverable error.
17680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17681$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17682      has_space=`$ECHO "$complete" | $GREP " "`
17683      if test "x$has_space" != x; then
17684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17686      fi
17687      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17688    fi
17689  fi
17690
17691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17694  # "foo.exe" is OK but "foo" is an error.
17695  #
17696  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17697  # It is also a way to make sure we got the proper file name for the real test later on.
17698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17699  if test "x$test_shortpath" = x; then
17700    # Short path failed, file does not exist as specified.
17701    # Try adding .exe or .cmd
17702    if test -f "${new_path}.exe"; then
17703       input_to_shortpath="${new_path}.exe"
17704    elif test -f "${new_path}.cmd"; then
17705       input_to_shortpath="${new_path}.cmd"
17706    else
17707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17708$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17711      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17712    fi
17713  else
17714    input_to_shortpath="$new_path"
17715  fi
17716
17717  # Call helper function which possibly converts this using DOS-style short mode.
17718  # If so, the updated path is stored in $new_path.
17719  new_path="$input_to_shortpath"
17720
17721  input_path="$input_to_shortpath"
17722  # Check if we need to convert this using DOS-style short mode. If the path
17723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17724  # take no chances and rewrite it.
17725  # Note: m4 eats our [], so we need to use [ and ] instead.
17726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17727  if test "x$has_forbidden_chars" != x; then
17728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17732      # Going to short mode and back again did indeed matter. Since short mode is
17733      # case insensitive, let's make it lowercase to improve readability.
17734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17735      # Now convert it back to Unix-stile (cygpath)
17736      input_path=`$CYGPATH -u "$shortmode_path"`
17737      new_path="$input_path"
17738    fi
17739  fi
17740
17741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17742  if test "x$test_cygdrive_prefix" = x; then
17743    # As a simple fix, exclude /usr/bin since it's not a real path.
17744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17746      # a path prefixed by /cygdrive for fixpath to work.
17747      new_path="$CYGWIN_ROOT_PATH$input_path"
17748    fi
17749  fi
17750
17751  # remove trailing .exe if any
17752  new_path="${new_path/%.exe/}"
17753
17754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17755
17756  # First separate the path from the arguments. This will split at the first
17757  # space.
17758  complete="$BUILD_LD"
17759  path="${complete%% *}"
17760  tmp="$complete EOL"
17761  arguments="${tmp#* }"
17762
17763  # Input might be given as Windows format, start by converting to
17764  # unix format.
17765  new_path="$path"
17766
17767  windows_path="$new_path"
17768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17769    unix_path=`$CYGPATH -u "$windows_path"`
17770    new_path="$unix_path"
17771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17773    new_path="$unix_path"
17774  fi
17775
17776
17777  # Now try to locate executable using which
17778  new_path=`$WHICH "$new_path" 2> /dev/null`
17779
17780  if test "x$new_path" = x; then
17781    # Oops. Which didn't find the executable.
17782    # The splitting of arguments from the executable at a space might have been incorrect,
17783    # since paths with space are more likely in Windows. Give it another try with the whole
17784    # argument.
17785    path="$complete"
17786    arguments="EOL"
17787    new_path="$path"
17788
17789  windows_path="$new_path"
17790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17791    unix_path=`$CYGPATH -u "$windows_path"`
17792    new_path="$unix_path"
17793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17795    new_path="$unix_path"
17796  fi
17797
17798
17799    new_path=`$WHICH "$new_path" 2> /dev/null`
17800
17801    if test "x$new_path" = x; then
17802      # It's still not found. Now this is an unrecoverable error.
17803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17804$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17805      has_space=`$ECHO "$complete" | $GREP " "`
17806      if test "x$has_space" != x; then
17807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17809      fi
17810      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17811    fi
17812  fi
17813
17814  # Now new_path has a complete unix path to the binary
17815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17816    # Keep paths in /bin as-is, but remove trailing .exe if any
17817    new_path="${new_path/%.exe/}"
17818    # Do not save /bin paths to all_fixpath_prefixes!
17819  else
17820    # Not in mixed or Windows style, start by that.
17821    new_path=`cmd //c echo $new_path`
17822
17823  input_path="$new_path"
17824  # Check if we need to convert this using DOS-style short mode. If the path
17825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17826  # take no chances and rewrite it.
17827  # Note: m4 eats our [], so we need to use [ and ] instead.
17828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17829  if test "x$has_forbidden_chars" != x; then
17830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17832  fi
17833
17834    # Output is in $new_path
17835
17836  windows_path="$new_path"
17837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17838    unix_path=`$CYGPATH -u "$windows_path"`
17839    new_path="$unix_path"
17840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17842    new_path="$unix_path"
17843  fi
17844
17845    # remove trailing .exe if any
17846    new_path="${new_path/%.exe/}"
17847
17848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17850  fi
17851
17852  else
17853    # We're on a posix platform. Hooray! :)
17854    # First separate the path from the arguments. This will split at the first
17855    # space.
17856    complete="$BUILD_LD"
17857    path="${complete%% *}"
17858    tmp="$complete EOL"
17859    arguments="${tmp#* }"
17860
17861    # Cannot rely on the command "which" here since it doesn't always work.
17862    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17863    if test -z "$is_absolute_path"; then
17864      # Path to executable is not absolute. Find it.
17865      IFS_save="$IFS"
17866      IFS=:
17867      for p in $PATH; do
17868        if test -f "$p/$path" && test -x "$p/$path"; then
17869          new_path="$p/$path"
17870          break
17871        fi
17872      done
17873      IFS="$IFS_save"
17874    else
17875      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17876$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17877      new_path="$path"
17878    fi
17879
17880    if test "x$new_path" = x; then
17881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17882$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17883        has_space=`$ECHO "$complete" | $GREP " "`
17884        if test "x$has_space" != x; then
17885          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17886$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17887        fi
17888        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17889      fi
17890  fi
17891
17892      # Now join together the path and the arguments once again
17893      if test "x$arguments" != xEOL; then
17894        new_complete="$new_path ${arguments% *}"
17895      else
17896        new_complete="$new_path"
17897      fi
17898
17899  if test "x$complete" != "x$new_complete"; then
17900      BUILD_LD="$new_complete"
17901      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17902$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17903    fi
17904
17905fi
17906
17907
17908
17909
17910# If a devkit is found on the builddeps server, then prepend its path to the
17911# PATH variable. If there are cross compilers available in the devkit, these
17912# will be found by AC_PROG_CC et al.
17913DEVKIT=
17914
17915
17916    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17917        # Source the builddeps file again, to make sure it uses the latest variables!
17918        . $builddepsfile
17919        # Look for a target and build machine specific resource!
17920        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17921        if test "x$resource" = x; then
17922            # Ok, lets instead look for a target specific resource
17923            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17924        fi
17925        if test "x$resource" = x; then
17926            # Ok, lets instead look for a build specific resource
17927            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17928        fi
17929        if test "x$resource" = x; then
17930            # Ok, lets instead look for a generic resource
17931            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17932            resource=${builddep_devkit}
17933        fi
17934        if test "x$resource" != x; then
17935            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17936$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17937	    # If the resource in the builddeps.conf file is an existing directory,
17938	    # for example /java/linux/cups
17939	    if test -d ${resource}; then
17940	       depdir=${resource}
17941	    else
17942
17943# devkit is for example mymodule
17944# $resource is for example libs/general/libmymod_1_2_3.zip
17945# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17946# $with_builddeps_dir is for example /localhome/builddeps
17947# depdir is the name of the variable into which we store the depdir, eg MYMOD
17948# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17949# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17950    filename=`basename $resource`
17951    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17952    filebase=${filename%%.*}
17953    extension=${filename#*.}
17954    installdir=$with_builddeps_dir/$filebase
17955    if test ! -f $installdir/$filename.unpacked; then
17956        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17957$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17958        if test ! -d $installdir; then
17959            mkdir -p $installdir
17960        fi
17961        if test ! -d $installdir; then
17962            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17963        fi
17964        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17965        touch $tmpfile
17966        if test ! -f $tmpfile; then
17967            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17968        fi
17969
17970    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17971    # $tmpfile is the local file name for the downloaded file.
17972    VALID_TOOL=no
17973    if test "x$BDEPS_FTP" = xwget; then
17974       VALID_TOOL=yes
17975       wget -O $tmpfile $with_builddeps_server/$resource
17976    fi
17977    if test "x$BDEPS_FTP" = xlftp; then
17978       VALID_TOOL=yes
17979       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17980    fi
17981    if test "x$BDEPS_FTP" = xftp; then
17982        VALID_TOOL=yes
17983        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17984        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17985        FTPUSERPWD=${FTPSERVER%%@*}
17986        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17987            FTPUSER=${userpwd%%:*}
17988            FTPPWD=${userpwd#*@}
17989            FTPSERVER=${FTPSERVER#*@}
17990        else
17991            FTPUSER=ftp
17992            FTPPWD=ftp
17993        fi
17994        # the "pass" command does not work on some
17995        # ftp clients (read ftp.exe) but if it works,
17996        # passive mode is better!
17997        (\
17998            echo "user $FTPUSER $FTPPWD"        ;\
17999            echo "pass"                         ;\
18000            echo "bin"                          ;\
18001            echo "get $FTPPATH $tmpfile"              ;\
18002        ) | ftp -in $FTPSERVER
18003    fi
18004    if test "x$VALID_TOOL" != xyes; then
18005       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18006    fi
18007
18008        mv $tmpfile $installdir/$filename
18009        if test ! -s $installdir/$filename; then
18010            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18011        fi
18012        case "$extension" in
18013            zip)  echo "Unzipping $installdir/$filename..."
18014               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18015            ;;
18016            tar.gz) echo "Untaring $installdir/$filename..."
18017               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18018            ;;
18019            tgz) echo "Untaring $installdir/$filename..."
18020               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18021            ;;
18022            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18023            ;;
18024        esac
18025    fi
18026    if test -f $installdir/$filename.unpacked; then
18027        depdir=$installdir
18028    fi
18029
18030	    fi
18031            # Source the builddeps file again, because in the previous command, the depdir
18032            # was updated to point at the current build dependency install directory.
18033            . $builddepsfile
18034            # Now extract variables from the builddeps.conf files.
18035            theroot=${builddep_devkit_ROOT}
18036            thecflags=${builddep_devkit_CFLAGS}
18037            thelibs=${builddep_devkit_LIBS}
18038            if test "x$depdir" = x; then
18039                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18040            fi
18041            DEVKIT=$depdir
18042            if test "x$theroot" != x; then
18043               DEVKIT="$theroot"
18044            fi
18045            if test "x$thecflags" != x; then
18046               DEVKIT_CFLAGS="$thecflags"
18047            fi
18048            if test "x$thelibs" != x; then
18049               DEVKIT_LIBS="$thelibs"
18050            fi
18051            # Found devkit
18052                     PATH="$DEVKIT/bin:$PATH"
18053                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18054                     if test "x$x_includes" = "xNONE"; then
18055                         x_includes="$SYS_ROOT/usr/include/X11"
18056                     fi
18057                     if test "x$x_libraries" = "xNONE"; then
18058                         x_libraries="$SYS_ROOT/usr/lib"
18059                     fi
18060
18061
18062        fi
18063
18064    fi
18065
18066
18067if test "x$SYS_ROOT" != "x/" ; then
18068    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18069    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18070    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18071    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18072    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18073    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18074fi
18075
18076# Store the CFLAGS etal passed to the configure script.
18077ORG_CFLAGS="$CFLAGS"
18078ORG_CXXFLAGS="$CXXFLAGS"
18079ORG_OBJCFLAGS="$OBJCFLAGS"
18080
18081# autoconf magic only relies on PATH, so update it if tools dir is specified
18082OLD_PATH="$PATH"
18083if test "x$TOOLS_DIR" != x; then
18084  PATH=$TOOLS_DIR:$PATH
18085fi
18086
18087
18088### Locate C compiler (CC)
18089
18090# gcc is almost always present, but on Windows we
18091# prefer cl.exe and on Solaris we prefer CC.
18092# Thus test for them in this order.
18093if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18094  # Do not probe for cc on MacOSX.
18095  COMPILER_CHECK_LIST="cl gcc"
18096else
18097  COMPILER_CHECK_LIST="cl cc gcc"
18098fi
18099
18100
18101  COMPILER_NAME=C
18102
18103  CC=
18104  # If TOOLS_DIR is set, check for all compiler names in there first
18105  # before checking the rest of the PATH.
18106  if test -n "$TOOLS_DIR"; then
18107    PATH_save="$PATH"
18108    PATH="$TOOLS_DIR"
18109    for ac_prog in $COMPILER_CHECK_LIST
18110do
18111  # Extract the first word of "$ac_prog", so it can be a program name with args.
18112set dummy $ac_prog; ac_word=$2
18113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18114$as_echo_n "checking for $ac_word... " >&6; }
18115if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18116  $as_echo_n "(cached) " >&6
18117else
18118  case $TOOLS_DIR_CC in
18119  [\\/]* | ?:[\\/]*)
18120  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18121  ;;
18122  *)
18123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18124for as_dir in $PATH
18125do
18126  IFS=$as_save_IFS
18127  test -z "$as_dir" && as_dir=.
18128    for ac_exec_ext in '' $ac_executable_extensions; do
18129  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18130    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18132    break 2
18133  fi
18134done
18135  done
18136IFS=$as_save_IFS
18137
18138  ;;
18139esac
18140fi
18141TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18142if test -n "$TOOLS_DIR_CC"; then
18143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18144$as_echo "$TOOLS_DIR_CC" >&6; }
18145else
18146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18147$as_echo "no" >&6; }
18148fi
18149
18150
18151  test -n "$TOOLS_DIR_CC" && break
18152done
18153
18154    CC=$TOOLS_DIR_CC
18155    PATH="$PATH_save"
18156  fi
18157
18158  # AC_PATH_PROGS can't be run multiple times with the same variable,
18159  # so create a new name for this run.
18160  if test "x$CC" = x; then
18161    for ac_prog in $COMPILER_CHECK_LIST
18162do
18163  # Extract the first word of "$ac_prog", so it can be a program name with args.
18164set dummy $ac_prog; ac_word=$2
18165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18166$as_echo_n "checking for $ac_word... " >&6; }
18167if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18168  $as_echo_n "(cached) " >&6
18169else
18170  case $POTENTIAL_CC in
18171  [\\/]* | ?:[\\/]*)
18172  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18173  ;;
18174  *)
18175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18176for as_dir in $PATH
18177do
18178  IFS=$as_save_IFS
18179  test -z "$as_dir" && as_dir=.
18180    for ac_exec_ext in '' $ac_executable_extensions; do
18181  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18182    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18184    break 2
18185  fi
18186done
18187  done
18188IFS=$as_save_IFS
18189
18190  ;;
18191esac
18192fi
18193POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18194if test -n "$POTENTIAL_CC"; then
18195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18196$as_echo "$POTENTIAL_CC" >&6; }
18197else
18198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18199$as_echo "no" >&6; }
18200fi
18201
18202
18203  test -n "$POTENTIAL_CC" && break
18204done
18205
18206    CC=$POTENTIAL_CC
18207  fi
18208
18209  if test "x$CC" = x; then
18210
18211    # Print a helpful message on how to acquire the necessary build dependency.
18212    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18213    MISSING_DEPENDENCY=devkit
18214    PKGHANDLER_COMMAND=
18215
18216    case $PKGHANDLER in
18217	apt-get)
18218                apt_help     $MISSING_DEPENDENCY ;;
18219    yum)
18220                yum_help     $MISSING_DEPENDENCY ;;
18221	port)
18222                port_help    $MISSING_DEPENDENCY ;;
18223	pkgutil)
18224                pkgutil_help $MISSING_DEPENDENCY ;;
18225	pkgadd)
18226                pkgadd_help  $MISSING_DEPENDENCY ;;
18227    * )
18228      break ;;
18229    esac
18230
18231    if test "x$PKGHANDLER_COMMAND" != x; then
18232        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18233    fi
18234
18235      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18236  fi
18237
18238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18239
18240  # First separate the path from the arguments. This will split at the first
18241  # space.
18242  complete="$CC"
18243  path="${complete%% *}"
18244  tmp="$complete EOL"
18245  arguments="${tmp#* }"
18246
18247  # Input might be given as Windows format, start by converting to
18248  # unix format.
18249  new_path=`$CYGPATH -u "$path"`
18250
18251  # Now try to locate executable using which
18252  new_path=`$WHICH "$new_path" 2> /dev/null`
18253  # bat and cmd files are not always considered executable in cygwin causing which
18254  # to not find them
18255  if test "x$new_path" = x \
18256           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18257           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18258    new_path=`$CYGPATH -u "$path"`
18259  fi
18260  if test "x$new_path" = x; then
18261    # Oops. Which didn't find the executable.
18262    # The splitting of arguments from the executable at a space might have been incorrect,
18263    # since paths with space are more likely in Windows. Give it another try with the whole
18264    # argument.
18265    path="$complete"
18266    arguments="EOL"
18267    new_path=`$CYGPATH -u "$path"`
18268    new_path=`$WHICH "$new_path" 2> /dev/null`
18269    # bat and cmd files are not always considered executable in cygwin causing which
18270    # to not find them
18271    if test "x$new_path" = x \
18272             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18273             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18274      new_path=`$CYGPATH -u "$path"`
18275    fi
18276    if test "x$new_path" = x; then
18277      # It's still not found. Now this is an unrecoverable error.
18278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18279$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18280      has_space=`$ECHO "$complete" | $GREP " "`
18281      if test "x$has_space" != x; then
18282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18284      fi
18285      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18286    fi
18287  fi
18288
18289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18292  # "foo.exe" is OK but "foo" is an error.
18293  #
18294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18295  # It is also a way to make sure we got the proper file name for the real test later on.
18296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18297  if test "x$test_shortpath" = x; then
18298    # Short path failed, file does not exist as specified.
18299    # Try adding .exe or .cmd
18300    if test -f "${new_path}.exe"; then
18301       input_to_shortpath="${new_path}.exe"
18302    elif test -f "${new_path}.cmd"; then
18303       input_to_shortpath="${new_path}.cmd"
18304    else
18305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18306$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18309      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18310    fi
18311  else
18312    input_to_shortpath="$new_path"
18313  fi
18314
18315  # Call helper function which possibly converts this using DOS-style short mode.
18316  # If so, the updated path is stored in $new_path.
18317  new_path="$input_to_shortpath"
18318
18319  input_path="$input_to_shortpath"
18320  # Check if we need to convert this using DOS-style short mode. If the path
18321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18322  # take no chances and rewrite it.
18323  # Note: m4 eats our [], so we need to use [ and ] instead.
18324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18325  if test "x$has_forbidden_chars" != x; then
18326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18330      # Going to short mode and back again did indeed matter. Since short mode is
18331      # case insensitive, let's make it lowercase to improve readability.
18332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18333      # Now convert it back to Unix-stile (cygpath)
18334      input_path=`$CYGPATH -u "$shortmode_path"`
18335      new_path="$input_path"
18336    fi
18337  fi
18338
18339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18340  if test "x$test_cygdrive_prefix" = x; then
18341    # As a simple fix, exclude /usr/bin since it's not a real path.
18342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18344      # a path prefixed by /cygdrive for fixpath to work.
18345      new_path="$CYGWIN_ROOT_PATH$input_path"
18346    fi
18347  fi
18348
18349  # remove trailing .exe if any
18350  new_path="${new_path/%.exe/}"
18351
18352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18353
18354  # First separate the path from the arguments. This will split at the first
18355  # space.
18356  complete="$CC"
18357  path="${complete%% *}"
18358  tmp="$complete EOL"
18359  arguments="${tmp#* }"
18360
18361  # Input might be given as Windows format, start by converting to
18362  # unix format.
18363  new_path="$path"
18364
18365  windows_path="$new_path"
18366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18367    unix_path=`$CYGPATH -u "$windows_path"`
18368    new_path="$unix_path"
18369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18371    new_path="$unix_path"
18372  fi
18373
18374
18375  # Now try to locate executable using which
18376  new_path=`$WHICH "$new_path" 2> /dev/null`
18377
18378  if test "x$new_path" = x; then
18379    # Oops. Which didn't find the executable.
18380    # The splitting of arguments from the executable at a space might have been incorrect,
18381    # since paths with space are more likely in Windows. Give it another try with the whole
18382    # argument.
18383    path="$complete"
18384    arguments="EOL"
18385    new_path="$path"
18386
18387  windows_path="$new_path"
18388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18389    unix_path=`$CYGPATH -u "$windows_path"`
18390    new_path="$unix_path"
18391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18393    new_path="$unix_path"
18394  fi
18395
18396
18397    new_path=`$WHICH "$new_path" 2> /dev/null`
18398
18399    if test "x$new_path" = x; then
18400      # It's still not found. Now this is an unrecoverable error.
18401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18402$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18403      has_space=`$ECHO "$complete" | $GREP " "`
18404      if test "x$has_space" != x; then
18405        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18406$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18407      fi
18408      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18409    fi
18410  fi
18411
18412  # Now new_path has a complete unix path to the binary
18413  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18414    # Keep paths in /bin as-is, but remove trailing .exe if any
18415    new_path="${new_path/%.exe/}"
18416    # Do not save /bin paths to all_fixpath_prefixes!
18417  else
18418    # Not in mixed or Windows style, start by that.
18419    new_path=`cmd //c echo $new_path`
18420
18421  input_path="$new_path"
18422  # Check if we need to convert this using DOS-style short mode. If the path
18423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18424  # take no chances and rewrite it.
18425  # Note: m4 eats our [], so we need to use [ and ] instead.
18426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18427  if test "x$has_forbidden_chars" != x; then
18428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18430  fi
18431
18432    # Output is in $new_path
18433
18434  windows_path="$new_path"
18435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18436    unix_path=`$CYGPATH -u "$windows_path"`
18437    new_path="$unix_path"
18438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18440    new_path="$unix_path"
18441  fi
18442
18443    # remove trailing .exe if any
18444    new_path="${new_path/%.exe/}"
18445
18446    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18447    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18448  fi
18449
18450  else
18451    # We're on a posix platform. Hooray! :)
18452    # First separate the path from the arguments. This will split at the first
18453    # space.
18454    complete="$CC"
18455    path="${complete%% *}"
18456    tmp="$complete EOL"
18457    arguments="${tmp#* }"
18458
18459    # Cannot rely on the command "which" here since it doesn't always work.
18460    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18461    if test -z "$is_absolute_path"; then
18462      # Path to executable is not absolute. Find it.
18463      IFS_save="$IFS"
18464      IFS=:
18465      for p in $PATH; do
18466        if test -f "$p/$path" && test -x "$p/$path"; then
18467          new_path="$p/$path"
18468          break
18469        fi
18470      done
18471      IFS="$IFS_save"
18472    else
18473      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18474$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18475      new_path="$path"
18476    fi
18477
18478    if test "x$new_path" = x; then
18479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18480$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18481        has_space=`$ECHO "$complete" | $GREP " "`
18482        if test "x$has_space" != x; then
18483          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18484$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18485        fi
18486        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18487      fi
18488  fi
18489
18490      # Now join together the path and the arguments once again
18491      if test "x$arguments" != xEOL; then
18492        new_complete="$new_path ${arguments% *}"
18493      else
18494        new_complete="$new_path"
18495      fi
18496
18497  if test "x$complete" != "x$new_complete"; then
18498      CC="$new_complete"
18499      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18500$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18501    fi
18502
18503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18504$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18505  TEST_COMPILER="$CC"
18506
18507    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18508        # Follow a chain of symbolic links. Use readlink
18509        # where it exists, else fall back to horribly
18510        # complicated shell code.
18511        if test "x$READLINK_TESTED" != yes; then
18512            # On MacOSX there is a readlink tool with a different
18513            # purpose than the GNU readlink tool. Check the found readlink.
18514            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18515            if test "x$ISGNU" = x; then
18516                 # A readlink that we do not know how to use.
18517                 # Are there other non-GNU readlinks out there?
18518                 READLINK_TESTED=yes
18519                 READLINK=
18520            fi
18521        fi
18522
18523        if test "x$READLINK" != x; then
18524            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18525        else
18526            # Save the current directory for restoring afterwards
18527            STARTDIR=$PWD
18528            COUNTER=0
18529            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18530            sym_link_file=`$BASENAME $TEST_COMPILER`
18531            # Use the system pwd and not the shell builtin to resolve directory symlinks
18532            cd $sym_link_dir
18533            cd `$THEPWDCMD`
18534            sym_link_dir=`$THEPWDCMD`
18535            # Resolve file symlinks
18536            while test $COUNTER -lt 20; do
18537                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18538                if test "x$ISLINK" == x; then
18539                    # This is not a symbolic link! We are done!
18540                    break
18541                fi
18542                # Again resolve directory symlinks since the target of the just found
18543                # link could be in a different directory
18544                cd `$DIRNAME $ISLINK`
18545                sym_link_dir=`$THEPWDCMD`
18546                sym_link_file=`$BASENAME $ISLINK`
18547                let COUNTER=COUNTER+1
18548            done
18549            cd $STARTDIR
18550            TEST_COMPILER=$sym_link_dir/$sym_link_file
18551        fi
18552    fi
18553
18554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18555$as_echo "$TEST_COMPILER" >&6; }
18556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18557$as_echo_n "checking if CC is disguised ccache... " >&6; }
18558
18559  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18560  if test "x$COMPILER_BASENAME" = "xccache"; then
18561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18562$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18563    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18564    # We want to control ccache invocation ourselves, so ignore this cc and try
18565    # searching again.
18566
18567    # Remove the path to the fake ccache cc from the PATH
18568    RETRY_COMPILER_SAVED_PATH="$PATH"
18569    COMPILER_DIRNAME=`$DIRNAME $CC`
18570    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18571
18572    # Try again looking for our compiler
18573    if test -n "$ac_tool_prefix"; then
18574  for ac_prog in $COMPILER_CHECK_LIST
18575  do
18576    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18577set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18579$as_echo_n "checking for $ac_word... " >&6; }
18580if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
18581  $as_echo_n "(cached) " >&6
18582else
18583  if test -n "$PROPER_COMPILER_CC"; then
18584  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18585else
18586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18587for as_dir in $PATH
18588do
18589  IFS=$as_save_IFS
18590  test -z "$as_dir" && as_dir=.
18591    for ac_exec_ext in '' $ac_executable_extensions; do
18592  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18593    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18595    break 2
18596  fi
18597done
18598  done
18599IFS=$as_save_IFS
18600
18601fi
18602fi
18603PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18604if test -n "$PROPER_COMPILER_CC"; then
18605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18606$as_echo "$PROPER_COMPILER_CC" >&6; }
18607else
18608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18609$as_echo "no" >&6; }
18610fi
18611
18612
18613    test -n "$PROPER_COMPILER_CC" && break
18614  done
18615fi
18616if test -z "$PROPER_COMPILER_CC"; then
18617  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18618  for ac_prog in $COMPILER_CHECK_LIST
18619do
18620  # Extract the first word of "$ac_prog", so it can be a program name with args.
18621set dummy $ac_prog; ac_word=$2
18622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18623$as_echo_n "checking for $ac_word... " >&6; }
18624if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
18625  $as_echo_n "(cached) " >&6
18626else
18627  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18628  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18629else
18630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18631for as_dir in $PATH
18632do
18633  IFS=$as_save_IFS
18634  test -z "$as_dir" && as_dir=.
18635    for ac_exec_ext in '' $ac_executable_extensions; do
18636  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18637    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18639    break 2
18640  fi
18641done
18642  done
18643IFS=$as_save_IFS
18644
18645fi
18646fi
18647ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18648if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18650$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18651else
18652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18653$as_echo "no" >&6; }
18654fi
18655
18656
18657  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18658done
18659
18660  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18661    PROPER_COMPILER_CC=""
18662  else
18663    case $cross_compiling:$ac_tool_warned in
18664yes:)
18665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18667ac_tool_warned=yes ;;
18668esac
18669    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18670  fi
18671fi
18672
18673
18674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18675
18676  # First separate the path from the arguments. This will split at the first
18677  # space.
18678  complete="$PROPER_COMPILER_CC"
18679  path="${complete%% *}"
18680  tmp="$complete EOL"
18681  arguments="${tmp#* }"
18682
18683  # Input might be given as Windows format, start by converting to
18684  # unix format.
18685  new_path=`$CYGPATH -u "$path"`
18686
18687  # Now try to locate executable using which
18688  new_path=`$WHICH "$new_path" 2> /dev/null`
18689  # bat and cmd files are not always considered executable in cygwin causing which
18690  # to not find them
18691  if test "x$new_path" = x \
18692           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18693           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18694    new_path=`$CYGPATH -u "$path"`
18695  fi
18696  if test "x$new_path" = x; then
18697    # Oops. Which didn't find the executable.
18698    # The splitting of arguments from the executable at a space might have been incorrect,
18699    # since paths with space are more likely in Windows. Give it another try with the whole
18700    # argument.
18701    path="$complete"
18702    arguments="EOL"
18703    new_path=`$CYGPATH -u "$path"`
18704    new_path=`$WHICH "$new_path" 2> /dev/null`
18705    # bat and cmd files are not always considered executable in cygwin causing which
18706    # to not find them
18707    if test "x$new_path" = x \
18708             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18709             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18710      new_path=`$CYGPATH -u "$path"`
18711    fi
18712    if test "x$new_path" = x; then
18713      # It's still not found. Now this is an unrecoverable error.
18714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18715$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18716      has_space=`$ECHO "$complete" | $GREP " "`
18717      if test "x$has_space" != x; then
18718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18720      fi
18721      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18722    fi
18723  fi
18724
18725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18728  # "foo.exe" is OK but "foo" is an error.
18729  #
18730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18731  # It is also a way to make sure we got the proper file name for the real test later on.
18732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18733  if test "x$test_shortpath" = x; then
18734    # Short path failed, file does not exist as specified.
18735    # Try adding .exe or .cmd
18736    if test -f "${new_path}.exe"; then
18737       input_to_shortpath="${new_path}.exe"
18738    elif test -f "${new_path}.cmd"; then
18739       input_to_shortpath="${new_path}.cmd"
18740    else
18741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18742$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18743      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18744$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18745      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18746    fi
18747  else
18748    input_to_shortpath="$new_path"
18749  fi
18750
18751  # Call helper function which possibly converts this using DOS-style short mode.
18752  # If so, the updated path is stored in $new_path.
18753  new_path="$input_to_shortpath"
18754
18755  input_path="$input_to_shortpath"
18756  # Check if we need to convert this using DOS-style short mode. If the path
18757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18758  # take no chances and rewrite it.
18759  # Note: m4 eats our [], so we need to use [ and ] instead.
18760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18761  if test "x$has_forbidden_chars" != x; then
18762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18766      # Going to short mode and back again did indeed matter. Since short mode is
18767      # case insensitive, let's make it lowercase to improve readability.
18768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18769      # Now convert it back to Unix-stile (cygpath)
18770      input_path=`$CYGPATH -u "$shortmode_path"`
18771      new_path="$input_path"
18772    fi
18773  fi
18774
18775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18776  if test "x$test_cygdrive_prefix" = x; then
18777    # As a simple fix, exclude /usr/bin since it's not a real path.
18778    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18780      # a path prefixed by /cygdrive for fixpath to work.
18781      new_path="$CYGWIN_ROOT_PATH$input_path"
18782    fi
18783  fi
18784
18785  # remove trailing .exe if any
18786  new_path="${new_path/%.exe/}"
18787
18788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18789
18790  # First separate the path from the arguments. This will split at the first
18791  # space.
18792  complete="$PROPER_COMPILER_CC"
18793  path="${complete%% *}"
18794  tmp="$complete EOL"
18795  arguments="${tmp#* }"
18796
18797  # Input might be given as Windows format, start by converting to
18798  # unix format.
18799  new_path="$path"
18800
18801  windows_path="$new_path"
18802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18803    unix_path=`$CYGPATH -u "$windows_path"`
18804    new_path="$unix_path"
18805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18807    new_path="$unix_path"
18808  fi
18809
18810
18811  # Now try to locate executable using which
18812  new_path=`$WHICH "$new_path" 2> /dev/null`
18813
18814  if test "x$new_path" = x; then
18815    # Oops. Which didn't find the executable.
18816    # The splitting of arguments from the executable at a space might have been incorrect,
18817    # since paths with space are more likely in Windows. Give it another try with the whole
18818    # argument.
18819    path="$complete"
18820    arguments="EOL"
18821    new_path="$path"
18822
18823  windows_path="$new_path"
18824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18825    unix_path=`$CYGPATH -u "$windows_path"`
18826    new_path="$unix_path"
18827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18829    new_path="$unix_path"
18830  fi
18831
18832
18833    new_path=`$WHICH "$new_path" 2> /dev/null`
18834
18835    if test "x$new_path" = x; then
18836      # It's still not found. Now this is an unrecoverable error.
18837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18838$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18839      has_space=`$ECHO "$complete" | $GREP " "`
18840      if test "x$has_space" != x; then
18841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18843      fi
18844      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18845    fi
18846  fi
18847
18848  # Now new_path has a complete unix path to the binary
18849  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18850    # Keep paths in /bin as-is, but remove trailing .exe if any
18851    new_path="${new_path/%.exe/}"
18852    # Do not save /bin paths to all_fixpath_prefixes!
18853  else
18854    # Not in mixed or Windows style, start by that.
18855    new_path=`cmd //c echo $new_path`
18856
18857  input_path="$new_path"
18858  # Check if we need to convert this using DOS-style short mode. If the path
18859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18860  # take no chances and rewrite it.
18861  # Note: m4 eats our [], so we need to use [ and ] instead.
18862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18863  if test "x$has_forbidden_chars" != x; then
18864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18866  fi
18867
18868    # Output is in $new_path
18869
18870  windows_path="$new_path"
18871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18872    unix_path=`$CYGPATH -u "$windows_path"`
18873    new_path="$unix_path"
18874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18876    new_path="$unix_path"
18877  fi
18878
18879    # remove trailing .exe if any
18880    new_path="${new_path/%.exe/}"
18881
18882    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18883    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18884  fi
18885
18886  else
18887    # We're on a posix platform. Hooray! :)
18888    # First separate the path from the arguments. This will split at the first
18889    # space.
18890    complete="$PROPER_COMPILER_CC"
18891    path="${complete%% *}"
18892    tmp="$complete EOL"
18893    arguments="${tmp#* }"
18894
18895    # Cannot rely on the command "which" here since it doesn't always work.
18896    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18897    if test -z "$is_absolute_path"; then
18898      # Path to executable is not absolute. Find it.
18899      IFS_save="$IFS"
18900      IFS=:
18901      for p in $PATH; do
18902        if test -f "$p/$path" && test -x "$p/$path"; then
18903          new_path="$p/$path"
18904          break
18905        fi
18906      done
18907      IFS="$IFS_save"
18908    else
18909      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18910$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18911      new_path="$path"
18912    fi
18913
18914    if test "x$new_path" = x; then
18915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18916$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18917        has_space=`$ECHO "$complete" | $GREP " "`
18918        if test "x$has_space" != x; then
18919          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18920$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18921        fi
18922        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18923      fi
18924  fi
18925
18926      # Now join together the path and the arguments once again
18927      if test "x$arguments" != xEOL; then
18928        new_complete="$new_path ${arguments% *}"
18929      else
18930        new_complete="$new_path"
18931      fi
18932
18933  if test "x$complete" != "x$new_complete"; then
18934      PROPER_COMPILER_CC="$new_complete"
18935      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18936$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18937    fi
18938
18939    PATH="$RETRY_COMPILER_SAVED_PATH"
18940
18941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18942$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18943
18944    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18945        # Follow a chain of symbolic links. Use readlink
18946        # where it exists, else fall back to horribly
18947        # complicated shell code.
18948        if test "x$READLINK_TESTED" != yes; then
18949            # On MacOSX there is a readlink tool with a different
18950            # purpose than the GNU readlink tool. Check the found readlink.
18951            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18952            if test "x$ISGNU" = x; then
18953                 # A readlink that we do not know how to use.
18954                 # Are there other non-GNU readlinks out there?
18955                 READLINK_TESTED=yes
18956                 READLINK=
18957            fi
18958        fi
18959
18960        if test "x$READLINK" != x; then
18961            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18962        else
18963            # Save the current directory for restoring afterwards
18964            STARTDIR=$PWD
18965            COUNTER=0
18966            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18967            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18968            # Use the system pwd and not the shell builtin to resolve directory symlinks
18969            cd $sym_link_dir
18970            cd `$THEPWDCMD`
18971            sym_link_dir=`$THEPWDCMD`
18972            # Resolve file symlinks
18973            while test $COUNTER -lt 20; do
18974                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18975                if test "x$ISLINK" == x; then
18976                    # This is not a symbolic link! We are done!
18977                    break
18978                fi
18979                # Again resolve directory symlinks since the target of the just found
18980                # link could be in a different directory
18981                cd `$DIRNAME $ISLINK`
18982                sym_link_dir=`$THEPWDCMD`
18983                sym_link_file=`$BASENAME $ISLINK`
18984                let COUNTER=COUNTER+1
18985            done
18986            cd $STARTDIR
18987            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18988        fi
18989    fi
18990
18991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18992$as_echo "$PROPER_COMPILER_CC" >&6; }
18993    CC="$PROPER_COMPILER_CC"
18994  else
18995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18996$as_echo "no, keeping CC" >&6; }
18997    CC="$TEST_COMPILER"
18998  fi
18999
19000  COMPILER=$CC
19001  COMPILER_NAME=$COMPILER_NAME
19002
19003  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19004    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19005    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19006    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19007    if test $? -ne 0; then
19008      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19009
19010      { $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
19011$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19012      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19013$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19014      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19015    else
19016      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19017      COMPILER_VENDOR="Sun Studio"
19018    fi
19019  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19020    # First line typically looks something like:
19021    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19022    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19023    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19024    COMPILER_VENDOR="Microsoft CL.EXE"
19025    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19026    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19027      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19028        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19029      fi
19030    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19031      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19032        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19033      fi
19034    fi
19035  else
19036    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19037    # Check that this is likely to be GCC.
19038    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19039    if test $? -ne 0; then
19040      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19041$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19042      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19043$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19044      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19045    fi
19046
19047    # First line typically looks something like:
19048    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19049    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19050    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19051  fi
19052  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19053  CC_VERSION="$COMPILER_VERSION"
19054  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19055  CC_VENDOR="$COMPILER_VENDOR"
19056
19057  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19058$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19059
19060
19061# Now that we have resolved CC ourself, let autoconf have it's go at it
19062ac_ext=c
19063ac_cpp='$CPP $CPPFLAGS'
19064ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19065ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19066ac_compiler_gnu=$ac_cv_c_compiler_gnu
19067if test -n "$ac_tool_prefix"; then
19068  for ac_prog in $CC
19069  do
19070    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19071set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19073$as_echo_n "checking for $ac_word... " >&6; }
19074if ${ac_cv_prog_CC+:} false; then :
19075  $as_echo_n "(cached) " >&6
19076else
19077  if test -n "$CC"; then
19078  ac_cv_prog_CC="$CC" # Let the user override the test.
19079else
19080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19081for as_dir in $PATH
19082do
19083  IFS=$as_save_IFS
19084  test -z "$as_dir" && as_dir=.
19085    for ac_exec_ext in '' $ac_executable_extensions; do
19086  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19087    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19089    break 2
19090  fi
19091done
19092  done
19093IFS=$as_save_IFS
19094
19095fi
19096fi
19097CC=$ac_cv_prog_CC
19098if test -n "$CC"; then
19099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19100$as_echo "$CC" >&6; }
19101else
19102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19103$as_echo "no" >&6; }
19104fi
19105
19106
19107    test -n "$CC" && break
19108  done
19109fi
19110if test -z "$CC"; then
19111  ac_ct_CC=$CC
19112  for ac_prog in $CC
19113do
19114  # Extract the first word of "$ac_prog", so it can be a program name with args.
19115set dummy $ac_prog; ac_word=$2
19116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19117$as_echo_n "checking for $ac_word... " >&6; }
19118if ${ac_cv_prog_ac_ct_CC+:} false; then :
19119  $as_echo_n "(cached) " >&6
19120else
19121  if test -n "$ac_ct_CC"; then
19122  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19123else
19124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19125for as_dir in $PATH
19126do
19127  IFS=$as_save_IFS
19128  test -z "$as_dir" && as_dir=.
19129    for ac_exec_ext in '' $ac_executable_extensions; do
19130  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19131    ac_cv_prog_ac_ct_CC="$ac_prog"
19132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19133    break 2
19134  fi
19135done
19136  done
19137IFS=$as_save_IFS
19138
19139fi
19140fi
19141ac_ct_CC=$ac_cv_prog_ac_ct_CC
19142if test -n "$ac_ct_CC"; then
19143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19144$as_echo "$ac_ct_CC" >&6; }
19145else
19146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19147$as_echo "no" >&6; }
19148fi
19149
19150
19151  test -n "$ac_ct_CC" && break
19152done
19153
19154  if test "x$ac_ct_CC" = x; then
19155    CC=""
19156  else
19157    case $cross_compiling:$ac_tool_warned in
19158yes:)
19159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19161ac_tool_warned=yes ;;
19162esac
19163    CC=$ac_ct_CC
19164  fi
19165fi
19166
19167
19168test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19170as_fn_error $? "no acceptable C compiler found in \$PATH
19171See \`config.log' for more details" "$LINENO" 5; }
19172
19173# Provide some information about the compiler.
19174$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19175set X $ac_compile
19176ac_compiler=$2
19177for ac_option in --version -v -V -qversion; do
19178  { { ac_try="$ac_compiler $ac_option >&5"
19179case "(($ac_try" in
19180  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19181  *) ac_try_echo=$ac_try;;
19182esac
19183eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19184$as_echo "$ac_try_echo"; } >&5
19185  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19186  ac_status=$?
19187  if test -s conftest.err; then
19188    sed '10a\
19189... rest of stderr output deleted ...
19190         10q' conftest.err >conftest.er1
19191    cat conftest.er1 >&5
19192  fi
19193  rm -f conftest.er1 conftest.err
19194  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19195  test $ac_status = 0; }
19196done
19197
19198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19199/* end confdefs.h.  */
19200
19201int
19202main ()
19203{
19204
19205  ;
19206  return 0;
19207}
19208_ACEOF
19209ac_clean_files_save=$ac_clean_files
19210ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19211# Try to create an executable without -o first, disregard a.out.
19212# It will help us diagnose broken compilers, and finding out an intuition
19213# of exeext.
19214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19215$as_echo_n "checking whether the C compiler works... " >&6; }
19216ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19217
19218# The possible output files:
19219ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19220
19221ac_rmfiles=
19222for ac_file in $ac_files
19223do
19224  case $ac_file in
19225    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19226    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19227  esac
19228done
19229rm -f $ac_rmfiles
19230
19231if { { ac_try="$ac_link_default"
19232case "(($ac_try" in
19233  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19234  *) ac_try_echo=$ac_try;;
19235esac
19236eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19237$as_echo "$ac_try_echo"; } >&5
19238  (eval "$ac_link_default") 2>&5
19239  ac_status=$?
19240  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19241  test $ac_status = 0; }; then :
19242  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19243# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19244# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19245# so that the user can short-circuit this test for compilers unknown to
19246# Autoconf.
19247for ac_file in $ac_files ''
19248do
19249  test -f "$ac_file" || continue
19250  case $ac_file in
19251    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19252	;;
19253    [ab].out )
19254	# We found the default executable, but exeext='' is most
19255	# certainly right.
19256	break;;
19257    *.* )
19258	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19259	then :; else
19260	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19261	fi
19262	# We set ac_cv_exeext here because the later test for it is not
19263	# safe: cross compilers may not add the suffix if given an `-o'
19264	# argument, so we may need to know it at that point already.
19265	# Even if this section looks crufty: it has the advantage of
19266	# actually working.
19267	break;;
19268    * )
19269	break;;
19270  esac
19271done
19272test "$ac_cv_exeext" = no && ac_cv_exeext=
19273
19274else
19275  ac_file=''
19276fi
19277if test -z "$ac_file"; then :
19278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19279$as_echo "no" >&6; }
19280$as_echo "$as_me: failed program was:" >&5
19281sed 's/^/| /' conftest.$ac_ext >&5
19282
19283{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19284$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19285as_fn_error 77 "C compiler cannot create executables
19286See \`config.log' for more details" "$LINENO" 5; }
19287else
19288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19289$as_echo "yes" >&6; }
19290fi
19291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19292$as_echo_n "checking for C compiler default output file name... " >&6; }
19293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19294$as_echo "$ac_file" >&6; }
19295ac_exeext=$ac_cv_exeext
19296
19297rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19298ac_clean_files=$ac_clean_files_save
19299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19300$as_echo_n "checking for suffix of executables... " >&6; }
19301if { { ac_try="$ac_link"
19302case "(($ac_try" in
19303  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19304  *) ac_try_echo=$ac_try;;
19305esac
19306eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19307$as_echo "$ac_try_echo"; } >&5
19308  (eval "$ac_link") 2>&5
19309  ac_status=$?
19310  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19311  test $ac_status = 0; }; then :
19312  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19313# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19314# work properly (i.e., refer to `conftest.exe'), while it won't with
19315# `rm'.
19316for ac_file in conftest.exe conftest conftest.*; do
19317  test -f "$ac_file" || continue
19318  case $ac_file in
19319    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19320    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19321	  break;;
19322    * ) break;;
19323  esac
19324done
19325else
19326  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19328as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19329See \`config.log' for more details" "$LINENO" 5; }
19330fi
19331rm -f conftest conftest$ac_cv_exeext
19332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19333$as_echo "$ac_cv_exeext" >&6; }
19334
19335rm -f conftest.$ac_ext
19336EXEEXT=$ac_cv_exeext
19337ac_exeext=$EXEEXT
19338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19339/* end confdefs.h.  */
19340#include <stdio.h>
19341int
19342main ()
19343{
19344FILE *f = fopen ("conftest.out", "w");
19345 return ferror (f) || fclose (f) != 0;
19346
19347  ;
19348  return 0;
19349}
19350_ACEOF
19351ac_clean_files="$ac_clean_files conftest.out"
19352# Check that the compiler produces executables we can run.  If not, either
19353# the compiler is broken, or we cross compile.
19354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19355$as_echo_n "checking whether we are cross compiling... " >&6; }
19356if test "$cross_compiling" != yes; then
19357  { { ac_try="$ac_link"
19358case "(($ac_try" in
19359  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19360  *) ac_try_echo=$ac_try;;
19361esac
19362eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19363$as_echo "$ac_try_echo"; } >&5
19364  (eval "$ac_link") 2>&5
19365  ac_status=$?
19366  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19367  test $ac_status = 0; }
19368  if { ac_try='./conftest$ac_cv_exeext'
19369  { { case "(($ac_try" in
19370  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19371  *) ac_try_echo=$ac_try;;
19372esac
19373eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19374$as_echo "$ac_try_echo"; } >&5
19375  (eval "$ac_try") 2>&5
19376  ac_status=$?
19377  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19378  test $ac_status = 0; }; }; then
19379    cross_compiling=no
19380  else
19381    if test "$cross_compiling" = maybe; then
19382	cross_compiling=yes
19383    else
19384	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19386as_fn_error $? "cannot run C compiled programs.
19387If you meant to cross compile, use \`--host'.
19388See \`config.log' for more details" "$LINENO" 5; }
19389    fi
19390  fi
19391fi
19392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19393$as_echo "$cross_compiling" >&6; }
19394
19395rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19396ac_clean_files=$ac_clean_files_save
19397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19398$as_echo_n "checking for suffix of object files... " >&6; }
19399if ${ac_cv_objext+:} false; then :
19400  $as_echo_n "(cached) " >&6
19401else
19402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19403/* end confdefs.h.  */
19404
19405int
19406main ()
19407{
19408
19409  ;
19410  return 0;
19411}
19412_ACEOF
19413rm -f conftest.o conftest.obj
19414if { { ac_try="$ac_compile"
19415case "(($ac_try" in
19416  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19417  *) ac_try_echo=$ac_try;;
19418esac
19419eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19420$as_echo "$ac_try_echo"; } >&5
19421  (eval "$ac_compile") 2>&5
19422  ac_status=$?
19423  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19424  test $ac_status = 0; }; then :
19425  for ac_file in conftest.o conftest.obj conftest.*; do
19426  test -f "$ac_file" || continue;
19427  case $ac_file in
19428    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19429    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19430       break;;
19431  esac
19432done
19433else
19434  $as_echo "$as_me: failed program was:" >&5
19435sed 's/^/| /' conftest.$ac_ext >&5
19436
19437{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19439as_fn_error $? "cannot compute suffix of object files: cannot compile
19440See \`config.log' for more details" "$LINENO" 5; }
19441fi
19442rm -f conftest.$ac_cv_objext conftest.$ac_ext
19443fi
19444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19445$as_echo "$ac_cv_objext" >&6; }
19446OBJEXT=$ac_cv_objext
19447ac_objext=$OBJEXT
19448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19449$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19450if ${ac_cv_c_compiler_gnu+:} false; then :
19451  $as_echo_n "(cached) " >&6
19452else
19453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19454/* end confdefs.h.  */
19455
19456int
19457main ()
19458{
19459#ifndef __GNUC__
19460       choke me
19461#endif
19462
19463  ;
19464  return 0;
19465}
19466_ACEOF
19467if ac_fn_c_try_compile "$LINENO"; then :
19468  ac_compiler_gnu=yes
19469else
19470  ac_compiler_gnu=no
19471fi
19472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19473ac_cv_c_compiler_gnu=$ac_compiler_gnu
19474
19475fi
19476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19477$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19478if test $ac_compiler_gnu = yes; then
19479  GCC=yes
19480else
19481  GCC=
19482fi
19483ac_test_CFLAGS=${CFLAGS+set}
19484ac_save_CFLAGS=$CFLAGS
19485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19486$as_echo_n "checking whether $CC accepts -g... " >&6; }
19487if ${ac_cv_prog_cc_g+:} false; then :
19488  $as_echo_n "(cached) " >&6
19489else
19490  ac_save_c_werror_flag=$ac_c_werror_flag
19491   ac_c_werror_flag=yes
19492   ac_cv_prog_cc_g=no
19493   CFLAGS="-g"
19494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19495/* end confdefs.h.  */
19496
19497int
19498main ()
19499{
19500
19501  ;
19502  return 0;
19503}
19504_ACEOF
19505if ac_fn_c_try_compile "$LINENO"; then :
19506  ac_cv_prog_cc_g=yes
19507else
19508  CFLAGS=""
19509      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19510/* end confdefs.h.  */
19511
19512int
19513main ()
19514{
19515
19516  ;
19517  return 0;
19518}
19519_ACEOF
19520if ac_fn_c_try_compile "$LINENO"; then :
19521
19522else
19523  ac_c_werror_flag=$ac_save_c_werror_flag
19524	 CFLAGS="-g"
19525	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19526/* end confdefs.h.  */
19527
19528int
19529main ()
19530{
19531
19532  ;
19533  return 0;
19534}
19535_ACEOF
19536if ac_fn_c_try_compile "$LINENO"; then :
19537  ac_cv_prog_cc_g=yes
19538fi
19539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19540fi
19541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19542fi
19543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19544   ac_c_werror_flag=$ac_save_c_werror_flag
19545fi
19546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19547$as_echo "$ac_cv_prog_cc_g" >&6; }
19548if test "$ac_test_CFLAGS" = set; then
19549  CFLAGS=$ac_save_CFLAGS
19550elif test $ac_cv_prog_cc_g = yes; then
19551  if test "$GCC" = yes; then
19552    CFLAGS="-g -O2"
19553  else
19554    CFLAGS="-g"
19555  fi
19556else
19557  if test "$GCC" = yes; then
19558    CFLAGS="-O2"
19559  else
19560    CFLAGS=
19561  fi
19562fi
19563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19564$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19565if ${ac_cv_prog_cc_c89+:} false; then :
19566  $as_echo_n "(cached) " >&6
19567else
19568  ac_cv_prog_cc_c89=no
19569ac_save_CC=$CC
19570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19571/* end confdefs.h.  */
19572#include <stdarg.h>
19573#include <stdio.h>
19574#include <sys/types.h>
19575#include <sys/stat.h>
19576/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19577struct buf { int x; };
19578FILE * (*rcsopen) (struct buf *, struct stat *, int);
19579static char *e (p, i)
19580     char **p;
19581     int i;
19582{
19583  return p[i];
19584}
19585static char *f (char * (*g) (char **, int), char **p, ...)
19586{
19587  char *s;
19588  va_list v;
19589  va_start (v,p);
19590  s = g (p, va_arg (v,int));
19591  va_end (v);
19592  return s;
19593}
19594
19595/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19596   function prototypes and stuff, but not '\xHH' hex character constants.
19597   These don't provoke an error unfortunately, instead are silently treated
19598   as 'x'.  The following induces an error, until -std is added to get
19599   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19600   array size at least.  It's necessary to write '\x00'==0 to get something
19601   that's true only with -std.  */
19602int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19603
19604/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19605   inside strings and character constants.  */
19606#define FOO(x) 'x'
19607int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19608
19609int test (int i, double x);
19610struct s1 {int (*f) (int a);};
19611struct s2 {int (*f) (double a);};
19612int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19613int argc;
19614char **argv;
19615int
19616main ()
19617{
19618return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19619  ;
19620  return 0;
19621}
19622_ACEOF
19623for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19624	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19625do
19626  CC="$ac_save_CC $ac_arg"
19627  if ac_fn_c_try_compile "$LINENO"; then :
19628  ac_cv_prog_cc_c89=$ac_arg
19629fi
19630rm -f core conftest.err conftest.$ac_objext
19631  test "x$ac_cv_prog_cc_c89" != "xno" && break
19632done
19633rm -f conftest.$ac_ext
19634CC=$ac_save_CC
19635
19636fi
19637# AC_CACHE_VAL
19638case "x$ac_cv_prog_cc_c89" in
19639  x)
19640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19641$as_echo "none needed" >&6; } ;;
19642  xno)
19643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19644$as_echo "unsupported" >&6; } ;;
19645  *)
19646    CC="$CC $ac_cv_prog_cc_c89"
19647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19648$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19649esac
19650if test "x$ac_cv_prog_cc_c89" != xno; then :
19651
19652fi
19653
19654ac_ext=cpp
19655ac_cpp='$CXXCPP $CPPFLAGS'
19656ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19657ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19658ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19659
19660
19661### Locate C++ compiler (CXX)
19662
19663if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19664  # Do not probe for CC on MacOSX.
19665  COMPILER_CHECK_LIST="cl g++"
19666else
19667  COMPILER_CHECK_LIST="cl CC g++"
19668fi
19669
19670  COMPILER_NAME=C++
19671
19672  CXX=
19673  # If TOOLS_DIR is set, check for all compiler names in there first
19674  # before checking the rest of the PATH.
19675  if test -n "$TOOLS_DIR"; then
19676    PATH_save="$PATH"
19677    PATH="$TOOLS_DIR"
19678    for ac_prog in $COMPILER_CHECK_LIST
19679do
19680  # Extract the first word of "$ac_prog", so it can be a program name with args.
19681set dummy $ac_prog; ac_word=$2
19682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19683$as_echo_n "checking for $ac_word... " >&6; }
19684if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
19685  $as_echo_n "(cached) " >&6
19686else
19687  case $TOOLS_DIR_CXX in
19688  [\\/]* | ?:[\\/]*)
19689  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19690  ;;
19691  *)
19692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19693for as_dir in $PATH
19694do
19695  IFS=$as_save_IFS
19696  test -z "$as_dir" && as_dir=.
19697    for ac_exec_ext in '' $ac_executable_extensions; do
19698  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19699    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19701    break 2
19702  fi
19703done
19704  done
19705IFS=$as_save_IFS
19706
19707  ;;
19708esac
19709fi
19710TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19711if test -n "$TOOLS_DIR_CXX"; then
19712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19713$as_echo "$TOOLS_DIR_CXX" >&6; }
19714else
19715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19716$as_echo "no" >&6; }
19717fi
19718
19719
19720  test -n "$TOOLS_DIR_CXX" && break
19721done
19722
19723    CXX=$TOOLS_DIR_CXX
19724    PATH="$PATH_save"
19725  fi
19726
19727  # AC_PATH_PROGS can't be run multiple times with the same variable,
19728  # so create a new name for this run.
19729  if test "x$CXX" = x; then
19730    for ac_prog in $COMPILER_CHECK_LIST
19731do
19732  # Extract the first word of "$ac_prog", so it can be a program name with args.
19733set dummy $ac_prog; ac_word=$2
19734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19735$as_echo_n "checking for $ac_word... " >&6; }
19736if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
19737  $as_echo_n "(cached) " >&6
19738else
19739  case $POTENTIAL_CXX in
19740  [\\/]* | ?:[\\/]*)
19741  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19742  ;;
19743  *)
19744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19745for as_dir in $PATH
19746do
19747  IFS=$as_save_IFS
19748  test -z "$as_dir" && as_dir=.
19749    for ac_exec_ext in '' $ac_executable_extensions; do
19750  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19751    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19753    break 2
19754  fi
19755done
19756  done
19757IFS=$as_save_IFS
19758
19759  ;;
19760esac
19761fi
19762POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19763if test -n "$POTENTIAL_CXX"; then
19764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19765$as_echo "$POTENTIAL_CXX" >&6; }
19766else
19767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19768$as_echo "no" >&6; }
19769fi
19770
19771
19772  test -n "$POTENTIAL_CXX" && break
19773done
19774
19775    CXX=$POTENTIAL_CXX
19776  fi
19777
19778  if test "x$CXX" = x; then
19779
19780    # Print a helpful message on how to acquire the necessary build dependency.
19781    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19782    MISSING_DEPENDENCY=devkit
19783    PKGHANDLER_COMMAND=
19784
19785    case $PKGHANDLER in
19786	apt-get)
19787                apt_help     $MISSING_DEPENDENCY ;;
19788    yum)
19789                yum_help     $MISSING_DEPENDENCY ;;
19790	port)
19791                port_help    $MISSING_DEPENDENCY ;;
19792	pkgutil)
19793                pkgutil_help $MISSING_DEPENDENCY ;;
19794	pkgadd)
19795                pkgadd_help  $MISSING_DEPENDENCY ;;
19796    * )
19797      break ;;
19798    esac
19799
19800    if test "x$PKGHANDLER_COMMAND" != x; then
19801        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19802    fi
19803
19804      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19805  fi
19806
19807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19808
19809  # First separate the path from the arguments. This will split at the first
19810  # space.
19811  complete="$CXX"
19812  path="${complete%% *}"
19813  tmp="$complete EOL"
19814  arguments="${tmp#* }"
19815
19816  # Input might be given as Windows format, start by converting to
19817  # unix format.
19818  new_path=`$CYGPATH -u "$path"`
19819
19820  # Now try to locate executable using which
19821  new_path=`$WHICH "$new_path" 2> /dev/null`
19822  # bat and cmd files are not always considered executable in cygwin causing which
19823  # to not find them
19824  if test "x$new_path" = x \
19825           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19826           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19827    new_path=`$CYGPATH -u "$path"`
19828  fi
19829  if test "x$new_path" = x; then
19830    # Oops. Which didn't find the executable.
19831    # The splitting of arguments from the executable at a space might have been incorrect,
19832    # since paths with space are more likely in Windows. Give it another try with the whole
19833    # argument.
19834    path="$complete"
19835    arguments="EOL"
19836    new_path=`$CYGPATH -u "$path"`
19837    new_path=`$WHICH "$new_path" 2> /dev/null`
19838    # bat and cmd files are not always considered executable in cygwin causing which
19839    # to not find them
19840    if test "x$new_path" = x \
19841             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19842             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19843      new_path=`$CYGPATH -u "$path"`
19844    fi
19845    if test "x$new_path" = x; then
19846      # It's still not found. Now this is an unrecoverable error.
19847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19848$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19849      has_space=`$ECHO "$complete" | $GREP " "`
19850      if test "x$has_space" != x; then
19851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19853      fi
19854      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19855    fi
19856  fi
19857
19858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19861  # "foo.exe" is OK but "foo" is an error.
19862  #
19863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19864  # It is also a way to make sure we got the proper file name for the real test later on.
19865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19866  if test "x$test_shortpath" = x; then
19867    # Short path failed, file does not exist as specified.
19868    # Try adding .exe or .cmd
19869    if test -f "${new_path}.exe"; then
19870       input_to_shortpath="${new_path}.exe"
19871    elif test -f "${new_path}.cmd"; then
19872       input_to_shortpath="${new_path}.cmd"
19873    else
19874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19875$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19876      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19877$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19878      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19879    fi
19880  else
19881    input_to_shortpath="$new_path"
19882  fi
19883
19884  # Call helper function which possibly converts this using DOS-style short mode.
19885  # If so, the updated path is stored in $new_path.
19886  new_path="$input_to_shortpath"
19887
19888  input_path="$input_to_shortpath"
19889  # Check if we need to convert this using DOS-style short mode. If the path
19890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19891  # take no chances and rewrite it.
19892  # Note: m4 eats our [], so we need to use [ and ] instead.
19893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19894  if test "x$has_forbidden_chars" != x; then
19895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19899      # Going to short mode and back again did indeed matter. Since short mode is
19900      # case insensitive, let's make it lowercase to improve readability.
19901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19902      # Now convert it back to Unix-stile (cygpath)
19903      input_path=`$CYGPATH -u "$shortmode_path"`
19904      new_path="$input_path"
19905    fi
19906  fi
19907
19908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19909  if test "x$test_cygdrive_prefix" = x; then
19910    # As a simple fix, exclude /usr/bin since it's not a real path.
19911    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19913      # a path prefixed by /cygdrive for fixpath to work.
19914      new_path="$CYGWIN_ROOT_PATH$input_path"
19915    fi
19916  fi
19917
19918  # remove trailing .exe if any
19919  new_path="${new_path/%.exe/}"
19920
19921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19922
19923  # First separate the path from the arguments. This will split at the first
19924  # space.
19925  complete="$CXX"
19926  path="${complete%% *}"
19927  tmp="$complete EOL"
19928  arguments="${tmp#* }"
19929
19930  # Input might be given as Windows format, start by converting to
19931  # unix format.
19932  new_path="$path"
19933
19934  windows_path="$new_path"
19935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19936    unix_path=`$CYGPATH -u "$windows_path"`
19937    new_path="$unix_path"
19938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19940    new_path="$unix_path"
19941  fi
19942
19943
19944  # Now try to locate executable using which
19945  new_path=`$WHICH "$new_path" 2> /dev/null`
19946
19947  if test "x$new_path" = x; then
19948    # Oops. Which didn't find the executable.
19949    # The splitting of arguments from the executable at a space might have been incorrect,
19950    # since paths with space are more likely in Windows. Give it another try with the whole
19951    # argument.
19952    path="$complete"
19953    arguments="EOL"
19954    new_path="$path"
19955
19956  windows_path="$new_path"
19957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19958    unix_path=`$CYGPATH -u "$windows_path"`
19959    new_path="$unix_path"
19960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19962    new_path="$unix_path"
19963  fi
19964
19965
19966    new_path=`$WHICH "$new_path" 2> /dev/null`
19967
19968    if test "x$new_path" = x; then
19969      # It's still not found. Now this is an unrecoverable error.
19970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19971$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19972      has_space=`$ECHO "$complete" | $GREP " "`
19973      if test "x$has_space" != x; then
19974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19976      fi
19977      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19978    fi
19979  fi
19980
19981  # Now new_path has a complete unix path to the binary
19982  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19983    # Keep paths in /bin as-is, but remove trailing .exe if any
19984    new_path="${new_path/%.exe/}"
19985    # Do not save /bin paths to all_fixpath_prefixes!
19986  else
19987    # Not in mixed or Windows style, start by that.
19988    new_path=`cmd //c echo $new_path`
19989
19990  input_path="$new_path"
19991  # Check if we need to convert this using DOS-style short mode. If the path
19992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19993  # take no chances and rewrite it.
19994  # Note: m4 eats our [], so we need to use [ and ] instead.
19995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19996  if test "x$has_forbidden_chars" != x; then
19997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19999  fi
20000
20001    # Output is in $new_path
20002
20003  windows_path="$new_path"
20004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20005    unix_path=`$CYGPATH -u "$windows_path"`
20006    new_path="$unix_path"
20007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20009    new_path="$unix_path"
20010  fi
20011
20012    # remove trailing .exe if any
20013    new_path="${new_path/%.exe/}"
20014
20015    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20016    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20017  fi
20018
20019  else
20020    # We're on a posix platform. Hooray! :)
20021    # First separate the path from the arguments. This will split at the first
20022    # space.
20023    complete="$CXX"
20024    path="${complete%% *}"
20025    tmp="$complete EOL"
20026    arguments="${tmp#* }"
20027
20028    # Cannot rely on the command "which" here since it doesn't always work.
20029    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20030    if test -z "$is_absolute_path"; then
20031      # Path to executable is not absolute. Find it.
20032      IFS_save="$IFS"
20033      IFS=:
20034      for p in $PATH; do
20035        if test -f "$p/$path" && test -x "$p/$path"; then
20036          new_path="$p/$path"
20037          break
20038        fi
20039      done
20040      IFS="$IFS_save"
20041    else
20042      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20043$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20044      new_path="$path"
20045    fi
20046
20047    if test "x$new_path" = x; then
20048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20049$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20050        has_space=`$ECHO "$complete" | $GREP " "`
20051        if test "x$has_space" != x; then
20052          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20053$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20054        fi
20055        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20056      fi
20057  fi
20058
20059      # Now join together the path and the arguments once again
20060      if test "x$arguments" != xEOL; then
20061        new_complete="$new_path ${arguments% *}"
20062      else
20063        new_complete="$new_path"
20064      fi
20065
20066  if test "x$complete" != "x$new_complete"; then
20067      CXX="$new_complete"
20068      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20069$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20070    fi
20071
20072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20073$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20074  TEST_COMPILER="$CXX"
20075
20076    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20077        # Follow a chain of symbolic links. Use readlink
20078        # where it exists, else fall back to horribly
20079        # complicated shell code.
20080        if test "x$READLINK_TESTED" != yes; then
20081            # On MacOSX there is a readlink tool with a different
20082            # purpose than the GNU readlink tool. Check the found readlink.
20083            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20084            if test "x$ISGNU" = x; then
20085                 # A readlink that we do not know how to use.
20086                 # Are there other non-GNU readlinks out there?
20087                 READLINK_TESTED=yes
20088                 READLINK=
20089            fi
20090        fi
20091
20092        if test "x$READLINK" != x; then
20093            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20094        else
20095            # Save the current directory for restoring afterwards
20096            STARTDIR=$PWD
20097            COUNTER=0
20098            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20099            sym_link_file=`$BASENAME $TEST_COMPILER`
20100            # Use the system pwd and not the shell builtin to resolve directory symlinks
20101            cd $sym_link_dir
20102            cd `$THEPWDCMD`
20103            sym_link_dir=`$THEPWDCMD`
20104            # Resolve file symlinks
20105            while test $COUNTER -lt 20; do
20106                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20107                if test "x$ISLINK" == x; then
20108                    # This is not a symbolic link! We are done!
20109                    break
20110                fi
20111                # Again resolve directory symlinks since the target of the just found
20112                # link could be in a different directory
20113                cd `$DIRNAME $ISLINK`
20114                sym_link_dir=`$THEPWDCMD`
20115                sym_link_file=`$BASENAME $ISLINK`
20116                let COUNTER=COUNTER+1
20117            done
20118            cd $STARTDIR
20119            TEST_COMPILER=$sym_link_dir/$sym_link_file
20120        fi
20121    fi
20122
20123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20124$as_echo "$TEST_COMPILER" >&6; }
20125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20126$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20127
20128  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20129  if test "x$COMPILER_BASENAME" = "xccache"; then
20130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20131$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20132    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20133    # We want to control ccache invocation ourselves, so ignore this cc and try
20134    # searching again.
20135
20136    # Remove the path to the fake ccache cc from the PATH
20137    RETRY_COMPILER_SAVED_PATH="$PATH"
20138    COMPILER_DIRNAME=`$DIRNAME $CXX`
20139    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20140
20141    # Try again looking for our compiler
20142    if test -n "$ac_tool_prefix"; then
20143  for ac_prog in $COMPILER_CHECK_LIST
20144  do
20145    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20146set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20148$as_echo_n "checking for $ac_word... " >&6; }
20149if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20150  $as_echo_n "(cached) " >&6
20151else
20152  if test -n "$PROPER_COMPILER_CXX"; then
20153  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20154else
20155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20156for as_dir in $PATH
20157do
20158  IFS=$as_save_IFS
20159  test -z "$as_dir" && as_dir=.
20160    for ac_exec_ext in '' $ac_executable_extensions; do
20161  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20162    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20164    break 2
20165  fi
20166done
20167  done
20168IFS=$as_save_IFS
20169
20170fi
20171fi
20172PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20173if test -n "$PROPER_COMPILER_CXX"; then
20174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20175$as_echo "$PROPER_COMPILER_CXX" >&6; }
20176else
20177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20178$as_echo "no" >&6; }
20179fi
20180
20181
20182    test -n "$PROPER_COMPILER_CXX" && break
20183  done
20184fi
20185if test -z "$PROPER_COMPILER_CXX"; then
20186  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20187  for ac_prog in $COMPILER_CHECK_LIST
20188do
20189  # Extract the first word of "$ac_prog", so it can be a program name with args.
20190set dummy $ac_prog; ac_word=$2
20191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20192$as_echo_n "checking for $ac_word... " >&6; }
20193if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20194  $as_echo_n "(cached) " >&6
20195else
20196  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20197  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20198else
20199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20200for as_dir in $PATH
20201do
20202  IFS=$as_save_IFS
20203  test -z "$as_dir" && as_dir=.
20204    for ac_exec_ext in '' $ac_executable_extensions; do
20205  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20206    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20208    break 2
20209  fi
20210done
20211  done
20212IFS=$as_save_IFS
20213
20214fi
20215fi
20216ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20217if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20219$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20220else
20221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20222$as_echo "no" >&6; }
20223fi
20224
20225
20226  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20227done
20228
20229  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20230    PROPER_COMPILER_CXX=""
20231  else
20232    case $cross_compiling:$ac_tool_warned in
20233yes:)
20234{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20235$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20236ac_tool_warned=yes ;;
20237esac
20238    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20239  fi
20240fi
20241
20242
20243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20244
20245  # First separate the path from the arguments. This will split at the first
20246  # space.
20247  complete="$PROPER_COMPILER_CXX"
20248  path="${complete%% *}"
20249  tmp="$complete EOL"
20250  arguments="${tmp#* }"
20251
20252  # Input might be given as Windows format, start by converting to
20253  # unix format.
20254  new_path=`$CYGPATH -u "$path"`
20255
20256  # Now try to locate executable using which
20257  new_path=`$WHICH "$new_path" 2> /dev/null`
20258  # bat and cmd files are not always considered executable in cygwin causing which
20259  # to not find them
20260  if test "x$new_path" = x \
20261           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20262           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20263    new_path=`$CYGPATH -u "$path"`
20264  fi
20265  if test "x$new_path" = x; then
20266    # Oops. Which didn't find the executable.
20267    # The splitting of arguments from the executable at a space might have been incorrect,
20268    # since paths with space are more likely in Windows. Give it another try with the whole
20269    # argument.
20270    path="$complete"
20271    arguments="EOL"
20272    new_path=`$CYGPATH -u "$path"`
20273    new_path=`$WHICH "$new_path" 2> /dev/null`
20274    # bat and cmd files are not always considered executable in cygwin causing which
20275    # to not find them
20276    if test "x$new_path" = x \
20277             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20278             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20279      new_path=`$CYGPATH -u "$path"`
20280    fi
20281    if test "x$new_path" = x; then
20282      # It's still not found. Now this is an unrecoverable error.
20283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20284$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20285      has_space=`$ECHO "$complete" | $GREP " "`
20286      if test "x$has_space" != x; then
20287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20289      fi
20290      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20291    fi
20292  fi
20293
20294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20297  # "foo.exe" is OK but "foo" is an error.
20298  #
20299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20300  # It is also a way to make sure we got the proper file name for the real test later on.
20301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20302  if test "x$test_shortpath" = x; then
20303    # Short path failed, file does not exist as specified.
20304    # Try adding .exe or .cmd
20305    if test -f "${new_path}.exe"; then
20306       input_to_shortpath="${new_path}.exe"
20307    elif test -f "${new_path}.cmd"; then
20308       input_to_shortpath="${new_path}.cmd"
20309    else
20310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20311$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20312      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20313$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20314      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20315    fi
20316  else
20317    input_to_shortpath="$new_path"
20318  fi
20319
20320  # Call helper function which possibly converts this using DOS-style short mode.
20321  # If so, the updated path is stored in $new_path.
20322  new_path="$input_to_shortpath"
20323
20324  input_path="$input_to_shortpath"
20325  # Check if we need to convert this using DOS-style short mode. If the path
20326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20327  # take no chances and rewrite it.
20328  # Note: m4 eats our [], so we need to use [ and ] instead.
20329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20330  if test "x$has_forbidden_chars" != x; then
20331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20335      # Going to short mode and back again did indeed matter. Since short mode is
20336      # case insensitive, let's make it lowercase to improve readability.
20337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20338      # Now convert it back to Unix-stile (cygpath)
20339      input_path=`$CYGPATH -u "$shortmode_path"`
20340      new_path="$input_path"
20341    fi
20342  fi
20343
20344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20345  if test "x$test_cygdrive_prefix" = x; then
20346    # As a simple fix, exclude /usr/bin since it's not a real path.
20347    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20349      # a path prefixed by /cygdrive for fixpath to work.
20350      new_path="$CYGWIN_ROOT_PATH$input_path"
20351    fi
20352  fi
20353
20354  # remove trailing .exe if any
20355  new_path="${new_path/%.exe/}"
20356
20357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20358
20359  # First separate the path from the arguments. This will split at the first
20360  # space.
20361  complete="$PROPER_COMPILER_CXX"
20362  path="${complete%% *}"
20363  tmp="$complete EOL"
20364  arguments="${tmp#* }"
20365
20366  # Input might be given as Windows format, start by converting to
20367  # unix format.
20368  new_path="$path"
20369
20370  windows_path="$new_path"
20371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20372    unix_path=`$CYGPATH -u "$windows_path"`
20373    new_path="$unix_path"
20374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20376    new_path="$unix_path"
20377  fi
20378
20379
20380  # Now try to locate executable using which
20381  new_path=`$WHICH "$new_path" 2> /dev/null`
20382
20383  if test "x$new_path" = x; then
20384    # Oops. Which didn't find the executable.
20385    # The splitting of arguments from the executable at a space might have been incorrect,
20386    # since paths with space are more likely in Windows. Give it another try with the whole
20387    # argument.
20388    path="$complete"
20389    arguments="EOL"
20390    new_path="$path"
20391
20392  windows_path="$new_path"
20393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20394    unix_path=`$CYGPATH -u "$windows_path"`
20395    new_path="$unix_path"
20396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20398    new_path="$unix_path"
20399  fi
20400
20401
20402    new_path=`$WHICH "$new_path" 2> /dev/null`
20403
20404    if test "x$new_path" = x; then
20405      # It's still not found. Now this is an unrecoverable error.
20406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20407$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20408      has_space=`$ECHO "$complete" | $GREP " "`
20409      if test "x$has_space" != x; then
20410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20412      fi
20413      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20414    fi
20415  fi
20416
20417  # Now new_path has a complete unix path to the binary
20418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20419    # Keep paths in /bin as-is, but remove trailing .exe if any
20420    new_path="${new_path/%.exe/}"
20421    # Do not save /bin paths to all_fixpath_prefixes!
20422  else
20423    # Not in mixed or Windows style, start by that.
20424    new_path=`cmd //c echo $new_path`
20425
20426  input_path="$new_path"
20427  # Check if we need to convert this using DOS-style short mode. If the path
20428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20429  # take no chances and rewrite it.
20430  # Note: m4 eats our [], so we need to use [ and ] instead.
20431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20432  if test "x$has_forbidden_chars" != x; then
20433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20435  fi
20436
20437    # Output is in $new_path
20438
20439  windows_path="$new_path"
20440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20441    unix_path=`$CYGPATH -u "$windows_path"`
20442    new_path="$unix_path"
20443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20445    new_path="$unix_path"
20446  fi
20447
20448    # remove trailing .exe if any
20449    new_path="${new_path/%.exe/}"
20450
20451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20453  fi
20454
20455  else
20456    # We're on a posix platform. Hooray! :)
20457    # First separate the path from the arguments. This will split at the first
20458    # space.
20459    complete="$PROPER_COMPILER_CXX"
20460    path="${complete%% *}"
20461    tmp="$complete EOL"
20462    arguments="${tmp#* }"
20463
20464    # Cannot rely on the command "which" here since it doesn't always work.
20465    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20466    if test -z "$is_absolute_path"; then
20467      # Path to executable is not absolute. Find it.
20468      IFS_save="$IFS"
20469      IFS=:
20470      for p in $PATH; do
20471        if test -f "$p/$path" && test -x "$p/$path"; then
20472          new_path="$p/$path"
20473          break
20474        fi
20475      done
20476      IFS="$IFS_save"
20477    else
20478      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20479$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20480      new_path="$path"
20481    fi
20482
20483    if test "x$new_path" = x; then
20484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20485$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20486        has_space=`$ECHO "$complete" | $GREP " "`
20487        if test "x$has_space" != x; then
20488          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20489$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20490        fi
20491        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20492      fi
20493  fi
20494
20495      # Now join together the path and the arguments once again
20496      if test "x$arguments" != xEOL; then
20497        new_complete="$new_path ${arguments% *}"
20498      else
20499        new_complete="$new_path"
20500      fi
20501
20502  if test "x$complete" != "x$new_complete"; then
20503      PROPER_COMPILER_CXX="$new_complete"
20504      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20505$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20506    fi
20507
20508    PATH="$RETRY_COMPILER_SAVED_PATH"
20509
20510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20511$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20512
20513    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20514        # Follow a chain of symbolic links. Use readlink
20515        # where it exists, else fall back to horribly
20516        # complicated shell code.
20517        if test "x$READLINK_TESTED" != yes; then
20518            # On MacOSX there is a readlink tool with a different
20519            # purpose than the GNU readlink tool. Check the found readlink.
20520            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20521            if test "x$ISGNU" = x; then
20522                 # A readlink that we do not know how to use.
20523                 # Are there other non-GNU readlinks out there?
20524                 READLINK_TESTED=yes
20525                 READLINK=
20526            fi
20527        fi
20528
20529        if test "x$READLINK" != x; then
20530            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20531        else
20532            # Save the current directory for restoring afterwards
20533            STARTDIR=$PWD
20534            COUNTER=0
20535            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20536            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20537            # Use the system pwd and not the shell builtin to resolve directory symlinks
20538            cd $sym_link_dir
20539            cd `$THEPWDCMD`
20540            sym_link_dir=`$THEPWDCMD`
20541            # Resolve file symlinks
20542            while test $COUNTER -lt 20; do
20543                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20544                if test "x$ISLINK" == x; then
20545                    # This is not a symbolic link! We are done!
20546                    break
20547                fi
20548                # Again resolve directory symlinks since the target of the just found
20549                # link could be in a different directory
20550                cd `$DIRNAME $ISLINK`
20551                sym_link_dir=`$THEPWDCMD`
20552                sym_link_file=`$BASENAME $ISLINK`
20553                let COUNTER=COUNTER+1
20554            done
20555            cd $STARTDIR
20556            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20557        fi
20558    fi
20559
20560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20561$as_echo "$PROPER_COMPILER_CXX" >&6; }
20562    CXX="$PROPER_COMPILER_CXX"
20563  else
20564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20565$as_echo "no, keeping CXX" >&6; }
20566    CXX="$TEST_COMPILER"
20567  fi
20568
20569  COMPILER=$CXX
20570  COMPILER_NAME=$COMPILER_NAME
20571
20572  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20573    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20574    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20575    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20576    if test $? -ne 0; then
20577      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20578
20579      { $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
20580$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20581      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20582$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20583      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20584    else
20585      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20586      COMPILER_VENDOR="Sun Studio"
20587    fi
20588  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20589    # First line typically looks something like:
20590    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20591    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20592    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20593    COMPILER_VENDOR="Microsoft CL.EXE"
20594    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20595    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20596      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20597        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20598      fi
20599    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20600      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20601        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20602      fi
20603    fi
20604  else
20605    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20606    # Check that this is likely to be GCC.
20607    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20608    if test $? -ne 0; then
20609      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20610$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20611      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20612$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20613      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20614    fi
20615
20616    # First line typically looks something like:
20617    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20618    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20619    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20620  fi
20621  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20622  CXX_VERSION="$COMPILER_VERSION"
20623  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20624  CXX_VENDOR="$COMPILER_VENDOR"
20625
20626  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20627$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20628
20629
20630# Now that we have resolved CXX ourself, let autoconf have it's go at it
20631ac_ext=cpp
20632ac_cpp='$CXXCPP $CPPFLAGS'
20633ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20634ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20635ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20636if test -z "$CXX"; then
20637  if test -n "$CCC"; then
20638    CXX=$CCC
20639  else
20640    if test -n "$ac_tool_prefix"; then
20641  for ac_prog in $CXX
20642  do
20643    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20644set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20646$as_echo_n "checking for $ac_word... " >&6; }
20647if ${ac_cv_prog_CXX+:} false; then :
20648  $as_echo_n "(cached) " >&6
20649else
20650  if test -n "$CXX"; then
20651  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20652else
20653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20654for as_dir in $PATH
20655do
20656  IFS=$as_save_IFS
20657  test -z "$as_dir" && as_dir=.
20658    for ac_exec_ext in '' $ac_executable_extensions; do
20659  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20660    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20662    break 2
20663  fi
20664done
20665  done
20666IFS=$as_save_IFS
20667
20668fi
20669fi
20670CXX=$ac_cv_prog_CXX
20671if test -n "$CXX"; then
20672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20673$as_echo "$CXX" >&6; }
20674else
20675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20676$as_echo "no" >&6; }
20677fi
20678
20679
20680    test -n "$CXX" && break
20681  done
20682fi
20683if test -z "$CXX"; then
20684  ac_ct_CXX=$CXX
20685  for ac_prog in $CXX
20686do
20687  # Extract the first word of "$ac_prog", so it can be a program name with args.
20688set dummy $ac_prog; ac_word=$2
20689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20690$as_echo_n "checking for $ac_word... " >&6; }
20691if ${ac_cv_prog_ac_ct_CXX+:} false; then :
20692  $as_echo_n "(cached) " >&6
20693else
20694  if test -n "$ac_ct_CXX"; then
20695  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20696else
20697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20698for as_dir in $PATH
20699do
20700  IFS=$as_save_IFS
20701  test -z "$as_dir" && as_dir=.
20702    for ac_exec_ext in '' $ac_executable_extensions; do
20703  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20704    ac_cv_prog_ac_ct_CXX="$ac_prog"
20705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20706    break 2
20707  fi
20708done
20709  done
20710IFS=$as_save_IFS
20711
20712fi
20713fi
20714ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20715if test -n "$ac_ct_CXX"; then
20716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20717$as_echo "$ac_ct_CXX" >&6; }
20718else
20719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20720$as_echo "no" >&6; }
20721fi
20722
20723
20724  test -n "$ac_ct_CXX" && break
20725done
20726
20727  if test "x$ac_ct_CXX" = x; then
20728    CXX="g++"
20729  else
20730    case $cross_compiling:$ac_tool_warned in
20731yes:)
20732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20734ac_tool_warned=yes ;;
20735esac
20736    CXX=$ac_ct_CXX
20737  fi
20738fi
20739
20740  fi
20741fi
20742# Provide some information about the compiler.
20743$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20744set X $ac_compile
20745ac_compiler=$2
20746for ac_option in --version -v -V -qversion; do
20747  { { ac_try="$ac_compiler $ac_option >&5"
20748case "(($ac_try" in
20749  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20750  *) ac_try_echo=$ac_try;;
20751esac
20752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20753$as_echo "$ac_try_echo"; } >&5
20754  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20755  ac_status=$?
20756  if test -s conftest.err; then
20757    sed '10a\
20758... rest of stderr output deleted ...
20759         10q' conftest.err >conftest.er1
20760    cat conftest.er1 >&5
20761  fi
20762  rm -f conftest.er1 conftest.err
20763  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20764  test $ac_status = 0; }
20765done
20766
20767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20768$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20769if ${ac_cv_cxx_compiler_gnu+:} false; then :
20770  $as_echo_n "(cached) " >&6
20771else
20772  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20773/* end confdefs.h.  */
20774
20775int
20776main ()
20777{
20778#ifndef __GNUC__
20779       choke me
20780#endif
20781
20782  ;
20783  return 0;
20784}
20785_ACEOF
20786if ac_fn_cxx_try_compile "$LINENO"; then :
20787  ac_compiler_gnu=yes
20788else
20789  ac_compiler_gnu=no
20790fi
20791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20792ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20793
20794fi
20795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20796$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20797if test $ac_compiler_gnu = yes; then
20798  GXX=yes
20799else
20800  GXX=
20801fi
20802ac_test_CXXFLAGS=${CXXFLAGS+set}
20803ac_save_CXXFLAGS=$CXXFLAGS
20804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20805$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20806if ${ac_cv_prog_cxx_g+:} false; then :
20807  $as_echo_n "(cached) " >&6
20808else
20809  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20810   ac_cxx_werror_flag=yes
20811   ac_cv_prog_cxx_g=no
20812   CXXFLAGS="-g"
20813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20814/* end confdefs.h.  */
20815
20816int
20817main ()
20818{
20819
20820  ;
20821  return 0;
20822}
20823_ACEOF
20824if ac_fn_cxx_try_compile "$LINENO"; then :
20825  ac_cv_prog_cxx_g=yes
20826else
20827  CXXFLAGS=""
20828      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20829/* end confdefs.h.  */
20830
20831int
20832main ()
20833{
20834
20835  ;
20836  return 0;
20837}
20838_ACEOF
20839if ac_fn_cxx_try_compile "$LINENO"; then :
20840
20841else
20842  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20843	 CXXFLAGS="-g"
20844	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20845/* end confdefs.h.  */
20846
20847int
20848main ()
20849{
20850
20851  ;
20852  return 0;
20853}
20854_ACEOF
20855if ac_fn_cxx_try_compile "$LINENO"; then :
20856  ac_cv_prog_cxx_g=yes
20857fi
20858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20859fi
20860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20861fi
20862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20863   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20864fi
20865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20866$as_echo "$ac_cv_prog_cxx_g" >&6; }
20867if test "$ac_test_CXXFLAGS" = set; then
20868  CXXFLAGS=$ac_save_CXXFLAGS
20869elif test $ac_cv_prog_cxx_g = yes; then
20870  if test "$GXX" = yes; then
20871    CXXFLAGS="-g -O2"
20872  else
20873    CXXFLAGS="-g"
20874  fi
20875else
20876  if test "$GXX" = yes; then
20877    CXXFLAGS="-O2"
20878  else
20879    CXXFLAGS=
20880  fi
20881fi
20882ac_ext=cpp
20883ac_cpp='$CXXCPP $CPPFLAGS'
20884ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20885ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20886ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20887
20888
20889### Locate other tools
20890
20891if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20892    ac_ext=m
20893ac_cpp='$OBJCPP $CPPFLAGS'
20894ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20895ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20896ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20897if test -n "$ac_tool_prefix"; then
20898  for ac_prog in gcc objcc objc cc CC
20899  do
20900    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20901set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20903$as_echo_n "checking for $ac_word... " >&6; }
20904if ${ac_cv_prog_OBJC+:} false; then :
20905  $as_echo_n "(cached) " >&6
20906else
20907  if test -n "$OBJC"; then
20908  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20909else
20910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20911for as_dir in $PATH
20912do
20913  IFS=$as_save_IFS
20914  test -z "$as_dir" && as_dir=.
20915    for ac_exec_ext in '' $ac_executable_extensions; do
20916  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20917    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20919    break 2
20920  fi
20921done
20922  done
20923IFS=$as_save_IFS
20924
20925fi
20926fi
20927OBJC=$ac_cv_prog_OBJC
20928if test -n "$OBJC"; then
20929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20930$as_echo "$OBJC" >&6; }
20931else
20932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20933$as_echo "no" >&6; }
20934fi
20935
20936
20937    test -n "$OBJC" && break
20938  done
20939fi
20940if test -z "$OBJC"; then
20941  ac_ct_OBJC=$OBJC
20942  for ac_prog in gcc objcc objc cc CC
20943do
20944  # Extract the first word of "$ac_prog", so it can be a program name with args.
20945set dummy $ac_prog; ac_word=$2
20946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20947$as_echo_n "checking for $ac_word... " >&6; }
20948if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
20949  $as_echo_n "(cached) " >&6
20950else
20951  if test -n "$ac_ct_OBJC"; then
20952  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20953else
20954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20955for as_dir in $PATH
20956do
20957  IFS=$as_save_IFS
20958  test -z "$as_dir" && as_dir=.
20959    for ac_exec_ext in '' $ac_executable_extensions; do
20960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20961    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20963    break 2
20964  fi
20965done
20966  done
20967IFS=$as_save_IFS
20968
20969fi
20970fi
20971ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20972if test -n "$ac_ct_OBJC"; then
20973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20974$as_echo "$ac_ct_OBJC" >&6; }
20975else
20976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20977$as_echo "no" >&6; }
20978fi
20979
20980
20981  test -n "$ac_ct_OBJC" && break
20982done
20983
20984  if test "x$ac_ct_OBJC" = x; then
20985    OBJC="gcc"
20986  else
20987    case $cross_compiling:$ac_tool_warned in
20988yes:)
20989{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20990$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20991ac_tool_warned=yes ;;
20992esac
20993    OBJC=$ac_ct_OBJC
20994  fi
20995fi
20996
20997# Provide some information about the compiler.
20998$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20999set X $ac_compile
21000ac_compiler=$2
21001for ac_option in --version -v -V -qversion; do
21002  { { ac_try="$ac_compiler $ac_option >&5"
21003case "(($ac_try" in
21004  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21005  *) ac_try_echo=$ac_try;;
21006esac
21007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21008$as_echo "$ac_try_echo"; } >&5
21009  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21010  ac_status=$?
21011  if test -s conftest.err; then
21012    sed '10a\
21013... rest of stderr output deleted ...
21014         10q' conftest.err >conftest.er1
21015    cat conftest.er1 >&5
21016  fi
21017  rm -f conftest.er1 conftest.err
21018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21019  test $ac_status = 0; }
21020done
21021
21022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21023$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21024if ${ac_cv_objc_compiler_gnu+:} false; then :
21025  $as_echo_n "(cached) " >&6
21026else
21027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21028/* end confdefs.h.  */
21029
21030int
21031main ()
21032{
21033#ifndef __GNUC__
21034       choke me
21035#endif
21036
21037  ;
21038  return 0;
21039}
21040_ACEOF
21041if ac_fn_objc_try_compile "$LINENO"; then :
21042  ac_compiler_gnu=yes
21043else
21044  ac_compiler_gnu=no
21045fi
21046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21047ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21048
21049fi
21050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21051$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21052if test $ac_compiler_gnu = yes; then
21053  GOBJC=yes
21054else
21055  GOBJC=
21056fi
21057ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21058ac_save_OBJCFLAGS=$OBJCFLAGS
21059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21060$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21061if ${ac_cv_prog_objc_g+:} false; then :
21062  $as_echo_n "(cached) " >&6
21063else
21064  ac_save_objc_werror_flag=$ac_objc_werror_flag
21065   ac_objc_werror_flag=yes
21066   ac_cv_prog_objc_g=no
21067   OBJCFLAGS="-g"
21068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21069/* end confdefs.h.  */
21070
21071int
21072main ()
21073{
21074
21075  ;
21076  return 0;
21077}
21078_ACEOF
21079if ac_fn_objc_try_compile "$LINENO"; then :
21080  ac_cv_prog_objc_g=yes
21081else
21082  OBJCFLAGS=""
21083      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21084/* end confdefs.h.  */
21085
21086int
21087main ()
21088{
21089
21090  ;
21091  return 0;
21092}
21093_ACEOF
21094if ac_fn_objc_try_compile "$LINENO"; then :
21095
21096else
21097  ac_objc_werror_flag=$ac_save_objc_werror_flag
21098	 OBJCFLAGS="-g"
21099	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21100/* end confdefs.h.  */
21101
21102int
21103main ()
21104{
21105
21106  ;
21107  return 0;
21108}
21109_ACEOF
21110if ac_fn_objc_try_compile "$LINENO"; then :
21111  ac_cv_prog_objc_g=yes
21112fi
21113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21114fi
21115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21116fi
21117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21118   ac_objc_werror_flag=$ac_save_objc_werror_flag
21119fi
21120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21121$as_echo "$ac_cv_prog_objc_g" >&6; }
21122if test "$ac_test_OBJCFLAGS" = set; then
21123  OBJCFLAGS=$ac_save_OBJCFLAGS
21124elif test $ac_cv_prog_objc_g = yes; then
21125  if test "$GOBJC" = yes; then
21126    OBJCFLAGS="-g -O2"
21127  else
21128    OBJCFLAGS="-g"
21129  fi
21130else
21131  if test "$GOBJC" = yes; then
21132    OBJCFLAGS="-O2"
21133  else
21134    OBJCFLAGS=
21135  fi
21136fi
21137ac_ext=cpp
21138ac_cpp='$CXXCPP $CPPFLAGS'
21139ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21140ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21141ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21142
21143
21144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21145
21146  # First separate the path from the arguments. This will split at the first
21147  # space.
21148  complete="$OBJC"
21149  path="${complete%% *}"
21150  tmp="$complete EOL"
21151  arguments="${tmp#* }"
21152
21153  # Input might be given as Windows format, start by converting to
21154  # unix format.
21155  new_path=`$CYGPATH -u "$path"`
21156
21157  # Now try to locate executable using which
21158  new_path=`$WHICH "$new_path" 2> /dev/null`
21159  # bat and cmd files are not always considered executable in cygwin causing which
21160  # to not find them
21161  if test "x$new_path" = x \
21162           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21163           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21164    new_path=`$CYGPATH -u "$path"`
21165  fi
21166  if test "x$new_path" = x; then
21167    # Oops. Which didn't find the executable.
21168    # The splitting of arguments from the executable at a space might have been incorrect,
21169    # since paths with space are more likely in Windows. Give it another try with the whole
21170    # argument.
21171    path="$complete"
21172    arguments="EOL"
21173    new_path=`$CYGPATH -u "$path"`
21174    new_path=`$WHICH "$new_path" 2> /dev/null`
21175    # bat and cmd files are not always considered executable in cygwin causing which
21176    # to not find them
21177    if test "x$new_path" = x \
21178             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21179             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21180      new_path=`$CYGPATH -u "$path"`
21181    fi
21182    if test "x$new_path" = x; then
21183      # It's still not found. Now this is an unrecoverable error.
21184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21185$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21186      has_space=`$ECHO "$complete" | $GREP " "`
21187      if test "x$has_space" != x; then
21188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21190      fi
21191      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21192    fi
21193  fi
21194
21195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21198  # "foo.exe" is OK but "foo" is an error.
21199  #
21200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21201  # It is also a way to make sure we got the proper file name for the real test later on.
21202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21203  if test "x$test_shortpath" = x; then
21204    # Short path failed, file does not exist as specified.
21205    # Try adding .exe or .cmd
21206    if test -f "${new_path}.exe"; then
21207       input_to_shortpath="${new_path}.exe"
21208    elif test -f "${new_path}.cmd"; then
21209       input_to_shortpath="${new_path}.cmd"
21210    else
21211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21212$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21213      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21214$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21215      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21216    fi
21217  else
21218    input_to_shortpath="$new_path"
21219  fi
21220
21221  # Call helper function which possibly converts this using DOS-style short mode.
21222  # If so, the updated path is stored in $new_path.
21223  new_path="$input_to_shortpath"
21224
21225  input_path="$input_to_shortpath"
21226  # Check if we need to convert this using DOS-style short mode. If the path
21227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21228  # take no chances and rewrite it.
21229  # Note: m4 eats our [], so we need to use [ and ] instead.
21230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21231  if test "x$has_forbidden_chars" != x; then
21232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21236      # Going to short mode and back again did indeed matter. Since short mode is
21237      # case insensitive, let's make it lowercase to improve readability.
21238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21239      # Now convert it back to Unix-stile (cygpath)
21240      input_path=`$CYGPATH -u "$shortmode_path"`
21241      new_path="$input_path"
21242    fi
21243  fi
21244
21245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21246  if test "x$test_cygdrive_prefix" = x; then
21247    # As a simple fix, exclude /usr/bin since it's not a real path.
21248    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21250      # a path prefixed by /cygdrive for fixpath to work.
21251      new_path="$CYGWIN_ROOT_PATH$input_path"
21252    fi
21253  fi
21254
21255  # remove trailing .exe if any
21256  new_path="${new_path/%.exe/}"
21257
21258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21259
21260  # First separate the path from the arguments. This will split at the first
21261  # space.
21262  complete="$OBJC"
21263  path="${complete%% *}"
21264  tmp="$complete EOL"
21265  arguments="${tmp#* }"
21266
21267  # Input might be given as Windows format, start by converting to
21268  # unix format.
21269  new_path="$path"
21270
21271  windows_path="$new_path"
21272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21273    unix_path=`$CYGPATH -u "$windows_path"`
21274    new_path="$unix_path"
21275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21277    new_path="$unix_path"
21278  fi
21279
21280
21281  # Now try to locate executable using which
21282  new_path=`$WHICH "$new_path" 2> /dev/null`
21283
21284  if test "x$new_path" = x; then
21285    # Oops. Which didn't find the executable.
21286    # The splitting of arguments from the executable at a space might have been incorrect,
21287    # since paths with space are more likely in Windows. Give it another try with the whole
21288    # argument.
21289    path="$complete"
21290    arguments="EOL"
21291    new_path="$path"
21292
21293  windows_path="$new_path"
21294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21295    unix_path=`$CYGPATH -u "$windows_path"`
21296    new_path="$unix_path"
21297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21299    new_path="$unix_path"
21300  fi
21301
21302
21303    new_path=`$WHICH "$new_path" 2> /dev/null`
21304
21305    if test "x$new_path" = x; then
21306      # It's still not found. Now this is an unrecoverable error.
21307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21308$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21309      has_space=`$ECHO "$complete" | $GREP " "`
21310      if test "x$has_space" != x; then
21311        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21312$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21313      fi
21314      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21315    fi
21316  fi
21317
21318  # Now new_path has a complete unix path to the binary
21319  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21320    # Keep paths in /bin as-is, but remove trailing .exe if any
21321    new_path="${new_path/%.exe/}"
21322    # Do not save /bin paths to all_fixpath_prefixes!
21323  else
21324    # Not in mixed or Windows style, start by that.
21325    new_path=`cmd //c echo $new_path`
21326
21327  input_path="$new_path"
21328  # Check if we need to convert this using DOS-style short mode. If the path
21329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21330  # take no chances and rewrite it.
21331  # Note: m4 eats our [], so we need to use [ and ] instead.
21332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21333  if test "x$has_forbidden_chars" != x; then
21334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21336  fi
21337
21338    # Output is in $new_path
21339
21340  windows_path="$new_path"
21341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21342    unix_path=`$CYGPATH -u "$windows_path"`
21343    new_path="$unix_path"
21344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21346    new_path="$unix_path"
21347  fi
21348
21349    # remove trailing .exe if any
21350    new_path="${new_path/%.exe/}"
21351
21352    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21353    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21354  fi
21355
21356  else
21357    # We're on a posix platform. Hooray! :)
21358    # First separate the path from the arguments. This will split at the first
21359    # space.
21360    complete="$OBJC"
21361    path="${complete%% *}"
21362    tmp="$complete EOL"
21363    arguments="${tmp#* }"
21364
21365    # Cannot rely on the command "which" here since it doesn't always work.
21366    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21367    if test -z "$is_absolute_path"; then
21368      # Path to executable is not absolute. Find it.
21369      IFS_save="$IFS"
21370      IFS=:
21371      for p in $PATH; do
21372        if test -f "$p/$path" && test -x "$p/$path"; then
21373          new_path="$p/$path"
21374          break
21375        fi
21376      done
21377      IFS="$IFS_save"
21378    else
21379      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21380$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21381      new_path="$path"
21382    fi
21383
21384    if test "x$new_path" = x; then
21385        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21386$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21387        has_space=`$ECHO "$complete" | $GREP " "`
21388        if test "x$has_space" != x; then
21389          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21390$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21391        fi
21392        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21393      fi
21394  fi
21395
21396      # Now join together the path and the arguments once again
21397      if test "x$arguments" != xEOL; then
21398        new_complete="$new_path ${arguments% *}"
21399      else
21400        new_complete="$new_path"
21401      fi
21402
21403  if test "x$complete" != "x$new_complete"; then
21404      OBJC="$new_complete"
21405      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21406$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21407    fi
21408
21409else
21410    OBJC=
21411fi
21412
21413# Restore the flags to the user specified values.
21414# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21415CFLAGS="$ORG_CFLAGS"
21416CXXFLAGS="$ORG_CXXFLAGS"
21417OBJCFLAGS="$ORG_OBJCFLAGS"
21418
21419LD="$CC"
21420LDEXE="$CC"
21421LDCXX="$CXX"
21422LDEXECXX="$CXX"
21423
21424# LDEXE is the linker to use, when creating executables.
21425
21426# Linking C++ libraries.
21427
21428# Linking C++ executables.
21429
21430
21431if test "x$OPENJDK_TARGET_OS" != xwindows; then
21432    if test -n "$ac_tool_prefix"; then
21433  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21434set dummy ${ac_tool_prefix}ar; ac_word=$2
21435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21436$as_echo_n "checking for $ac_word... " >&6; }
21437if ${ac_cv_prog_AR+:} false; then :
21438  $as_echo_n "(cached) " >&6
21439else
21440  if test -n "$AR"; then
21441  ac_cv_prog_AR="$AR" # Let the user override the test.
21442else
21443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21444for as_dir in $PATH
21445do
21446  IFS=$as_save_IFS
21447  test -z "$as_dir" && as_dir=.
21448    for ac_exec_ext in '' $ac_executable_extensions; do
21449  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21450    ac_cv_prog_AR="${ac_tool_prefix}ar"
21451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21452    break 2
21453  fi
21454done
21455  done
21456IFS=$as_save_IFS
21457
21458fi
21459fi
21460AR=$ac_cv_prog_AR
21461if test -n "$AR"; then
21462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21463$as_echo "$AR" >&6; }
21464else
21465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21466$as_echo "no" >&6; }
21467fi
21468
21469
21470fi
21471if test -z "$ac_cv_prog_AR"; then
21472  ac_ct_AR=$AR
21473  # Extract the first word of "ar", so it can be a program name with args.
21474set dummy ar; ac_word=$2
21475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21476$as_echo_n "checking for $ac_word... " >&6; }
21477if ${ac_cv_prog_ac_ct_AR+:} false; then :
21478  $as_echo_n "(cached) " >&6
21479else
21480  if test -n "$ac_ct_AR"; then
21481  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21482else
21483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21484for as_dir in $PATH
21485do
21486  IFS=$as_save_IFS
21487  test -z "$as_dir" && as_dir=.
21488    for ac_exec_ext in '' $ac_executable_extensions; do
21489  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21490    ac_cv_prog_ac_ct_AR="ar"
21491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21492    break 2
21493  fi
21494done
21495  done
21496IFS=$as_save_IFS
21497
21498fi
21499fi
21500ac_ct_AR=$ac_cv_prog_ac_ct_AR
21501if test -n "$ac_ct_AR"; then
21502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21503$as_echo "$ac_ct_AR" >&6; }
21504else
21505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21506$as_echo "no" >&6; }
21507fi
21508
21509  if test "x$ac_ct_AR" = x; then
21510    AR=""
21511  else
21512    case $cross_compiling:$ac_tool_warned in
21513yes:)
21514{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21515$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21516ac_tool_warned=yes ;;
21517esac
21518    AR=$ac_ct_AR
21519  fi
21520else
21521  AR="$ac_cv_prog_AR"
21522fi
21523
21524
21525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21526
21527  # First separate the path from the arguments. This will split at the first
21528  # space.
21529  complete="$AR"
21530  path="${complete%% *}"
21531  tmp="$complete EOL"
21532  arguments="${tmp#* }"
21533
21534  # Input might be given as Windows format, start by converting to
21535  # unix format.
21536  new_path=`$CYGPATH -u "$path"`
21537
21538  # Now try to locate executable using which
21539  new_path=`$WHICH "$new_path" 2> /dev/null`
21540  # bat and cmd files are not always considered executable in cygwin causing which
21541  # to not find them
21542  if test "x$new_path" = x \
21543           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21544           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21545    new_path=`$CYGPATH -u "$path"`
21546  fi
21547  if test "x$new_path" = x; then
21548    # Oops. Which didn't find the executable.
21549    # The splitting of arguments from the executable at a space might have been incorrect,
21550    # since paths with space are more likely in Windows. Give it another try with the whole
21551    # argument.
21552    path="$complete"
21553    arguments="EOL"
21554    new_path=`$CYGPATH -u "$path"`
21555    new_path=`$WHICH "$new_path" 2> /dev/null`
21556    # bat and cmd files are not always considered executable in cygwin causing which
21557    # to not find them
21558    if test "x$new_path" = x \
21559             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21560             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21561      new_path=`$CYGPATH -u "$path"`
21562    fi
21563    if test "x$new_path" = x; then
21564      # It's still not found. Now this is an unrecoverable error.
21565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21566$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21567      has_space=`$ECHO "$complete" | $GREP " "`
21568      if test "x$has_space" != x; then
21569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21571      fi
21572      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21573    fi
21574  fi
21575
21576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21579  # "foo.exe" is OK but "foo" is an error.
21580  #
21581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21582  # It is also a way to make sure we got the proper file name for the real test later on.
21583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21584  if test "x$test_shortpath" = x; then
21585    # Short path failed, file does not exist as specified.
21586    # Try adding .exe or .cmd
21587    if test -f "${new_path}.exe"; then
21588       input_to_shortpath="${new_path}.exe"
21589    elif test -f "${new_path}.cmd"; then
21590       input_to_shortpath="${new_path}.cmd"
21591    else
21592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21593$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21594      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21595$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21596      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21597    fi
21598  else
21599    input_to_shortpath="$new_path"
21600  fi
21601
21602  # Call helper function which possibly converts this using DOS-style short mode.
21603  # If so, the updated path is stored in $new_path.
21604  new_path="$input_to_shortpath"
21605
21606  input_path="$input_to_shortpath"
21607  # Check if we need to convert this using DOS-style short mode. If the path
21608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21609  # take no chances and rewrite it.
21610  # Note: m4 eats our [], so we need to use [ and ] instead.
21611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21612  if test "x$has_forbidden_chars" != x; then
21613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21617      # Going to short mode and back again did indeed matter. Since short mode is
21618      # case insensitive, let's make it lowercase to improve readability.
21619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21620      # Now convert it back to Unix-stile (cygpath)
21621      input_path=`$CYGPATH -u "$shortmode_path"`
21622      new_path="$input_path"
21623    fi
21624  fi
21625
21626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21627  if test "x$test_cygdrive_prefix" = x; then
21628    # As a simple fix, exclude /usr/bin since it's not a real path.
21629    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21631      # a path prefixed by /cygdrive for fixpath to work.
21632      new_path="$CYGWIN_ROOT_PATH$input_path"
21633    fi
21634  fi
21635
21636  # remove trailing .exe if any
21637  new_path="${new_path/%.exe/}"
21638
21639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21640
21641  # First separate the path from the arguments. This will split at the first
21642  # space.
21643  complete="$AR"
21644  path="${complete%% *}"
21645  tmp="$complete EOL"
21646  arguments="${tmp#* }"
21647
21648  # Input might be given as Windows format, start by converting to
21649  # unix format.
21650  new_path="$path"
21651
21652  windows_path="$new_path"
21653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21654    unix_path=`$CYGPATH -u "$windows_path"`
21655    new_path="$unix_path"
21656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21658    new_path="$unix_path"
21659  fi
21660
21661
21662  # Now try to locate executable using which
21663  new_path=`$WHICH "$new_path" 2> /dev/null`
21664
21665  if test "x$new_path" = x; then
21666    # Oops. Which didn't find the executable.
21667    # The splitting of arguments from the executable at a space might have been incorrect,
21668    # since paths with space are more likely in Windows. Give it another try with the whole
21669    # argument.
21670    path="$complete"
21671    arguments="EOL"
21672    new_path="$path"
21673
21674  windows_path="$new_path"
21675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21676    unix_path=`$CYGPATH -u "$windows_path"`
21677    new_path="$unix_path"
21678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21680    new_path="$unix_path"
21681  fi
21682
21683
21684    new_path=`$WHICH "$new_path" 2> /dev/null`
21685
21686    if test "x$new_path" = x; then
21687      # It's still not found. Now this is an unrecoverable error.
21688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21689$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21690      has_space=`$ECHO "$complete" | $GREP " "`
21691      if test "x$has_space" != x; then
21692        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21693$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21694      fi
21695      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21696    fi
21697  fi
21698
21699  # Now new_path has a complete unix path to the binary
21700  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21701    # Keep paths in /bin as-is, but remove trailing .exe if any
21702    new_path="${new_path/%.exe/}"
21703    # Do not save /bin paths to all_fixpath_prefixes!
21704  else
21705    # Not in mixed or Windows style, start by that.
21706    new_path=`cmd //c echo $new_path`
21707
21708  input_path="$new_path"
21709  # Check if we need to convert this using DOS-style short mode. If the path
21710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21711  # take no chances and rewrite it.
21712  # Note: m4 eats our [], so we need to use [ and ] instead.
21713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21714  if test "x$has_forbidden_chars" != x; then
21715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21717  fi
21718
21719    # Output is in $new_path
21720
21721  windows_path="$new_path"
21722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21723    unix_path=`$CYGPATH -u "$windows_path"`
21724    new_path="$unix_path"
21725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21727    new_path="$unix_path"
21728  fi
21729
21730    # remove trailing .exe if any
21731    new_path="${new_path/%.exe/}"
21732
21733    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21734    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21735  fi
21736
21737  else
21738    # We're on a posix platform. Hooray! :)
21739    # First separate the path from the arguments. This will split at the first
21740    # space.
21741    complete="$AR"
21742    path="${complete%% *}"
21743    tmp="$complete EOL"
21744    arguments="${tmp#* }"
21745
21746    # Cannot rely on the command "which" here since it doesn't always work.
21747    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21748    if test -z "$is_absolute_path"; then
21749      # Path to executable is not absolute. Find it.
21750      IFS_save="$IFS"
21751      IFS=:
21752      for p in $PATH; do
21753        if test -f "$p/$path" && test -x "$p/$path"; then
21754          new_path="$p/$path"
21755          break
21756        fi
21757      done
21758      IFS="$IFS_save"
21759    else
21760      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21761$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21762      new_path="$path"
21763    fi
21764
21765    if test "x$new_path" = x; then
21766        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21767$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21768        has_space=`$ECHO "$complete" | $GREP " "`
21769        if test "x$has_space" != x; then
21770          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21771$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21772        fi
21773        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21774      fi
21775  fi
21776
21777      # Now join together the path and the arguments once again
21778      if test "x$arguments" != xEOL; then
21779        new_complete="$new_path ${arguments% *}"
21780      else
21781        new_complete="$new_path"
21782      fi
21783
21784  if test "x$complete" != "x$new_complete"; then
21785      AR="$new_complete"
21786      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21787$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21788    fi
21789
21790fi
21791if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21792    ARFLAGS="-r"
21793else
21794    ARFLAGS=""
21795fi
21796
21797
21798# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21799HOTSPOT_CXX="$CXX"
21800HOTSPOT_LD="$LD"
21801
21802
21803
21804COMPILER_NAME=gcc
21805COMPILER_TYPE=CC
21806if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21807
21808    # For now, assume that we are always compiling using cl.exe.
21809    CC_OUT_OPTION=-Fo
21810    EXE_OUT_OPTION=-out:
21811    LD_OUT_OPTION=-out:
21812    AR_OUT_OPTION=-out:
21813    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21814    # program for something completely different.
21815    # Extract the first word of "link", so it can be a program name with args.
21816set dummy link; ac_word=$2
21817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21818$as_echo_n "checking for $ac_word... " >&6; }
21819if ${ac_cv_prog_WINLD+:} false; then :
21820  $as_echo_n "(cached) " >&6
21821else
21822  if test -n "$WINLD"; then
21823  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21824else
21825  ac_prog_rejected=no
21826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21827for as_dir in $PATH
21828do
21829  IFS=$as_save_IFS
21830  test -z "$as_dir" && as_dir=.
21831    for ac_exec_ext in '' $ac_executable_extensions; do
21832  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21833    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21834       ac_prog_rejected=yes
21835       continue
21836     fi
21837    ac_cv_prog_WINLD="link"
21838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21839    break 2
21840  fi
21841done
21842  done
21843IFS=$as_save_IFS
21844
21845if test $ac_prog_rejected = yes; then
21846  # We found a bogon in the path, so make sure we never use it.
21847  set dummy $ac_cv_prog_WINLD
21848  shift
21849  if test $# != 0; then
21850    # We chose a different compiler from the bogus one.
21851    # However, it has the same basename, so the bogon will be chosen
21852    # first if we set WINLD to just the basename; use the full file name.
21853    shift
21854    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21855  fi
21856fi
21857fi
21858fi
21859WINLD=$ac_cv_prog_WINLD
21860if test -n "$WINLD"; then
21861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21862$as_echo "$WINLD" >&6; }
21863else
21864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21865$as_echo "no" >&6; }
21866fi
21867
21868
21869    # Since we must ignore the first found link, WINLD will contain
21870    # the full path to the link.exe program.
21871
21872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21873
21874  # First separate the path from the arguments. This will split at the first
21875  # space.
21876  complete="$WINLD"
21877  path="${complete%% *}"
21878  tmp="$complete EOL"
21879  arguments="${tmp#* }"
21880
21881  # Input might be given as Windows format, start by converting to
21882  # unix format.
21883  new_path=`$CYGPATH -u "$path"`
21884
21885  # Now try to locate executable using which
21886  new_path=`$WHICH "$new_path" 2> /dev/null`
21887  # bat and cmd files are not always considered executable in cygwin causing which
21888  # to not find them
21889  if test "x$new_path" = x \
21890           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21891           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21892    new_path=`$CYGPATH -u "$path"`
21893  fi
21894  if test "x$new_path" = x; then
21895    # Oops. Which didn't find the executable.
21896    # The splitting of arguments from the executable at a space might have been incorrect,
21897    # since paths with space are more likely in Windows. Give it another try with the whole
21898    # argument.
21899    path="$complete"
21900    arguments="EOL"
21901    new_path=`$CYGPATH -u "$path"`
21902    new_path=`$WHICH "$new_path" 2> /dev/null`
21903    # bat and cmd files are not always considered executable in cygwin causing which
21904    # to not find them
21905    if test "x$new_path" = x \
21906             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21907             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21908      new_path=`$CYGPATH -u "$path"`
21909    fi
21910    if test "x$new_path" = x; then
21911      # It's still not found. Now this is an unrecoverable error.
21912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21913$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21914      has_space=`$ECHO "$complete" | $GREP " "`
21915      if test "x$has_space" != x; then
21916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21918      fi
21919      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21920    fi
21921  fi
21922
21923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21926  # "foo.exe" is OK but "foo" is an error.
21927  #
21928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21929  # It is also a way to make sure we got the proper file name for the real test later on.
21930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21931  if test "x$test_shortpath" = x; then
21932    # Short path failed, file does not exist as specified.
21933    # Try adding .exe or .cmd
21934    if test -f "${new_path}.exe"; then
21935       input_to_shortpath="${new_path}.exe"
21936    elif test -f "${new_path}.cmd"; then
21937       input_to_shortpath="${new_path}.cmd"
21938    else
21939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21940$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21941      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21942$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21943      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21944    fi
21945  else
21946    input_to_shortpath="$new_path"
21947  fi
21948
21949  # Call helper function which possibly converts this using DOS-style short mode.
21950  # If so, the updated path is stored in $new_path.
21951  new_path="$input_to_shortpath"
21952
21953  input_path="$input_to_shortpath"
21954  # Check if we need to convert this using DOS-style short mode. If the path
21955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21956  # take no chances and rewrite it.
21957  # Note: m4 eats our [], so we need to use [ and ] instead.
21958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21959  if test "x$has_forbidden_chars" != x; then
21960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21964      # Going to short mode and back again did indeed matter. Since short mode is
21965      # case insensitive, let's make it lowercase to improve readability.
21966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21967      # Now convert it back to Unix-stile (cygpath)
21968      input_path=`$CYGPATH -u "$shortmode_path"`
21969      new_path="$input_path"
21970    fi
21971  fi
21972
21973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21974  if test "x$test_cygdrive_prefix" = x; then
21975    # As a simple fix, exclude /usr/bin since it's not a real path.
21976    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21978      # a path prefixed by /cygdrive for fixpath to work.
21979      new_path="$CYGWIN_ROOT_PATH$input_path"
21980    fi
21981  fi
21982
21983  # remove trailing .exe if any
21984  new_path="${new_path/%.exe/}"
21985
21986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21987
21988  # First separate the path from the arguments. This will split at the first
21989  # space.
21990  complete="$WINLD"
21991  path="${complete%% *}"
21992  tmp="$complete EOL"
21993  arguments="${tmp#* }"
21994
21995  # Input might be given as Windows format, start by converting to
21996  # unix format.
21997  new_path="$path"
21998
21999  windows_path="$new_path"
22000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22001    unix_path=`$CYGPATH -u "$windows_path"`
22002    new_path="$unix_path"
22003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22005    new_path="$unix_path"
22006  fi
22007
22008
22009  # Now try to locate executable using which
22010  new_path=`$WHICH "$new_path" 2> /dev/null`
22011
22012  if test "x$new_path" = x; then
22013    # Oops. Which didn't find the executable.
22014    # The splitting of arguments from the executable at a space might have been incorrect,
22015    # since paths with space are more likely in Windows. Give it another try with the whole
22016    # argument.
22017    path="$complete"
22018    arguments="EOL"
22019    new_path="$path"
22020
22021  windows_path="$new_path"
22022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22023    unix_path=`$CYGPATH -u "$windows_path"`
22024    new_path="$unix_path"
22025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22027    new_path="$unix_path"
22028  fi
22029
22030
22031    new_path=`$WHICH "$new_path" 2> /dev/null`
22032
22033    if test "x$new_path" = x; then
22034      # It's still not found. Now this is an unrecoverable error.
22035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22036$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22037      has_space=`$ECHO "$complete" | $GREP " "`
22038      if test "x$has_space" != x; then
22039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22041      fi
22042      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22043    fi
22044  fi
22045
22046  # Now new_path has a complete unix path to the binary
22047  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22048    # Keep paths in /bin as-is, but remove trailing .exe if any
22049    new_path="${new_path/%.exe/}"
22050    # Do not save /bin paths to all_fixpath_prefixes!
22051  else
22052    # Not in mixed or Windows style, start by that.
22053    new_path=`cmd //c echo $new_path`
22054
22055  input_path="$new_path"
22056  # Check if we need to convert this using DOS-style short mode. If the path
22057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22058  # take no chances and rewrite it.
22059  # Note: m4 eats our [], so we need to use [ and ] instead.
22060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22061  if test "x$has_forbidden_chars" != x; then
22062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22064  fi
22065
22066    # Output is in $new_path
22067
22068  windows_path="$new_path"
22069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22070    unix_path=`$CYGPATH -u "$windows_path"`
22071    new_path="$unix_path"
22072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22074    new_path="$unix_path"
22075  fi
22076
22077    # remove trailing .exe if any
22078    new_path="${new_path/%.exe/}"
22079
22080    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22081    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22082  fi
22083
22084  else
22085    # We're on a posix platform. Hooray! :)
22086    # First separate the path from the arguments. This will split at the first
22087    # space.
22088    complete="$WINLD"
22089    path="${complete%% *}"
22090    tmp="$complete EOL"
22091    arguments="${tmp#* }"
22092
22093    # Cannot rely on the command "which" here since it doesn't always work.
22094    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22095    if test -z "$is_absolute_path"; then
22096      # Path to executable is not absolute. Find it.
22097      IFS_save="$IFS"
22098      IFS=:
22099      for p in $PATH; do
22100        if test -f "$p/$path" && test -x "$p/$path"; then
22101          new_path="$p/$path"
22102          break
22103        fi
22104      done
22105      IFS="$IFS_save"
22106    else
22107      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22108$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22109      new_path="$path"
22110    fi
22111
22112    if test "x$new_path" = x; then
22113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22114$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22115        has_space=`$ECHO "$complete" | $GREP " "`
22116        if test "x$has_space" != x; then
22117          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22119        fi
22120        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22121      fi
22122  fi
22123
22124      # Now join together the path and the arguments once again
22125      if test "x$arguments" != xEOL; then
22126        new_complete="$new_path ${arguments% *}"
22127      else
22128        new_complete="$new_path"
22129      fi
22130
22131  if test "x$complete" != "x$new_complete"; then
22132      WINLD="$new_complete"
22133      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22134$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22135    fi
22136
22137    printf "Windows linker was found at $WINLD\n"
22138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22139$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22140    "$WINLD" --version > /dev/null
22141    if test $? -eq 0 ; then
22142      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22143$as_echo "no" >&6; }
22144      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22145    else
22146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22147$as_echo "yes" >&6; }
22148    fi
22149    LD="$WINLD"
22150    LDEXE="$WINLD"
22151    LDCXX="$WINLD"
22152    LDEXECXX="$WINLD"
22153
22154    # Extract the first word of "mt", so it can be a program name with args.
22155set dummy mt; ac_word=$2
22156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22157$as_echo_n "checking for $ac_word... " >&6; }
22158if ${ac_cv_prog_MT+:} false; then :
22159  $as_echo_n "(cached) " >&6
22160else
22161  if test -n "$MT"; then
22162  ac_cv_prog_MT="$MT" # Let the user override the test.
22163else
22164  ac_prog_rejected=no
22165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22166for as_dir in $PATH
22167do
22168  IFS=$as_save_IFS
22169  test -z "$as_dir" && as_dir=.
22170    for ac_exec_ext in '' $ac_executable_extensions; do
22171  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22172    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22173       ac_prog_rejected=yes
22174       continue
22175     fi
22176    ac_cv_prog_MT="mt"
22177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22178    break 2
22179  fi
22180done
22181  done
22182IFS=$as_save_IFS
22183
22184if test $ac_prog_rejected = yes; then
22185  # We found a bogon in the path, so make sure we never use it.
22186  set dummy $ac_cv_prog_MT
22187  shift
22188  if test $# != 0; then
22189    # We chose a different compiler from the bogus one.
22190    # However, it has the same basename, so the bogon will be chosen
22191    # first if we set MT to just the basename; use the full file name.
22192    shift
22193    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22194  fi
22195fi
22196fi
22197fi
22198MT=$ac_cv_prog_MT
22199if test -n "$MT"; then
22200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22201$as_echo "$MT" >&6; }
22202else
22203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22204$as_echo "no" >&6; }
22205fi
22206
22207
22208
22209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22210
22211  # First separate the path from the arguments. This will split at the first
22212  # space.
22213  complete="$MT"
22214  path="${complete%% *}"
22215  tmp="$complete EOL"
22216  arguments="${tmp#* }"
22217
22218  # Input might be given as Windows format, start by converting to
22219  # unix format.
22220  new_path=`$CYGPATH -u "$path"`
22221
22222  # Now try to locate executable using which
22223  new_path=`$WHICH "$new_path" 2> /dev/null`
22224  # bat and cmd files are not always considered executable in cygwin causing which
22225  # to not find them
22226  if test "x$new_path" = x \
22227           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22228           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22229    new_path=`$CYGPATH -u "$path"`
22230  fi
22231  if test "x$new_path" = x; then
22232    # Oops. Which didn't find the executable.
22233    # The splitting of arguments from the executable at a space might have been incorrect,
22234    # since paths with space are more likely in Windows. Give it another try with the whole
22235    # argument.
22236    path="$complete"
22237    arguments="EOL"
22238    new_path=`$CYGPATH -u "$path"`
22239    new_path=`$WHICH "$new_path" 2> /dev/null`
22240    # bat and cmd files are not always considered executable in cygwin causing which
22241    # to not find them
22242    if test "x$new_path" = x \
22243             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22244             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22245      new_path=`$CYGPATH -u "$path"`
22246    fi
22247    if test "x$new_path" = x; then
22248      # It's still not found. Now this is an unrecoverable error.
22249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22250$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22251      has_space=`$ECHO "$complete" | $GREP " "`
22252      if test "x$has_space" != x; then
22253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22255      fi
22256      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22257    fi
22258  fi
22259
22260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22263  # "foo.exe" is OK but "foo" is an error.
22264  #
22265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22266  # It is also a way to make sure we got the proper file name for the real test later on.
22267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22268  if test "x$test_shortpath" = x; then
22269    # Short path failed, file does not exist as specified.
22270    # Try adding .exe or .cmd
22271    if test -f "${new_path}.exe"; then
22272       input_to_shortpath="${new_path}.exe"
22273    elif test -f "${new_path}.cmd"; then
22274       input_to_shortpath="${new_path}.cmd"
22275    else
22276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22277$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22278      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22279$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22280      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22281    fi
22282  else
22283    input_to_shortpath="$new_path"
22284  fi
22285
22286  # Call helper function which possibly converts this using DOS-style short mode.
22287  # If so, the updated path is stored in $new_path.
22288  new_path="$input_to_shortpath"
22289
22290  input_path="$input_to_shortpath"
22291  # Check if we need to convert this using DOS-style short mode. If the path
22292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22293  # take no chances and rewrite it.
22294  # Note: m4 eats our [], so we need to use [ and ] instead.
22295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22296  if test "x$has_forbidden_chars" != x; then
22297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22301      # Going to short mode and back again did indeed matter. Since short mode is
22302      # case insensitive, let's make it lowercase to improve readability.
22303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22304      # Now convert it back to Unix-stile (cygpath)
22305      input_path=`$CYGPATH -u "$shortmode_path"`
22306      new_path="$input_path"
22307    fi
22308  fi
22309
22310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22311  if test "x$test_cygdrive_prefix" = x; then
22312    # As a simple fix, exclude /usr/bin since it's not a real path.
22313    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22315      # a path prefixed by /cygdrive for fixpath to work.
22316      new_path="$CYGWIN_ROOT_PATH$input_path"
22317    fi
22318  fi
22319
22320  # remove trailing .exe if any
22321  new_path="${new_path/%.exe/}"
22322
22323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22324
22325  # First separate the path from the arguments. This will split at the first
22326  # space.
22327  complete="$MT"
22328  path="${complete%% *}"
22329  tmp="$complete EOL"
22330  arguments="${tmp#* }"
22331
22332  # Input might be given as Windows format, start by converting to
22333  # unix format.
22334  new_path="$path"
22335
22336  windows_path="$new_path"
22337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22338    unix_path=`$CYGPATH -u "$windows_path"`
22339    new_path="$unix_path"
22340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22342    new_path="$unix_path"
22343  fi
22344
22345
22346  # Now try to locate executable using which
22347  new_path=`$WHICH "$new_path" 2> /dev/null`
22348
22349  if test "x$new_path" = x; then
22350    # Oops. Which didn't find the executable.
22351    # The splitting of arguments from the executable at a space might have been incorrect,
22352    # since paths with space are more likely in Windows. Give it another try with the whole
22353    # argument.
22354    path="$complete"
22355    arguments="EOL"
22356    new_path="$path"
22357
22358  windows_path="$new_path"
22359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22360    unix_path=`$CYGPATH -u "$windows_path"`
22361    new_path="$unix_path"
22362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22364    new_path="$unix_path"
22365  fi
22366
22367
22368    new_path=`$WHICH "$new_path" 2> /dev/null`
22369
22370    if test "x$new_path" = x; then
22371      # It's still not found. Now this is an unrecoverable error.
22372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22373$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22374      has_space=`$ECHO "$complete" | $GREP " "`
22375      if test "x$has_space" != x; then
22376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22378      fi
22379      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22380    fi
22381  fi
22382
22383  # Now new_path has a complete unix path to the binary
22384  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22385    # Keep paths in /bin as-is, but remove trailing .exe if any
22386    new_path="${new_path/%.exe/}"
22387    # Do not save /bin paths to all_fixpath_prefixes!
22388  else
22389    # Not in mixed or Windows style, start by that.
22390    new_path=`cmd //c echo $new_path`
22391
22392  input_path="$new_path"
22393  # Check if we need to convert this using DOS-style short mode. If the path
22394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22395  # take no chances and rewrite it.
22396  # Note: m4 eats our [], so we need to use [ and ] instead.
22397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22398  if test "x$has_forbidden_chars" != x; then
22399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22401  fi
22402
22403    # Output is in $new_path
22404
22405  windows_path="$new_path"
22406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22407    unix_path=`$CYGPATH -u "$windows_path"`
22408    new_path="$unix_path"
22409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22411    new_path="$unix_path"
22412  fi
22413
22414    # remove trailing .exe if any
22415    new_path="${new_path/%.exe/}"
22416
22417    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22418    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22419  fi
22420
22421  else
22422    # We're on a posix platform. Hooray! :)
22423    # First separate the path from the arguments. This will split at the first
22424    # space.
22425    complete="$MT"
22426    path="${complete%% *}"
22427    tmp="$complete EOL"
22428    arguments="${tmp#* }"
22429
22430    # Cannot rely on the command "which" here since it doesn't always work.
22431    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22432    if test -z "$is_absolute_path"; then
22433      # Path to executable is not absolute. Find it.
22434      IFS_save="$IFS"
22435      IFS=:
22436      for p in $PATH; do
22437        if test -f "$p/$path" && test -x "$p/$path"; then
22438          new_path="$p/$path"
22439          break
22440        fi
22441      done
22442      IFS="$IFS_save"
22443    else
22444      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22445$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22446      new_path="$path"
22447    fi
22448
22449    if test "x$new_path" = x; then
22450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22451$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22452        has_space=`$ECHO "$complete" | $GREP " "`
22453        if test "x$has_space" != x; then
22454          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22456        fi
22457        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22458      fi
22459  fi
22460
22461      # Now join together the path and the arguments once again
22462      if test "x$arguments" != xEOL; then
22463        new_complete="$new_path ${arguments% *}"
22464      else
22465        new_complete="$new_path"
22466      fi
22467
22468  if test "x$complete" != "x$new_complete"; then
22469      MT="$new_complete"
22470      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22471$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22472    fi
22473
22474    # The resource compiler
22475    # Extract the first word of "rc", so it can be a program name with args.
22476set dummy rc; ac_word=$2
22477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22478$as_echo_n "checking for $ac_word... " >&6; }
22479if ${ac_cv_prog_RC+:} false; then :
22480  $as_echo_n "(cached) " >&6
22481else
22482  if test -n "$RC"; then
22483  ac_cv_prog_RC="$RC" # Let the user override the test.
22484else
22485  ac_prog_rejected=no
22486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22487for as_dir in $PATH
22488do
22489  IFS=$as_save_IFS
22490  test -z "$as_dir" && as_dir=.
22491    for ac_exec_ext in '' $ac_executable_extensions; do
22492  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22493    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22494       ac_prog_rejected=yes
22495       continue
22496     fi
22497    ac_cv_prog_RC="rc"
22498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22499    break 2
22500  fi
22501done
22502  done
22503IFS=$as_save_IFS
22504
22505if test $ac_prog_rejected = yes; then
22506  # We found a bogon in the path, so make sure we never use it.
22507  set dummy $ac_cv_prog_RC
22508  shift
22509  if test $# != 0; then
22510    # We chose a different compiler from the bogus one.
22511    # However, it has the same basename, so the bogon will be chosen
22512    # first if we set RC to just the basename; use the full file name.
22513    shift
22514    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22515  fi
22516fi
22517fi
22518fi
22519RC=$ac_cv_prog_RC
22520if test -n "$RC"; then
22521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22522$as_echo "$RC" >&6; }
22523else
22524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22525$as_echo "no" >&6; }
22526fi
22527
22528
22529
22530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22531
22532  # First separate the path from the arguments. This will split at the first
22533  # space.
22534  complete="$RC"
22535  path="${complete%% *}"
22536  tmp="$complete EOL"
22537  arguments="${tmp#* }"
22538
22539  # Input might be given as Windows format, start by converting to
22540  # unix format.
22541  new_path=`$CYGPATH -u "$path"`
22542
22543  # Now try to locate executable using which
22544  new_path=`$WHICH "$new_path" 2> /dev/null`
22545  # bat and cmd files are not always considered executable in cygwin causing which
22546  # to not find them
22547  if test "x$new_path" = x \
22548           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22549           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22550    new_path=`$CYGPATH -u "$path"`
22551  fi
22552  if test "x$new_path" = x; then
22553    # Oops. Which didn't find the executable.
22554    # The splitting of arguments from the executable at a space might have been incorrect,
22555    # since paths with space are more likely in Windows. Give it another try with the whole
22556    # argument.
22557    path="$complete"
22558    arguments="EOL"
22559    new_path=`$CYGPATH -u "$path"`
22560    new_path=`$WHICH "$new_path" 2> /dev/null`
22561    # bat and cmd files are not always considered executable in cygwin causing which
22562    # to not find them
22563    if test "x$new_path" = x \
22564             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22565             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22566      new_path=`$CYGPATH -u "$path"`
22567    fi
22568    if test "x$new_path" = x; then
22569      # It's still not found. Now this is an unrecoverable error.
22570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22571$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22572      has_space=`$ECHO "$complete" | $GREP " "`
22573      if test "x$has_space" != x; then
22574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22576      fi
22577      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22578    fi
22579  fi
22580
22581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22584  # "foo.exe" is OK but "foo" is an error.
22585  #
22586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22587  # It is also a way to make sure we got the proper file name for the real test later on.
22588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22589  if test "x$test_shortpath" = x; then
22590    # Short path failed, file does not exist as specified.
22591    # Try adding .exe or .cmd
22592    if test -f "${new_path}.exe"; then
22593       input_to_shortpath="${new_path}.exe"
22594    elif test -f "${new_path}.cmd"; then
22595       input_to_shortpath="${new_path}.cmd"
22596    else
22597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22598$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22599      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22600$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22601      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22602    fi
22603  else
22604    input_to_shortpath="$new_path"
22605  fi
22606
22607  # Call helper function which possibly converts this using DOS-style short mode.
22608  # If so, the updated path is stored in $new_path.
22609  new_path="$input_to_shortpath"
22610
22611  input_path="$input_to_shortpath"
22612  # Check if we need to convert this using DOS-style short mode. If the path
22613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22614  # take no chances and rewrite it.
22615  # Note: m4 eats our [], so we need to use [ and ] instead.
22616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22617  if test "x$has_forbidden_chars" != x; then
22618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22622      # Going to short mode and back again did indeed matter. Since short mode is
22623      # case insensitive, let's make it lowercase to improve readability.
22624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22625      # Now convert it back to Unix-stile (cygpath)
22626      input_path=`$CYGPATH -u "$shortmode_path"`
22627      new_path="$input_path"
22628    fi
22629  fi
22630
22631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22632  if test "x$test_cygdrive_prefix" = x; then
22633    # As a simple fix, exclude /usr/bin since it's not a real path.
22634    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22636      # a path prefixed by /cygdrive for fixpath to work.
22637      new_path="$CYGWIN_ROOT_PATH$input_path"
22638    fi
22639  fi
22640
22641  # remove trailing .exe if any
22642  new_path="${new_path/%.exe/}"
22643
22644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22645
22646  # First separate the path from the arguments. This will split at the first
22647  # space.
22648  complete="$RC"
22649  path="${complete%% *}"
22650  tmp="$complete EOL"
22651  arguments="${tmp#* }"
22652
22653  # Input might be given as Windows format, start by converting to
22654  # unix format.
22655  new_path="$path"
22656
22657  windows_path="$new_path"
22658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22659    unix_path=`$CYGPATH -u "$windows_path"`
22660    new_path="$unix_path"
22661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22663    new_path="$unix_path"
22664  fi
22665
22666
22667  # Now try to locate executable using which
22668  new_path=`$WHICH "$new_path" 2> /dev/null`
22669
22670  if test "x$new_path" = x; then
22671    # Oops. Which didn't find the executable.
22672    # The splitting of arguments from the executable at a space might have been incorrect,
22673    # since paths with space are more likely in Windows. Give it another try with the whole
22674    # argument.
22675    path="$complete"
22676    arguments="EOL"
22677    new_path="$path"
22678
22679  windows_path="$new_path"
22680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22681    unix_path=`$CYGPATH -u "$windows_path"`
22682    new_path="$unix_path"
22683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22685    new_path="$unix_path"
22686  fi
22687
22688
22689    new_path=`$WHICH "$new_path" 2> /dev/null`
22690
22691    if test "x$new_path" = x; then
22692      # It's still not found. Now this is an unrecoverable error.
22693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22694$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22695      has_space=`$ECHO "$complete" | $GREP " "`
22696      if test "x$has_space" != x; then
22697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22699      fi
22700      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22701    fi
22702  fi
22703
22704  # Now new_path has a complete unix path to the binary
22705  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22706    # Keep paths in /bin as-is, but remove trailing .exe if any
22707    new_path="${new_path/%.exe/}"
22708    # Do not save /bin paths to all_fixpath_prefixes!
22709  else
22710    # Not in mixed or Windows style, start by that.
22711    new_path=`cmd //c echo $new_path`
22712
22713  input_path="$new_path"
22714  # Check if we need to convert this using DOS-style short mode. If the path
22715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22716  # take no chances and rewrite it.
22717  # Note: m4 eats our [], so we need to use [ and ] instead.
22718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22719  if test "x$has_forbidden_chars" != x; then
22720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22722  fi
22723
22724    # Output is in $new_path
22725
22726  windows_path="$new_path"
22727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22728    unix_path=`$CYGPATH -u "$windows_path"`
22729    new_path="$unix_path"
22730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22732    new_path="$unix_path"
22733  fi
22734
22735    # remove trailing .exe if any
22736    new_path="${new_path/%.exe/}"
22737
22738    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22739    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22740  fi
22741
22742  else
22743    # We're on a posix platform. Hooray! :)
22744    # First separate the path from the arguments. This will split at the first
22745    # space.
22746    complete="$RC"
22747    path="${complete%% *}"
22748    tmp="$complete EOL"
22749    arguments="${tmp#* }"
22750
22751    # Cannot rely on the command "which" here since it doesn't always work.
22752    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22753    if test -z "$is_absolute_path"; then
22754      # Path to executable is not absolute. Find it.
22755      IFS_save="$IFS"
22756      IFS=:
22757      for p in $PATH; do
22758        if test -f "$p/$path" && test -x "$p/$path"; then
22759          new_path="$p/$path"
22760          break
22761        fi
22762      done
22763      IFS="$IFS_save"
22764    else
22765      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22766$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22767      new_path="$path"
22768    fi
22769
22770    if test "x$new_path" = x; then
22771        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22772$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22773        has_space=`$ECHO "$complete" | $GREP " "`
22774        if test "x$has_space" != x; then
22775          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22776$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22777        fi
22778        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22779      fi
22780  fi
22781
22782      # Now join together the path and the arguments once again
22783      if test "x$arguments" != xEOL; then
22784        new_complete="$new_path ${arguments% *}"
22785      else
22786        new_complete="$new_path"
22787      fi
22788
22789  if test "x$complete" != "x$new_complete"; then
22790      RC="$new_complete"
22791      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22792$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22793    fi
22794
22795
22796    # For hotspot, we need these in Windows mixed path,
22797    # so rewrite them all. Need added .exe suffix.
22798    HOTSPOT_CXX="$CXX.exe"
22799    HOTSPOT_LD="$LD.exe"
22800    HOTSPOT_MT="$MT.exe"
22801    HOTSPOT_RC="$RC.exe"
22802
22803  unix_path="$HOTSPOT_CXX"
22804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22805    windows_path=`$CYGPATH -m "$unix_path"`
22806    HOTSPOT_CXX="$windows_path"
22807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22808    windows_path=`cmd //c echo $unix_path`
22809    HOTSPOT_CXX="$windows_path"
22810  fi
22811
22812
22813  unix_path="$HOTSPOT_LD"
22814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22815    windows_path=`$CYGPATH -m "$unix_path"`
22816    HOTSPOT_LD="$windows_path"
22817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22818    windows_path=`cmd //c echo $unix_path`
22819    HOTSPOT_LD="$windows_path"
22820  fi
22821
22822
22823  unix_path="$HOTSPOT_MT"
22824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22825    windows_path=`$CYGPATH -m "$unix_path"`
22826    HOTSPOT_MT="$windows_path"
22827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22828    windows_path=`cmd //c echo $unix_path`
22829    HOTSPOT_MT="$windows_path"
22830  fi
22831
22832
22833  unix_path="$HOTSPOT_RC"
22834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22835    windows_path=`$CYGPATH -m "$unix_path"`
22836    HOTSPOT_RC="$windows_path"
22837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22838    windows_path=`cmd //c echo $unix_path`
22839    HOTSPOT_RC="$windows_path"
22840  fi
22841
22842
22843
22844
22845    RC_FLAGS="-nologo -l 0x409 -r"
22846    if test "x$VARIANT" = xOPT; then :
22847
22848        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22849
22850fi
22851    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22852    if test "x$JDK_UPDATE_VERSION" = x; then :
22853
22854        JDK_UPDATE_VERSION_NOTNULL=0
22855
22856fi
22857    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22858    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22859    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22860    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22861    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22862    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22863    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22864
22865    # lib.exe is used to create static libraries.
22866    # Extract the first word of "lib", so it can be a program name with args.
22867set dummy lib; ac_word=$2
22868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22869$as_echo_n "checking for $ac_word... " >&6; }
22870if ${ac_cv_prog_WINAR+:} false; then :
22871  $as_echo_n "(cached) " >&6
22872else
22873  if test -n "$WINAR"; then
22874  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22875else
22876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22877for as_dir in $PATH
22878do
22879  IFS=$as_save_IFS
22880  test -z "$as_dir" && as_dir=.
22881    for ac_exec_ext in '' $ac_executable_extensions; do
22882  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22883    ac_cv_prog_WINAR="lib"
22884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22885    break 2
22886  fi
22887done
22888  done
22889IFS=$as_save_IFS
22890
22891fi
22892fi
22893WINAR=$ac_cv_prog_WINAR
22894if test -n "$WINAR"; then
22895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22896$as_echo "$WINAR" >&6; }
22897else
22898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22899$as_echo "no" >&6; }
22900fi
22901
22902
22903
22904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22905
22906  # First separate the path from the arguments. This will split at the first
22907  # space.
22908  complete="$WINAR"
22909  path="${complete%% *}"
22910  tmp="$complete EOL"
22911  arguments="${tmp#* }"
22912
22913  # Input might be given as Windows format, start by converting to
22914  # unix format.
22915  new_path=`$CYGPATH -u "$path"`
22916
22917  # Now try to locate executable using which
22918  new_path=`$WHICH "$new_path" 2> /dev/null`
22919  # bat and cmd files are not always considered executable in cygwin causing which
22920  # to not find them
22921  if test "x$new_path" = x \
22922           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22923           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22924    new_path=`$CYGPATH -u "$path"`
22925  fi
22926  if test "x$new_path" = x; then
22927    # Oops. Which didn't find the executable.
22928    # The splitting of arguments from the executable at a space might have been incorrect,
22929    # since paths with space are more likely in Windows. Give it another try with the whole
22930    # argument.
22931    path="$complete"
22932    arguments="EOL"
22933    new_path=`$CYGPATH -u "$path"`
22934    new_path=`$WHICH "$new_path" 2> /dev/null`
22935    # bat and cmd files are not always considered executable in cygwin causing which
22936    # to not find them
22937    if test "x$new_path" = x \
22938             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22939             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22940      new_path=`$CYGPATH -u "$path"`
22941    fi
22942    if test "x$new_path" = x; then
22943      # It's still not found. Now this is an unrecoverable error.
22944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22945$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22946      has_space=`$ECHO "$complete" | $GREP " "`
22947      if test "x$has_space" != x; then
22948        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22949$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22950      fi
22951      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22952    fi
22953  fi
22954
22955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22958  # "foo.exe" is OK but "foo" is an error.
22959  #
22960  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22961  # It is also a way to make sure we got the proper file name for the real test later on.
22962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22963  if test "x$test_shortpath" = x; then
22964    # Short path failed, file does not exist as specified.
22965    # Try adding .exe or .cmd
22966    if test -f "${new_path}.exe"; then
22967       input_to_shortpath="${new_path}.exe"
22968    elif test -f "${new_path}.cmd"; then
22969       input_to_shortpath="${new_path}.cmd"
22970    else
22971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22972$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22973      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22974$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22975      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22976    fi
22977  else
22978    input_to_shortpath="$new_path"
22979  fi
22980
22981  # Call helper function which possibly converts this using DOS-style short mode.
22982  # If so, the updated path is stored in $new_path.
22983  new_path="$input_to_shortpath"
22984
22985  input_path="$input_to_shortpath"
22986  # Check if we need to convert this using DOS-style short mode. If the path
22987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22988  # take no chances and rewrite it.
22989  # Note: m4 eats our [], so we need to use [ and ] instead.
22990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22991  if test "x$has_forbidden_chars" != x; then
22992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22996      # Going to short mode and back again did indeed matter. Since short mode is
22997      # case insensitive, let's make it lowercase to improve readability.
22998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22999      # Now convert it back to Unix-stile (cygpath)
23000      input_path=`$CYGPATH -u "$shortmode_path"`
23001      new_path="$input_path"
23002    fi
23003  fi
23004
23005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23006  if test "x$test_cygdrive_prefix" = x; then
23007    # As a simple fix, exclude /usr/bin since it's not a real path.
23008    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23010      # a path prefixed by /cygdrive for fixpath to work.
23011      new_path="$CYGWIN_ROOT_PATH$input_path"
23012    fi
23013  fi
23014
23015  # remove trailing .exe if any
23016  new_path="${new_path/%.exe/}"
23017
23018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23019
23020  # First separate the path from the arguments. This will split at the first
23021  # space.
23022  complete="$WINAR"
23023  path="${complete%% *}"
23024  tmp="$complete EOL"
23025  arguments="${tmp#* }"
23026
23027  # Input might be given as Windows format, start by converting to
23028  # unix format.
23029  new_path="$path"
23030
23031  windows_path="$new_path"
23032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23033    unix_path=`$CYGPATH -u "$windows_path"`
23034    new_path="$unix_path"
23035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23037    new_path="$unix_path"
23038  fi
23039
23040
23041  # Now try to locate executable using which
23042  new_path=`$WHICH "$new_path" 2> /dev/null`
23043
23044  if test "x$new_path" = x; then
23045    # Oops. Which didn't find the executable.
23046    # The splitting of arguments from the executable at a space might have been incorrect,
23047    # since paths with space are more likely in Windows. Give it another try with the whole
23048    # argument.
23049    path="$complete"
23050    arguments="EOL"
23051    new_path="$path"
23052
23053  windows_path="$new_path"
23054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23055    unix_path=`$CYGPATH -u "$windows_path"`
23056    new_path="$unix_path"
23057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23059    new_path="$unix_path"
23060  fi
23061
23062
23063    new_path=`$WHICH "$new_path" 2> /dev/null`
23064
23065    if test "x$new_path" = x; then
23066      # It's still not found. Now this is an unrecoverable error.
23067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23068$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23069      has_space=`$ECHO "$complete" | $GREP " "`
23070      if test "x$has_space" != x; then
23071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23073      fi
23074      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23075    fi
23076  fi
23077
23078  # Now new_path has a complete unix path to the binary
23079  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23080    # Keep paths in /bin as-is, but remove trailing .exe if any
23081    new_path="${new_path/%.exe/}"
23082    # Do not save /bin paths to all_fixpath_prefixes!
23083  else
23084    # Not in mixed or Windows style, start by that.
23085    new_path=`cmd //c echo $new_path`
23086
23087  input_path="$new_path"
23088  # Check if we need to convert this using DOS-style short mode. If the path
23089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23090  # take no chances and rewrite it.
23091  # Note: m4 eats our [], so we need to use [ and ] instead.
23092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23093  if test "x$has_forbidden_chars" != x; then
23094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23096  fi
23097
23098    # Output is in $new_path
23099
23100  windows_path="$new_path"
23101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23102    unix_path=`$CYGPATH -u "$windows_path"`
23103    new_path="$unix_path"
23104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23106    new_path="$unix_path"
23107  fi
23108
23109    # remove trailing .exe if any
23110    new_path="${new_path/%.exe/}"
23111
23112    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23113    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23114  fi
23115
23116  else
23117    # We're on a posix platform. Hooray! :)
23118    # First separate the path from the arguments. This will split at the first
23119    # space.
23120    complete="$WINAR"
23121    path="${complete%% *}"
23122    tmp="$complete EOL"
23123    arguments="${tmp#* }"
23124
23125    # Cannot rely on the command "which" here since it doesn't always work.
23126    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23127    if test -z "$is_absolute_path"; then
23128      # Path to executable is not absolute. Find it.
23129      IFS_save="$IFS"
23130      IFS=:
23131      for p in $PATH; do
23132        if test -f "$p/$path" && test -x "$p/$path"; then
23133          new_path="$p/$path"
23134          break
23135        fi
23136      done
23137      IFS="$IFS_save"
23138    else
23139      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23140$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23141      new_path="$path"
23142    fi
23143
23144    if test "x$new_path" = x; then
23145        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23146$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23147        has_space=`$ECHO "$complete" | $GREP " "`
23148        if test "x$has_space" != x; then
23149          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23150$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23151        fi
23152        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23153      fi
23154  fi
23155
23156      # Now join together the path and the arguments once again
23157      if test "x$arguments" != xEOL; then
23158        new_complete="$new_path ${arguments% *}"
23159      else
23160        new_complete="$new_path"
23161      fi
23162
23163  if test "x$complete" != "x$new_complete"; then
23164      WINAR="$new_complete"
23165      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23166$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23167    fi
23168
23169    AR="$WINAR"
23170    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23171
23172    # Extract the first word of "dumpbin", so it can be a program name with args.
23173set dummy dumpbin; ac_word=$2
23174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23175$as_echo_n "checking for $ac_word... " >&6; }
23176if ${ac_cv_prog_DUMPBIN+:} false; then :
23177  $as_echo_n "(cached) " >&6
23178else
23179  if test -n "$DUMPBIN"; then
23180  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23181else
23182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23183for as_dir in $PATH
23184do
23185  IFS=$as_save_IFS
23186  test -z "$as_dir" && as_dir=.
23187    for ac_exec_ext in '' $ac_executable_extensions; do
23188  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23189    ac_cv_prog_DUMPBIN="dumpbin"
23190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23191    break 2
23192  fi
23193done
23194  done
23195IFS=$as_save_IFS
23196
23197fi
23198fi
23199DUMPBIN=$ac_cv_prog_DUMPBIN
23200if test -n "$DUMPBIN"; then
23201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23202$as_echo "$DUMPBIN" >&6; }
23203else
23204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23205$as_echo "no" >&6; }
23206fi
23207
23208
23209
23210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23211
23212  # First separate the path from the arguments. This will split at the first
23213  # space.
23214  complete="$DUMPBIN"
23215  path="${complete%% *}"
23216  tmp="$complete EOL"
23217  arguments="${tmp#* }"
23218
23219  # Input might be given as Windows format, start by converting to
23220  # unix format.
23221  new_path=`$CYGPATH -u "$path"`
23222
23223  # Now try to locate executable using which
23224  new_path=`$WHICH "$new_path" 2> /dev/null`
23225  # bat and cmd files are not always considered executable in cygwin causing which
23226  # to not find them
23227  if test "x$new_path" = x \
23228           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23229           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23230    new_path=`$CYGPATH -u "$path"`
23231  fi
23232  if test "x$new_path" = x; then
23233    # Oops. Which didn't find the executable.
23234    # The splitting of arguments from the executable at a space might have been incorrect,
23235    # since paths with space are more likely in Windows. Give it another try with the whole
23236    # argument.
23237    path="$complete"
23238    arguments="EOL"
23239    new_path=`$CYGPATH -u "$path"`
23240    new_path=`$WHICH "$new_path" 2> /dev/null`
23241    # bat and cmd files are not always considered executable in cygwin causing which
23242    # to not find them
23243    if test "x$new_path" = x \
23244             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23245             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23246      new_path=`$CYGPATH -u "$path"`
23247    fi
23248    if test "x$new_path" = x; then
23249      # It's still not found. Now this is an unrecoverable error.
23250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23251$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23252      has_space=`$ECHO "$complete" | $GREP " "`
23253      if test "x$has_space" != x; then
23254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23256      fi
23257      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23258    fi
23259  fi
23260
23261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23264  # "foo.exe" is OK but "foo" is an error.
23265  #
23266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23267  # It is also a way to make sure we got the proper file name for the real test later on.
23268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23269  if test "x$test_shortpath" = x; then
23270    # Short path failed, file does not exist as specified.
23271    # Try adding .exe or .cmd
23272    if test -f "${new_path}.exe"; then
23273       input_to_shortpath="${new_path}.exe"
23274    elif test -f "${new_path}.cmd"; then
23275       input_to_shortpath="${new_path}.cmd"
23276    else
23277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23278$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23279      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23280$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23281      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23282    fi
23283  else
23284    input_to_shortpath="$new_path"
23285  fi
23286
23287  # Call helper function which possibly converts this using DOS-style short mode.
23288  # If so, the updated path is stored in $new_path.
23289  new_path="$input_to_shortpath"
23290
23291  input_path="$input_to_shortpath"
23292  # Check if we need to convert this using DOS-style short mode. If the path
23293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23294  # take no chances and rewrite it.
23295  # Note: m4 eats our [], so we need to use [ and ] instead.
23296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23297  if test "x$has_forbidden_chars" != x; then
23298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23302      # Going to short mode and back again did indeed matter. Since short mode is
23303      # case insensitive, let's make it lowercase to improve readability.
23304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23305      # Now convert it back to Unix-stile (cygpath)
23306      input_path=`$CYGPATH -u "$shortmode_path"`
23307      new_path="$input_path"
23308    fi
23309  fi
23310
23311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23312  if test "x$test_cygdrive_prefix" = x; then
23313    # As a simple fix, exclude /usr/bin since it's not a real path.
23314    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23316      # a path prefixed by /cygdrive for fixpath to work.
23317      new_path="$CYGWIN_ROOT_PATH$input_path"
23318    fi
23319  fi
23320
23321  # remove trailing .exe if any
23322  new_path="${new_path/%.exe/}"
23323
23324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23325
23326  # First separate the path from the arguments. This will split at the first
23327  # space.
23328  complete="$DUMPBIN"
23329  path="${complete%% *}"
23330  tmp="$complete EOL"
23331  arguments="${tmp#* }"
23332
23333  # Input might be given as Windows format, start by converting to
23334  # unix format.
23335  new_path="$path"
23336
23337  windows_path="$new_path"
23338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23339    unix_path=`$CYGPATH -u "$windows_path"`
23340    new_path="$unix_path"
23341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23343    new_path="$unix_path"
23344  fi
23345
23346
23347  # Now try to locate executable using which
23348  new_path=`$WHICH "$new_path" 2> /dev/null`
23349
23350  if test "x$new_path" = x; then
23351    # Oops. Which didn't find the executable.
23352    # The splitting of arguments from the executable at a space might have been incorrect,
23353    # since paths with space are more likely in Windows. Give it another try with the whole
23354    # argument.
23355    path="$complete"
23356    arguments="EOL"
23357    new_path="$path"
23358
23359  windows_path="$new_path"
23360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23361    unix_path=`$CYGPATH -u "$windows_path"`
23362    new_path="$unix_path"
23363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23365    new_path="$unix_path"
23366  fi
23367
23368
23369    new_path=`$WHICH "$new_path" 2> /dev/null`
23370
23371    if test "x$new_path" = x; then
23372      # It's still not found. Now this is an unrecoverable error.
23373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23374$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23375      has_space=`$ECHO "$complete" | $GREP " "`
23376      if test "x$has_space" != x; then
23377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23379      fi
23380      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23381    fi
23382  fi
23383
23384  # Now new_path has a complete unix path to the binary
23385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23386    # Keep paths in /bin as-is, but remove trailing .exe if any
23387    new_path="${new_path/%.exe/}"
23388    # Do not save /bin paths to all_fixpath_prefixes!
23389  else
23390    # Not in mixed or Windows style, start by that.
23391    new_path=`cmd //c echo $new_path`
23392
23393  input_path="$new_path"
23394  # Check if we need to convert this using DOS-style short mode. If the path
23395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23396  # take no chances and rewrite it.
23397  # Note: m4 eats our [], so we need to use [ and ] instead.
23398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23399  if test "x$has_forbidden_chars" != x; then
23400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23402  fi
23403
23404    # Output is in $new_path
23405
23406  windows_path="$new_path"
23407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23408    unix_path=`$CYGPATH -u "$windows_path"`
23409    new_path="$unix_path"
23410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23412    new_path="$unix_path"
23413  fi
23414
23415    # remove trailing .exe if any
23416    new_path="${new_path/%.exe/}"
23417
23418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23420  fi
23421
23422  else
23423    # We're on a posix platform. Hooray! :)
23424    # First separate the path from the arguments. This will split at the first
23425    # space.
23426    complete="$DUMPBIN"
23427    path="${complete%% *}"
23428    tmp="$complete EOL"
23429    arguments="${tmp#* }"
23430
23431    # Cannot rely on the command "which" here since it doesn't always work.
23432    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23433    if test -z "$is_absolute_path"; then
23434      # Path to executable is not absolute. Find it.
23435      IFS_save="$IFS"
23436      IFS=:
23437      for p in $PATH; do
23438        if test -f "$p/$path" && test -x "$p/$path"; then
23439          new_path="$p/$path"
23440          break
23441        fi
23442      done
23443      IFS="$IFS_save"
23444    else
23445      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23446$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23447      new_path="$path"
23448    fi
23449
23450    if test "x$new_path" = x; then
23451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23452$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23453        has_space=`$ECHO "$complete" | $GREP " "`
23454        if test "x$has_space" != x; then
23455          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23457        fi
23458        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23459      fi
23460  fi
23461
23462      # Now join together the path and the arguments once again
23463      if test "x$arguments" != xEOL; then
23464        new_complete="$new_path ${arguments% *}"
23465      else
23466        new_complete="$new_path"
23467      fi
23468
23469  if test "x$complete" != "x$new_complete"; then
23470      DUMPBIN="$new_complete"
23471      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23472$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23473    fi
23474
23475
23476    COMPILER_TYPE=CL
23477    CCXXFLAGS="$CCXXFLAGS -nologo"
23478
23479fi
23480
23481
23482
23483ac_ext=c
23484ac_cpp='$CPP $CPPFLAGS'
23485ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23486ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23487ac_compiler_gnu=$ac_cv_c_compiler_gnu
23488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23489$as_echo_n "checking how to run the C preprocessor... " >&6; }
23490# On Suns, sometimes $CPP names a directory.
23491if test -n "$CPP" && test -d "$CPP"; then
23492  CPP=
23493fi
23494if test -z "$CPP"; then
23495  if ${ac_cv_prog_CPP+:} false; then :
23496  $as_echo_n "(cached) " >&6
23497else
23498      # Double quotes because CPP needs to be expanded
23499    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23500    do
23501      ac_preproc_ok=false
23502for ac_c_preproc_warn_flag in '' yes
23503do
23504  # Use a header file that comes with gcc, so configuring glibc
23505  # with a fresh cross-compiler works.
23506  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23507  # <limits.h> exists even on freestanding compilers.
23508  # On the NeXT, cc -E runs the code through the compiler's parser,
23509  # not just through cpp. "Syntax error" is here to catch this case.
23510  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23511/* end confdefs.h.  */
23512#ifdef __STDC__
23513# include <limits.h>
23514#else
23515# include <assert.h>
23516#endif
23517		     Syntax error
23518_ACEOF
23519if ac_fn_c_try_cpp "$LINENO"; then :
23520
23521else
23522  # Broken: fails on valid input.
23523continue
23524fi
23525rm -f conftest.err conftest.i conftest.$ac_ext
23526
23527  # OK, works on sane cases.  Now check whether nonexistent headers
23528  # can be detected and how.
23529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23530/* end confdefs.h.  */
23531#include <ac_nonexistent.h>
23532_ACEOF
23533if ac_fn_c_try_cpp "$LINENO"; then :
23534  # Broken: success on invalid input.
23535continue
23536else
23537  # Passes both tests.
23538ac_preproc_ok=:
23539break
23540fi
23541rm -f conftest.err conftest.i conftest.$ac_ext
23542
23543done
23544# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23545rm -f conftest.i conftest.err conftest.$ac_ext
23546if $ac_preproc_ok; then :
23547  break
23548fi
23549
23550    done
23551    ac_cv_prog_CPP=$CPP
23552
23553fi
23554  CPP=$ac_cv_prog_CPP
23555else
23556  ac_cv_prog_CPP=$CPP
23557fi
23558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23559$as_echo "$CPP" >&6; }
23560ac_preproc_ok=false
23561for ac_c_preproc_warn_flag in '' yes
23562do
23563  # Use a header file that comes with gcc, so configuring glibc
23564  # with a fresh cross-compiler works.
23565  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23566  # <limits.h> exists even on freestanding compilers.
23567  # On the NeXT, cc -E runs the code through the compiler's parser,
23568  # not just through cpp. "Syntax error" is here to catch this case.
23569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23570/* end confdefs.h.  */
23571#ifdef __STDC__
23572# include <limits.h>
23573#else
23574# include <assert.h>
23575#endif
23576		     Syntax error
23577_ACEOF
23578if ac_fn_c_try_cpp "$LINENO"; then :
23579
23580else
23581  # Broken: fails on valid input.
23582continue
23583fi
23584rm -f conftest.err conftest.i conftest.$ac_ext
23585
23586  # OK, works on sane cases.  Now check whether nonexistent headers
23587  # can be detected and how.
23588  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23589/* end confdefs.h.  */
23590#include <ac_nonexistent.h>
23591_ACEOF
23592if ac_fn_c_try_cpp "$LINENO"; then :
23593  # Broken: success on invalid input.
23594continue
23595else
23596  # Passes both tests.
23597ac_preproc_ok=:
23598break
23599fi
23600rm -f conftest.err conftest.i conftest.$ac_ext
23601
23602done
23603# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23604rm -f conftest.i conftest.err conftest.$ac_ext
23605if $ac_preproc_ok; then :
23606
23607else
23608  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23610as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23611See \`config.log' for more details" "$LINENO" 5; }
23612fi
23613
23614ac_ext=cpp
23615ac_cpp='$CXXCPP $CPPFLAGS'
23616ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23617ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23618ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23619
23620
23621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23622
23623  # First separate the path from the arguments. This will split at the first
23624  # space.
23625  complete="$CPP"
23626  path="${complete%% *}"
23627  tmp="$complete EOL"
23628  arguments="${tmp#* }"
23629
23630  # Input might be given as Windows format, start by converting to
23631  # unix format.
23632  new_path=`$CYGPATH -u "$path"`
23633
23634  # Now try to locate executable using which
23635  new_path=`$WHICH "$new_path" 2> /dev/null`
23636  # bat and cmd files are not always considered executable in cygwin causing which
23637  # to not find them
23638  if test "x$new_path" = x \
23639           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23640           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23641    new_path=`$CYGPATH -u "$path"`
23642  fi
23643  if test "x$new_path" = x; then
23644    # Oops. Which didn't find the executable.
23645    # The splitting of arguments from the executable at a space might have been incorrect,
23646    # since paths with space are more likely in Windows. Give it another try with the whole
23647    # argument.
23648    path="$complete"
23649    arguments="EOL"
23650    new_path=`$CYGPATH -u "$path"`
23651    new_path=`$WHICH "$new_path" 2> /dev/null`
23652    # bat and cmd files are not always considered executable in cygwin causing which
23653    # to not find them
23654    if test "x$new_path" = x \
23655             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23656             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23657      new_path=`$CYGPATH -u "$path"`
23658    fi
23659    if test "x$new_path" = x; then
23660      # It's still not found. Now this is an unrecoverable error.
23661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23662$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23663      has_space=`$ECHO "$complete" | $GREP " "`
23664      if test "x$has_space" != x; then
23665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23667      fi
23668      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23669    fi
23670  fi
23671
23672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23675  # "foo.exe" is OK but "foo" is an error.
23676  #
23677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23678  # It is also a way to make sure we got the proper file name for the real test later on.
23679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23680  if test "x$test_shortpath" = x; then
23681    # Short path failed, file does not exist as specified.
23682    # Try adding .exe or .cmd
23683    if test -f "${new_path}.exe"; then
23684       input_to_shortpath="${new_path}.exe"
23685    elif test -f "${new_path}.cmd"; then
23686       input_to_shortpath="${new_path}.cmd"
23687    else
23688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23689$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23690      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23691$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23692      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23693    fi
23694  else
23695    input_to_shortpath="$new_path"
23696  fi
23697
23698  # Call helper function which possibly converts this using DOS-style short mode.
23699  # If so, the updated path is stored in $new_path.
23700  new_path="$input_to_shortpath"
23701
23702  input_path="$input_to_shortpath"
23703  # Check if we need to convert this using DOS-style short mode. If the path
23704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23705  # take no chances and rewrite it.
23706  # Note: m4 eats our [], so we need to use [ and ] instead.
23707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23708  if test "x$has_forbidden_chars" != x; then
23709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23713      # Going to short mode and back again did indeed matter. Since short mode is
23714      # case insensitive, let's make it lowercase to improve readability.
23715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23716      # Now convert it back to Unix-stile (cygpath)
23717      input_path=`$CYGPATH -u "$shortmode_path"`
23718      new_path="$input_path"
23719    fi
23720  fi
23721
23722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23723  if test "x$test_cygdrive_prefix" = x; then
23724    # As a simple fix, exclude /usr/bin since it's not a real path.
23725    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23727      # a path prefixed by /cygdrive for fixpath to work.
23728      new_path="$CYGWIN_ROOT_PATH$input_path"
23729    fi
23730  fi
23731
23732  # remove trailing .exe if any
23733  new_path="${new_path/%.exe/}"
23734
23735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23736
23737  # First separate the path from the arguments. This will split at the first
23738  # space.
23739  complete="$CPP"
23740  path="${complete%% *}"
23741  tmp="$complete EOL"
23742  arguments="${tmp#* }"
23743
23744  # Input might be given as Windows format, start by converting to
23745  # unix format.
23746  new_path="$path"
23747
23748  windows_path="$new_path"
23749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23750    unix_path=`$CYGPATH -u "$windows_path"`
23751    new_path="$unix_path"
23752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23754    new_path="$unix_path"
23755  fi
23756
23757
23758  # Now try to locate executable using which
23759  new_path=`$WHICH "$new_path" 2> /dev/null`
23760
23761  if test "x$new_path" = x; then
23762    # Oops. Which didn't find the executable.
23763    # The splitting of arguments from the executable at a space might have been incorrect,
23764    # since paths with space are more likely in Windows. Give it another try with the whole
23765    # argument.
23766    path="$complete"
23767    arguments="EOL"
23768    new_path="$path"
23769
23770  windows_path="$new_path"
23771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23772    unix_path=`$CYGPATH -u "$windows_path"`
23773    new_path="$unix_path"
23774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23776    new_path="$unix_path"
23777  fi
23778
23779
23780    new_path=`$WHICH "$new_path" 2> /dev/null`
23781
23782    if test "x$new_path" = x; then
23783      # It's still not found. Now this is an unrecoverable error.
23784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23785$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23786      has_space=`$ECHO "$complete" | $GREP " "`
23787      if test "x$has_space" != x; then
23788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23790      fi
23791      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23792    fi
23793  fi
23794
23795  # Now new_path has a complete unix path to the binary
23796  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23797    # Keep paths in /bin as-is, but remove trailing .exe if any
23798    new_path="${new_path/%.exe/}"
23799    # Do not save /bin paths to all_fixpath_prefixes!
23800  else
23801    # Not in mixed or Windows style, start by that.
23802    new_path=`cmd //c echo $new_path`
23803
23804  input_path="$new_path"
23805  # Check if we need to convert this using DOS-style short mode. If the path
23806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23807  # take no chances and rewrite it.
23808  # Note: m4 eats our [], so we need to use [ and ] instead.
23809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23810  if test "x$has_forbidden_chars" != x; then
23811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23813  fi
23814
23815    # Output is in $new_path
23816
23817  windows_path="$new_path"
23818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23819    unix_path=`$CYGPATH -u "$windows_path"`
23820    new_path="$unix_path"
23821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23823    new_path="$unix_path"
23824  fi
23825
23826    # remove trailing .exe if any
23827    new_path="${new_path/%.exe/}"
23828
23829    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23830    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23831  fi
23832
23833  else
23834    # We're on a posix platform. Hooray! :)
23835    # First separate the path from the arguments. This will split at the first
23836    # space.
23837    complete="$CPP"
23838    path="${complete%% *}"
23839    tmp="$complete EOL"
23840    arguments="${tmp#* }"
23841
23842    # Cannot rely on the command "which" here since it doesn't always work.
23843    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23844    if test -z "$is_absolute_path"; then
23845      # Path to executable is not absolute. Find it.
23846      IFS_save="$IFS"
23847      IFS=:
23848      for p in $PATH; do
23849        if test -f "$p/$path" && test -x "$p/$path"; then
23850          new_path="$p/$path"
23851          break
23852        fi
23853      done
23854      IFS="$IFS_save"
23855    else
23856      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23857$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23858      new_path="$path"
23859    fi
23860
23861    if test "x$new_path" = x; then
23862        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23863$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23864        has_space=`$ECHO "$complete" | $GREP " "`
23865        if test "x$has_space" != x; then
23866          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23867$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23868        fi
23869        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23870      fi
23871  fi
23872
23873      # Now join together the path and the arguments once again
23874      if test "x$arguments" != xEOL; then
23875        new_complete="$new_path ${arguments% *}"
23876      else
23877        new_complete="$new_path"
23878      fi
23879
23880  if test "x$complete" != "x$new_complete"; then
23881      CPP="$new_complete"
23882      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23883$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23884    fi
23885
23886
23887ac_ext=cpp
23888ac_cpp='$CXXCPP $CPPFLAGS'
23889ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23890ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23891ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23893$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23894if test -z "$CXXCPP"; then
23895  if ${ac_cv_prog_CXXCPP+:} false; then :
23896  $as_echo_n "(cached) " >&6
23897else
23898      # Double quotes because CXXCPP needs to be expanded
23899    for CXXCPP in "$CXX -E" "/lib/cpp"
23900    do
23901      ac_preproc_ok=false
23902for ac_cxx_preproc_warn_flag in '' yes
23903do
23904  # Use a header file that comes with gcc, so configuring glibc
23905  # with a fresh cross-compiler works.
23906  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23907  # <limits.h> exists even on freestanding compilers.
23908  # On the NeXT, cc -E runs the code through the compiler's parser,
23909  # not just through cpp. "Syntax error" is here to catch this case.
23910  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23911/* end confdefs.h.  */
23912#ifdef __STDC__
23913# include <limits.h>
23914#else
23915# include <assert.h>
23916#endif
23917		     Syntax error
23918_ACEOF
23919if ac_fn_cxx_try_cpp "$LINENO"; then :
23920
23921else
23922  # Broken: fails on valid input.
23923continue
23924fi
23925rm -f conftest.err conftest.i conftest.$ac_ext
23926
23927  # OK, works on sane cases.  Now check whether nonexistent headers
23928  # can be detected and how.
23929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23930/* end confdefs.h.  */
23931#include <ac_nonexistent.h>
23932_ACEOF
23933if ac_fn_cxx_try_cpp "$LINENO"; then :
23934  # Broken: success on invalid input.
23935continue
23936else
23937  # Passes both tests.
23938ac_preproc_ok=:
23939break
23940fi
23941rm -f conftest.err conftest.i conftest.$ac_ext
23942
23943done
23944# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23945rm -f conftest.i conftest.err conftest.$ac_ext
23946if $ac_preproc_ok; then :
23947  break
23948fi
23949
23950    done
23951    ac_cv_prog_CXXCPP=$CXXCPP
23952
23953fi
23954  CXXCPP=$ac_cv_prog_CXXCPP
23955else
23956  ac_cv_prog_CXXCPP=$CXXCPP
23957fi
23958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23959$as_echo "$CXXCPP" >&6; }
23960ac_preproc_ok=false
23961for ac_cxx_preproc_warn_flag in '' yes
23962do
23963  # Use a header file that comes with gcc, so configuring glibc
23964  # with a fresh cross-compiler works.
23965  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23966  # <limits.h> exists even on freestanding compilers.
23967  # On the NeXT, cc -E runs the code through the compiler's parser,
23968  # not just through cpp. "Syntax error" is here to catch this case.
23969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23970/* end confdefs.h.  */
23971#ifdef __STDC__
23972# include <limits.h>
23973#else
23974# include <assert.h>
23975#endif
23976		     Syntax error
23977_ACEOF
23978if ac_fn_cxx_try_cpp "$LINENO"; then :
23979
23980else
23981  # Broken: fails on valid input.
23982continue
23983fi
23984rm -f conftest.err conftest.i conftest.$ac_ext
23985
23986  # OK, works on sane cases.  Now check whether nonexistent headers
23987  # can be detected and how.
23988  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23989/* end confdefs.h.  */
23990#include <ac_nonexistent.h>
23991_ACEOF
23992if ac_fn_cxx_try_cpp "$LINENO"; then :
23993  # Broken: success on invalid input.
23994continue
23995else
23996  # Passes both tests.
23997ac_preproc_ok=:
23998break
23999fi
24000rm -f conftest.err conftest.i conftest.$ac_ext
24001
24002done
24003# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24004rm -f conftest.i conftest.err conftest.$ac_ext
24005if $ac_preproc_ok; then :
24006
24007else
24008  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24010as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24011See \`config.log' for more details" "$LINENO" 5; }
24012fi
24013
24014ac_ext=cpp
24015ac_cpp='$CXXCPP $CPPFLAGS'
24016ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24017ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24018ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24019
24020
24021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24022
24023  # First separate the path from the arguments. This will split at the first
24024  # space.
24025  complete="$CXXCPP"
24026  path="${complete%% *}"
24027  tmp="$complete EOL"
24028  arguments="${tmp#* }"
24029
24030  # Input might be given as Windows format, start by converting to
24031  # unix format.
24032  new_path=`$CYGPATH -u "$path"`
24033
24034  # Now try to locate executable using which
24035  new_path=`$WHICH "$new_path" 2> /dev/null`
24036  # bat and cmd files are not always considered executable in cygwin causing which
24037  # to not find them
24038  if test "x$new_path" = x \
24039           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24040           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24041    new_path=`$CYGPATH -u "$path"`
24042  fi
24043  if test "x$new_path" = x; then
24044    # Oops. Which didn't find the executable.
24045    # The splitting of arguments from the executable at a space might have been incorrect,
24046    # since paths with space are more likely in Windows. Give it another try with the whole
24047    # argument.
24048    path="$complete"
24049    arguments="EOL"
24050    new_path=`$CYGPATH -u "$path"`
24051    new_path=`$WHICH "$new_path" 2> /dev/null`
24052    # bat and cmd files are not always considered executable in cygwin causing which
24053    # to not find them
24054    if test "x$new_path" = x \
24055             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24056             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24057      new_path=`$CYGPATH -u "$path"`
24058    fi
24059    if test "x$new_path" = x; then
24060      # It's still not found. Now this is an unrecoverable error.
24061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24062$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24063      has_space=`$ECHO "$complete" | $GREP " "`
24064      if test "x$has_space" != x; then
24065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24067      fi
24068      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24069    fi
24070  fi
24071
24072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24075  # "foo.exe" is OK but "foo" is an error.
24076  #
24077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24078  # It is also a way to make sure we got the proper file name for the real test later on.
24079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24080  if test "x$test_shortpath" = x; then
24081    # Short path failed, file does not exist as specified.
24082    # Try adding .exe or .cmd
24083    if test -f "${new_path}.exe"; then
24084       input_to_shortpath="${new_path}.exe"
24085    elif test -f "${new_path}.cmd"; then
24086       input_to_shortpath="${new_path}.cmd"
24087    else
24088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24089$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24090      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24091$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24092      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24093    fi
24094  else
24095    input_to_shortpath="$new_path"
24096  fi
24097
24098  # Call helper function which possibly converts this using DOS-style short mode.
24099  # If so, the updated path is stored in $new_path.
24100  new_path="$input_to_shortpath"
24101
24102  input_path="$input_to_shortpath"
24103  # Check if we need to convert this using DOS-style short mode. If the path
24104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24105  # take no chances and rewrite it.
24106  # Note: m4 eats our [], so we need to use [ and ] instead.
24107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24108  if test "x$has_forbidden_chars" != x; then
24109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24113      # Going to short mode and back again did indeed matter. Since short mode is
24114      # case insensitive, let's make it lowercase to improve readability.
24115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24116      # Now convert it back to Unix-stile (cygpath)
24117      input_path=`$CYGPATH -u "$shortmode_path"`
24118      new_path="$input_path"
24119    fi
24120  fi
24121
24122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24123  if test "x$test_cygdrive_prefix" = x; then
24124    # As a simple fix, exclude /usr/bin since it's not a real path.
24125    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24127      # a path prefixed by /cygdrive for fixpath to work.
24128      new_path="$CYGWIN_ROOT_PATH$input_path"
24129    fi
24130  fi
24131
24132  # remove trailing .exe if any
24133  new_path="${new_path/%.exe/}"
24134
24135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24136
24137  # First separate the path from the arguments. This will split at the first
24138  # space.
24139  complete="$CXXCPP"
24140  path="${complete%% *}"
24141  tmp="$complete EOL"
24142  arguments="${tmp#* }"
24143
24144  # Input might be given as Windows format, start by converting to
24145  # unix format.
24146  new_path="$path"
24147
24148  windows_path="$new_path"
24149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24150    unix_path=`$CYGPATH -u "$windows_path"`
24151    new_path="$unix_path"
24152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24154    new_path="$unix_path"
24155  fi
24156
24157
24158  # Now try to locate executable using which
24159  new_path=`$WHICH "$new_path" 2> /dev/null`
24160
24161  if test "x$new_path" = x; then
24162    # Oops. Which didn't find the executable.
24163    # The splitting of arguments from the executable at a space might have been incorrect,
24164    # since paths with space are more likely in Windows. Give it another try with the whole
24165    # argument.
24166    path="$complete"
24167    arguments="EOL"
24168    new_path="$path"
24169
24170  windows_path="$new_path"
24171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24172    unix_path=`$CYGPATH -u "$windows_path"`
24173    new_path="$unix_path"
24174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24176    new_path="$unix_path"
24177  fi
24178
24179
24180    new_path=`$WHICH "$new_path" 2> /dev/null`
24181
24182    if test "x$new_path" = x; then
24183      # It's still not found. Now this is an unrecoverable error.
24184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24185$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24186      has_space=`$ECHO "$complete" | $GREP " "`
24187      if test "x$has_space" != x; then
24188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24190      fi
24191      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24192    fi
24193  fi
24194
24195  # Now new_path has a complete unix path to the binary
24196  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24197    # Keep paths in /bin as-is, but remove trailing .exe if any
24198    new_path="${new_path/%.exe/}"
24199    # Do not save /bin paths to all_fixpath_prefixes!
24200  else
24201    # Not in mixed or Windows style, start by that.
24202    new_path=`cmd //c echo $new_path`
24203
24204  input_path="$new_path"
24205  # Check if we need to convert this using DOS-style short mode. If the path
24206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24207  # take no chances and rewrite it.
24208  # Note: m4 eats our [], so we need to use [ and ] instead.
24209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24210  if test "x$has_forbidden_chars" != x; then
24211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24213  fi
24214
24215    # Output is in $new_path
24216
24217  windows_path="$new_path"
24218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24219    unix_path=`$CYGPATH -u "$windows_path"`
24220    new_path="$unix_path"
24221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24223    new_path="$unix_path"
24224  fi
24225
24226    # remove trailing .exe if any
24227    new_path="${new_path/%.exe/}"
24228
24229    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24230    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24231  fi
24232
24233  else
24234    # We're on a posix platform. Hooray! :)
24235    # First separate the path from the arguments. This will split at the first
24236    # space.
24237    complete="$CXXCPP"
24238    path="${complete%% *}"
24239    tmp="$complete EOL"
24240    arguments="${tmp#* }"
24241
24242    # Cannot rely on the command "which" here since it doesn't always work.
24243    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24244    if test -z "$is_absolute_path"; then
24245      # Path to executable is not absolute. Find it.
24246      IFS_save="$IFS"
24247      IFS=:
24248      for p in $PATH; do
24249        if test -f "$p/$path" && test -x "$p/$path"; then
24250          new_path="$p/$path"
24251          break
24252        fi
24253      done
24254      IFS="$IFS_save"
24255    else
24256      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24257$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24258      new_path="$path"
24259    fi
24260
24261    if test "x$new_path" = x; then
24262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24263$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24264        has_space=`$ECHO "$complete" | $GREP " "`
24265        if test "x$has_space" != x; then
24266          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24268        fi
24269        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24270      fi
24271  fi
24272
24273      # Now join together the path and the arguments once again
24274      if test "x$arguments" != xEOL; then
24275        new_complete="$new_path ${arguments% *}"
24276      else
24277        new_complete="$new_path"
24278      fi
24279
24280  if test "x$complete" != "x$new_complete"; then
24281      CXXCPP="$new_complete"
24282      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24283$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24284    fi
24285
24286
24287if test "x$COMPILE_TYPE" != "xcross"; then
24288    # If we are not cross compiling, use the same compilers for
24289    # building the build platform executables. The cross-compilation
24290    # case needed to be done earlier, but this can only be done after
24291    # the native tools have been localized.
24292    BUILD_CC="$CC"
24293    BUILD_CXX="$CXX"
24294    BUILD_LD="$LD"
24295fi
24296
24297# for solaris we really need solaris tools, and not gnu equivalent
24298#   these seems to normally reside in /usr/ccs/bin so add that to path before
24299#   starting to probe
24300#
24301#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24302#         so that it can be overriden --with-tools-dir
24303if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24304    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24305fi
24306
24307# Find the right assembler.
24308if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24309    # Extract the first word of "as", so it can be a program name with args.
24310set dummy as; ac_word=$2
24311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24312$as_echo_n "checking for $ac_word... " >&6; }
24313if ${ac_cv_path_AS+:} false; then :
24314  $as_echo_n "(cached) " >&6
24315else
24316  case $AS in
24317  [\\/]* | ?:[\\/]*)
24318  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24319  ;;
24320  *)
24321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24322for as_dir in $PATH
24323do
24324  IFS=$as_save_IFS
24325  test -z "$as_dir" && as_dir=.
24326    for ac_exec_ext in '' $ac_executable_extensions; do
24327  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24328    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24330    break 2
24331  fi
24332done
24333  done
24334IFS=$as_save_IFS
24335
24336  ;;
24337esac
24338fi
24339AS=$ac_cv_path_AS
24340if test -n "$AS"; then
24341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24342$as_echo "$AS" >&6; }
24343else
24344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24345$as_echo "no" >&6; }
24346fi
24347
24348
24349
24350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24351
24352  # First separate the path from the arguments. This will split at the first
24353  # space.
24354  complete="$AS"
24355  path="${complete%% *}"
24356  tmp="$complete EOL"
24357  arguments="${tmp#* }"
24358
24359  # Input might be given as Windows format, start by converting to
24360  # unix format.
24361  new_path=`$CYGPATH -u "$path"`
24362
24363  # Now try to locate executable using which
24364  new_path=`$WHICH "$new_path" 2> /dev/null`
24365  # bat and cmd files are not always considered executable in cygwin causing which
24366  # to not find them
24367  if test "x$new_path" = x \
24368           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24369           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24370    new_path=`$CYGPATH -u "$path"`
24371  fi
24372  if test "x$new_path" = x; then
24373    # Oops. Which didn't find the executable.
24374    # The splitting of arguments from the executable at a space might have been incorrect,
24375    # since paths with space are more likely in Windows. Give it another try with the whole
24376    # argument.
24377    path="$complete"
24378    arguments="EOL"
24379    new_path=`$CYGPATH -u "$path"`
24380    new_path=`$WHICH "$new_path" 2> /dev/null`
24381    # bat and cmd files are not always considered executable in cygwin causing which
24382    # to not find them
24383    if test "x$new_path" = x \
24384             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24385             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24386      new_path=`$CYGPATH -u "$path"`
24387    fi
24388    if test "x$new_path" = x; then
24389      # It's still not found. Now this is an unrecoverable error.
24390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24391$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24392      has_space=`$ECHO "$complete" | $GREP " "`
24393      if test "x$has_space" != x; then
24394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24396      fi
24397      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24398    fi
24399  fi
24400
24401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24404  # "foo.exe" is OK but "foo" is an error.
24405  #
24406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24407  # It is also a way to make sure we got the proper file name for the real test later on.
24408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24409  if test "x$test_shortpath" = x; then
24410    # Short path failed, file does not exist as specified.
24411    # Try adding .exe or .cmd
24412    if test -f "${new_path}.exe"; then
24413       input_to_shortpath="${new_path}.exe"
24414    elif test -f "${new_path}.cmd"; then
24415       input_to_shortpath="${new_path}.cmd"
24416    else
24417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24418$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24419      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24420$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24421      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24422    fi
24423  else
24424    input_to_shortpath="$new_path"
24425  fi
24426
24427  # Call helper function which possibly converts this using DOS-style short mode.
24428  # If so, the updated path is stored in $new_path.
24429  new_path="$input_to_shortpath"
24430
24431  input_path="$input_to_shortpath"
24432  # Check if we need to convert this using DOS-style short mode. If the path
24433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24434  # take no chances and rewrite it.
24435  # Note: m4 eats our [], so we need to use [ and ] instead.
24436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24437  if test "x$has_forbidden_chars" != x; then
24438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24442      # Going to short mode and back again did indeed matter. Since short mode is
24443      # case insensitive, let's make it lowercase to improve readability.
24444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24445      # Now convert it back to Unix-stile (cygpath)
24446      input_path=`$CYGPATH -u "$shortmode_path"`
24447      new_path="$input_path"
24448    fi
24449  fi
24450
24451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24452  if test "x$test_cygdrive_prefix" = x; then
24453    # As a simple fix, exclude /usr/bin since it's not a real path.
24454    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24456      # a path prefixed by /cygdrive for fixpath to work.
24457      new_path="$CYGWIN_ROOT_PATH$input_path"
24458    fi
24459  fi
24460
24461  # remove trailing .exe if any
24462  new_path="${new_path/%.exe/}"
24463
24464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24465
24466  # First separate the path from the arguments. This will split at the first
24467  # space.
24468  complete="$AS"
24469  path="${complete%% *}"
24470  tmp="$complete EOL"
24471  arguments="${tmp#* }"
24472
24473  # Input might be given as Windows format, start by converting to
24474  # unix format.
24475  new_path="$path"
24476
24477  windows_path="$new_path"
24478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24479    unix_path=`$CYGPATH -u "$windows_path"`
24480    new_path="$unix_path"
24481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24483    new_path="$unix_path"
24484  fi
24485
24486
24487  # Now try to locate executable using which
24488  new_path=`$WHICH "$new_path" 2> /dev/null`
24489
24490  if test "x$new_path" = x; then
24491    # Oops. Which didn't find the executable.
24492    # The splitting of arguments from the executable at a space might have been incorrect,
24493    # since paths with space are more likely in Windows. Give it another try with the whole
24494    # argument.
24495    path="$complete"
24496    arguments="EOL"
24497    new_path="$path"
24498
24499  windows_path="$new_path"
24500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24501    unix_path=`$CYGPATH -u "$windows_path"`
24502    new_path="$unix_path"
24503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24505    new_path="$unix_path"
24506  fi
24507
24508
24509    new_path=`$WHICH "$new_path" 2> /dev/null`
24510
24511    if test "x$new_path" = x; then
24512      # It's still not found. Now this is an unrecoverable error.
24513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24514$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24515      has_space=`$ECHO "$complete" | $GREP " "`
24516      if test "x$has_space" != x; then
24517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24519      fi
24520      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24521    fi
24522  fi
24523
24524  # Now new_path has a complete unix path to the binary
24525  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24526    # Keep paths in /bin as-is, but remove trailing .exe if any
24527    new_path="${new_path/%.exe/}"
24528    # Do not save /bin paths to all_fixpath_prefixes!
24529  else
24530    # Not in mixed or Windows style, start by that.
24531    new_path=`cmd //c echo $new_path`
24532
24533  input_path="$new_path"
24534  # Check if we need to convert this using DOS-style short mode. If the path
24535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24536  # take no chances and rewrite it.
24537  # Note: m4 eats our [], so we need to use [ and ] instead.
24538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24539  if test "x$has_forbidden_chars" != x; then
24540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24542  fi
24543
24544    # Output is in $new_path
24545
24546  windows_path="$new_path"
24547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24548    unix_path=`$CYGPATH -u "$windows_path"`
24549    new_path="$unix_path"
24550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24552    new_path="$unix_path"
24553  fi
24554
24555    # remove trailing .exe if any
24556    new_path="${new_path/%.exe/}"
24557
24558    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24559    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24560  fi
24561
24562  else
24563    # We're on a posix platform. Hooray! :)
24564    # First separate the path from the arguments. This will split at the first
24565    # space.
24566    complete="$AS"
24567    path="${complete%% *}"
24568    tmp="$complete EOL"
24569    arguments="${tmp#* }"
24570
24571    # Cannot rely on the command "which" here since it doesn't always work.
24572    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24573    if test -z "$is_absolute_path"; then
24574      # Path to executable is not absolute. Find it.
24575      IFS_save="$IFS"
24576      IFS=:
24577      for p in $PATH; do
24578        if test -f "$p/$path" && test -x "$p/$path"; then
24579          new_path="$p/$path"
24580          break
24581        fi
24582      done
24583      IFS="$IFS_save"
24584    else
24585      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24586$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24587      new_path="$path"
24588    fi
24589
24590    if test "x$new_path" = x; then
24591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24592$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24593        has_space=`$ECHO "$complete" | $GREP " "`
24594        if test "x$has_space" != x; then
24595          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24596$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24597        fi
24598        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24599      fi
24600  fi
24601
24602      # Now join together the path and the arguments once again
24603      if test "x$arguments" != xEOL; then
24604        new_complete="$new_path ${arguments% *}"
24605      else
24606        new_complete="$new_path"
24607      fi
24608
24609  if test "x$complete" != "x$new_complete"; then
24610      AS="$new_complete"
24611      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24612$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24613    fi
24614
24615else
24616    AS="$CC -c"
24617fi
24618
24619
24620if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24621    for ac_prog in gnm nm
24622do
24623  # Extract the first word of "$ac_prog", so it can be a program name with args.
24624set dummy $ac_prog; ac_word=$2
24625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24626$as_echo_n "checking for $ac_word... " >&6; }
24627if ${ac_cv_path_NM+:} false; then :
24628  $as_echo_n "(cached) " >&6
24629else
24630  case $NM in
24631  [\\/]* | ?:[\\/]*)
24632  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24633  ;;
24634  *)
24635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24636for as_dir in $PATH
24637do
24638  IFS=$as_save_IFS
24639  test -z "$as_dir" && as_dir=.
24640    for ac_exec_ext in '' $ac_executable_extensions; do
24641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24642    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24644    break 2
24645  fi
24646done
24647  done
24648IFS=$as_save_IFS
24649
24650  ;;
24651esac
24652fi
24653NM=$ac_cv_path_NM
24654if test -n "$NM"; then
24655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24656$as_echo "$NM" >&6; }
24657else
24658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24659$as_echo "no" >&6; }
24660fi
24661
24662
24663  test -n "$NM" && break
24664done
24665
24666
24667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24668
24669  # First separate the path from the arguments. This will split at the first
24670  # space.
24671  complete="$NM"
24672  path="${complete%% *}"
24673  tmp="$complete EOL"
24674  arguments="${tmp#* }"
24675
24676  # Input might be given as Windows format, start by converting to
24677  # unix format.
24678  new_path=`$CYGPATH -u "$path"`
24679
24680  # Now try to locate executable using which
24681  new_path=`$WHICH "$new_path" 2> /dev/null`
24682  # bat and cmd files are not always considered executable in cygwin causing which
24683  # to not find them
24684  if test "x$new_path" = x \
24685           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24686           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24687    new_path=`$CYGPATH -u "$path"`
24688  fi
24689  if test "x$new_path" = x; then
24690    # Oops. Which didn't find the executable.
24691    # The splitting of arguments from the executable at a space might have been incorrect,
24692    # since paths with space are more likely in Windows. Give it another try with the whole
24693    # argument.
24694    path="$complete"
24695    arguments="EOL"
24696    new_path=`$CYGPATH -u "$path"`
24697    new_path=`$WHICH "$new_path" 2> /dev/null`
24698    # bat and cmd files are not always considered executable in cygwin causing which
24699    # to not find them
24700    if test "x$new_path" = x \
24701             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24702             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24703      new_path=`$CYGPATH -u "$path"`
24704    fi
24705    if test "x$new_path" = x; then
24706      # It's still not found. Now this is an unrecoverable error.
24707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24708$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24709      has_space=`$ECHO "$complete" | $GREP " "`
24710      if test "x$has_space" != x; then
24711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24713      fi
24714      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24715    fi
24716  fi
24717
24718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24721  # "foo.exe" is OK but "foo" is an error.
24722  #
24723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24724  # It is also a way to make sure we got the proper file name for the real test later on.
24725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24726  if test "x$test_shortpath" = x; then
24727    # Short path failed, file does not exist as specified.
24728    # Try adding .exe or .cmd
24729    if test -f "${new_path}.exe"; then
24730       input_to_shortpath="${new_path}.exe"
24731    elif test -f "${new_path}.cmd"; then
24732       input_to_shortpath="${new_path}.cmd"
24733    else
24734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24735$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24736      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24737$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24738      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24739    fi
24740  else
24741    input_to_shortpath="$new_path"
24742  fi
24743
24744  # Call helper function which possibly converts this using DOS-style short mode.
24745  # If so, the updated path is stored in $new_path.
24746  new_path="$input_to_shortpath"
24747
24748  input_path="$input_to_shortpath"
24749  # Check if we need to convert this using DOS-style short mode. If the path
24750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24751  # take no chances and rewrite it.
24752  # Note: m4 eats our [], so we need to use [ and ] instead.
24753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24754  if test "x$has_forbidden_chars" != x; then
24755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24759      # Going to short mode and back again did indeed matter. Since short mode is
24760      # case insensitive, let's make it lowercase to improve readability.
24761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24762      # Now convert it back to Unix-stile (cygpath)
24763      input_path=`$CYGPATH -u "$shortmode_path"`
24764      new_path="$input_path"
24765    fi
24766  fi
24767
24768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24769  if test "x$test_cygdrive_prefix" = x; then
24770    # As a simple fix, exclude /usr/bin since it's not a real path.
24771    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24773      # a path prefixed by /cygdrive for fixpath to work.
24774      new_path="$CYGWIN_ROOT_PATH$input_path"
24775    fi
24776  fi
24777
24778  # remove trailing .exe if any
24779  new_path="${new_path/%.exe/}"
24780
24781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24782
24783  # First separate the path from the arguments. This will split at the first
24784  # space.
24785  complete="$NM"
24786  path="${complete%% *}"
24787  tmp="$complete EOL"
24788  arguments="${tmp#* }"
24789
24790  # Input might be given as Windows format, start by converting to
24791  # unix format.
24792  new_path="$path"
24793
24794  windows_path="$new_path"
24795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24796    unix_path=`$CYGPATH -u "$windows_path"`
24797    new_path="$unix_path"
24798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24800    new_path="$unix_path"
24801  fi
24802
24803
24804  # Now try to locate executable using which
24805  new_path=`$WHICH "$new_path" 2> /dev/null`
24806
24807  if test "x$new_path" = x; then
24808    # Oops. Which didn't find the executable.
24809    # The splitting of arguments from the executable at a space might have been incorrect,
24810    # since paths with space are more likely in Windows. Give it another try with the whole
24811    # argument.
24812    path="$complete"
24813    arguments="EOL"
24814    new_path="$path"
24815
24816  windows_path="$new_path"
24817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24818    unix_path=`$CYGPATH -u "$windows_path"`
24819    new_path="$unix_path"
24820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24822    new_path="$unix_path"
24823  fi
24824
24825
24826    new_path=`$WHICH "$new_path" 2> /dev/null`
24827
24828    if test "x$new_path" = x; then
24829      # It's still not found. Now this is an unrecoverable error.
24830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24831$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24832      has_space=`$ECHO "$complete" | $GREP " "`
24833      if test "x$has_space" != x; then
24834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24836      fi
24837      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24838    fi
24839  fi
24840
24841  # Now new_path has a complete unix path to the binary
24842  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24843    # Keep paths in /bin as-is, but remove trailing .exe if any
24844    new_path="${new_path/%.exe/}"
24845    # Do not save /bin paths to all_fixpath_prefixes!
24846  else
24847    # Not in mixed or Windows style, start by that.
24848    new_path=`cmd //c echo $new_path`
24849
24850  input_path="$new_path"
24851  # Check if we need to convert this using DOS-style short mode. If the path
24852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24853  # take no chances and rewrite it.
24854  # Note: m4 eats our [], so we need to use [ and ] instead.
24855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24856  if test "x$has_forbidden_chars" != x; then
24857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24859  fi
24860
24861    # Output is in $new_path
24862
24863  windows_path="$new_path"
24864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24865    unix_path=`$CYGPATH -u "$windows_path"`
24866    new_path="$unix_path"
24867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24869    new_path="$unix_path"
24870  fi
24871
24872    # remove trailing .exe if any
24873    new_path="${new_path/%.exe/}"
24874
24875    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24876    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24877  fi
24878
24879  else
24880    # We're on a posix platform. Hooray! :)
24881    # First separate the path from the arguments. This will split at the first
24882    # space.
24883    complete="$NM"
24884    path="${complete%% *}"
24885    tmp="$complete EOL"
24886    arguments="${tmp#* }"
24887
24888    # Cannot rely on the command "which" here since it doesn't always work.
24889    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24890    if test -z "$is_absolute_path"; then
24891      # Path to executable is not absolute. Find it.
24892      IFS_save="$IFS"
24893      IFS=:
24894      for p in $PATH; do
24895        if test -f "$p/$path" && test -x "$p/$path"; then
24896          new_path="$p/$path"
24897          break
24898        fi
24899      done
24900      IFS="$IFS_save"
24901    else
24902      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24903$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24904      new_path="$path"
24905    fi
24906
24907    if test "x$new_path" = x; then
24908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24909$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24910        has_space=`$ECHO "$complete" | $GREP " "`
24911        if test "x$has_space" != x; then
24912          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24913$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24914        fi
24915        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24916      fi
24917  fi
24918
24919      # Now join together the path and the arguments once again
24920      if test "x$arguments" != xEOL; then
24921        new_complete="$new_path ${arguments% *}"
24922      else
24923        new_complete="$new_path"
24924      fi
24925
24926  if test "x$complete" != "x$new_complete"; then
24927      NM="$new_complete"
24928      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24929$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24930    fi
24931
24932    # Extract the first word of "strip", so it can be a program name with args.
24933set dummy strip; ac_word=$2
24934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24935$as_echo_n "checking for $ac_word... " >&6; }
24936if ${ac_cv_path_STRIP+:} false; then :
24937  $as_echo_n "(cached) " >&6
24938else
24939  case $STRIP in
24940  [\\/]* | ?:[\\/]*)
24941  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24942  ;;
24943  *)
24944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24945for as_dir in $PATH
24946do
24947  IFS=$as_save_IFS
24948  test -z "$as_dir" && as_dir=.
24949    for ac_exec_ext in '' $ac_executable_extensions; do
24950  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24951    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24953    break 2
24954  fi
24955done
24956  done
24957IFS=$as_save_IFS
24958
24959  ;;
24960esac
24961fi
24962STRIP=$ac_cv_path_STRIP
24963if test -n "$STRIP"; then
24964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24965$as_echo "$STRIP" >&6; }
24966else
24967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24968$as_echo "no" >&6; }
24969fi
24970
24971
24972
24973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24974
24975  # First separate the path from the arguments. This will split at the first
24976  # space.
24977  complete="$STRIP"
24978  path="${complete%% *}"
24979  tmp="$complete EOL"
24980  arguments="${tmp#* }"
24981
24982  # Input might be given as Windows format, start by converting to
24983  # unix format.
24984  new_path=`$CYGPATH -u "$path"`
24985
24986  # Now try to locate executable using which
24987  new_path=`$WHICH "$new_path" 2> /dev/null`
24988  # bat and cmd files are not always considered executable in cygwin causing which
24989  # to not find them
24990  if test "x$new_path" = x \
24991           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24992           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24993    new_path=`$CYGPATH -u "$path"`
24994  fi
24995  if test "x$new_path" = x; then
24996    # Oops. Which didn't find the executable.
24997    # The splitting of arguments from the executable at a space might have been incorrect,
24998    # since paths with space are more likely in Windows. Give it another try with the whole
24999    # argument.
25000    path="$complete"
25001    arguments="EOL"
25002    new_path=`$CYGPATH -u "$path"`
25003    new_path=`$WHICH "$new_path" 2> /dev/null`
25004    # bat and cmd files are not always considered executable in cygwin causing which
25005    # to not find them
25006    if test "x$new_path" = x \
25007             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25008             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25009      new_path=`$CYGPATH -u "$path"`
25010    fi
25011    if test "x$new_path" = x; then
25012      # It's still not found. Now this is an unrecoverable error.
25013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25014$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25015      has_space=`$ECHO "$complete" | $GREP " "`
25016      if test "x$has_space" != x; then
25017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25019      fi
25020      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25021    fi
25022  fi
25023
25024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25027  # "foo.exe" is OK but "foo" is an error.
25028  #
25029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25030  # It is also a way to make sure we got the proper file name for the real test later on.
25031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25032  if test "x$test_shortpath" = x; then
25033    # Short path failed, file does not exist as specified.
25034    # Try adding .exe or .cmd
25035    if test -f "${new_path}.exe"; then
25036       input_to_shortpath="${new_path}.exe"
25037    elif test -f "${new_path}.cmd"; then
25038       input_to_shortpath="${new_path}.cmd"
25039    else
25040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25041$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25042      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25043$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25044      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25045    fi
25046  else
25047    input_to_shortpath="$new_path"
25048  fi
25049
25050  # Call helper function which possibly converts this using DOS-style short mode.
25051  # If so, the updated path is stored in $new_path.
25052  new_path="$input_to_shortpath"
25053
25054  input_path="$input_to_shortpath"
25055  # Check if we need to convert this using DOS-style short mode. If the path
25056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25057  # take no chances and rewrite it.
25058  # Note: m4 eats our [], so we need to use [ and ] instead.
25059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25060  if test "x$has_forbidden_chars" != x; then
25061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25065      # Going to short mode and back again did indeed matter. Since short mode is
25066      # case insensitive, let's make it lowercase to improve readability.
25067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25068      # Now convert it back to Unix-stile (cygpath)
25069      input_path=`$CYGPATH -u "$shortmode_path"`
25070      new_path="$input_path"
25071    fi
25072  fi
25073
25074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25075  if test "x$test_cygdrive_prefix" = x; then
25076    # As a simple fix, exclude /usr/bin since it's not a real path.
25077    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25079      # a path prefixed by /cygdrive for fixpath to work.
25080      new_path="$CYGWIN_ROOT_PATH$input_path"
25081    fi
25082  fi
25083
25084  # remove trailing .exe if any
25085  new_path="${new_path/%.exe/}"
25086
25087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25088
25089  # First separate the path from the arguments. This will split at the first
25090  # space.
25091  complete="$STRIP"
25092  path="${complete%% *}"
25093  tmp="$complete EOL"
25094  arguments="${tmp#* }"
25095
25096  # Input might be given as Windows format, start by converting to
25097  # unix format.
25098  new_path="$path"
25099
25100  windows_path="$new_path"
25101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25102    unix_path=`$CYGPATH -u "$windows_path"`
25103    new_path="$unix_path"
25104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25106    new_path="$unix_path"
25107  fi
25108
25109
25110  # Now try to locate executable using which
25111  new_path=`$WHICH "$new_path" 2> /dev/null`
25112
25113  if test "x$new_path" = x; then
25114    # Oops. Which didn't find the executable.
25115    # The splitting of arguments from the executable at a space might have been incorrect,
25116    # since paths with space are more likely in Windows. Give it another try with the whole
25117    # argument.
25118    path="$complete"
25119    arguments="EOL"
25120    new_path="$path"
25121
25122  windows_path="$new_path"
25123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25124    unix_path=`$CYGPATH -u "$windows_path"`
25125    new_path="$unix_path"
25126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25128    new_path="$unix_path"
25129  fi
25130
25131
25132    new_path=`$WHICH "$new_path" 2> /dev/null`
25133
25134    if test "x$new_path" = x; then
25135      # It's still not found. Now this is an unrecoverable error.
25136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25137$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25138      has_space=`$ECHO "$complete" | $GREP " "`
25139      if test "x$has_space" != x; then
25140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25142      fi
25143      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25144    fi
25145  fi
25146
25147  # Now new_path has a complete unix path to the binary
25148  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25149    # Keep paths in /bin as-is, but remove trailing .exe if any
25150    new_path="${new_path/%.exe/}"
25151    # Do not save /bin paths to all_fixpath_prefixes!
25152  else
25153    # Not in mixed or Windows style, start by that.
25154    new_path=`cmd //c echo $new_path`
25155
25156  input_path="$new_path"
25157  # Check if we need to convert this using DOS-style short mode. If the path
25158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25159  # take no chances and rewrite it.
25160  # Note: m4 eats our [], so we need to use [ and ] instead.
25161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25162  if test "x$has_forbidden_chars" != x; then
25163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25165  fi
25166
25167    # Output is in $new_path
25168
25169  windows_path="$new_path"
25170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25171    unix_path=`$CYGPATH -u "$windows_path"`
25172    new_path="$unix_path"
25173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25175    new_path="$unix_path"
25176  fi
25177
25178    # remove trailing .exe if any
25179    new_path="${new_path/%.exe/}"
25180
25181    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25182    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25183  fi
25184
25185  else
25186    # We're on a posix platform. Hooray! :)
25187    # First separate the path from the arguments. This will split at the first
25188    # space.
25189    complete="$STRIP"
25190    path="${complete%% *}"
25191    tmp="$complete EOL"
25192    arguments="${tmp#* }"
25193
25194    # Cannot rely on the command "which" here since it doesn't always work.
25195    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25196    if test -z "$is_absolute_path"; then
25197      # Path to executable is not absolute. Find it.
25198      IFS_save="$IFS"
25199      IFS=:
25200      for p in $PATH; do
25201        if test -f "$p/$path" && test -x "$p/$path"; then
25202          new_path="$p/$path"
25203          break
25204        fi
25205      done
25206      IFS="$IFS_save"
25207    else
25208      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25209$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25210      new_path="$path"
25211    fi
25212
25213    if test "x$new_path" = x; then
25214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25215$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25216        has_space=`$ECHO "$complete" | $GREP " "`
25217        if test "x$has_space" != x; then
25218          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25219$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25220        fi
25221        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25222      fi
25223  fi
25224
25225      # Now join together the path and the arguments once again
25226      if test "x$arguments" != xEOL; then
25227        new_complete="$new_path ${arguments% *}"
25228      else
25229        new_complete="$new_path"
25230      fi
25231
25232  if test "x$complete" != "x$new_complete"; then
25233      STRIP="$new_complete"
25234      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25235$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25236    fi
25237
25238    # Extract the first word of "mcs", so it can be a program name with args.
25239set dummy mcs; ac_word=$2
25240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25241$as_echo_n "checking for $ac_word... " >&6; }
25242if ${ac_cv_path_MCS+:} false; then :
25243  $as_echo_n "(cached) " >&6
25244else
25245  case $MCS in
25246  [\\/]* | ?:[\\/]*)
25247  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25248  ;;
25249  *)
25250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25251for as_dir in $PATH
25252do
25253  IFS=$as_save_IFS
25254  test -z "$as_dir" && as_dir=.
25255    for ac_exec_ext in '' $ac_executable_extensions; do
25256  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25257    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25259    break 2
25260  fi
25261done
25262  done
25263IFS=$as_save_IFS
25264
25265  ;;
25266esac
25267fi
25268MCS=$ac_cv_path_MCS
25269if test -n "$MCS"; then
25270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25271$as_echo "$MCS" >&6; }
25272else
25273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25274$as_echo "no" >&6; }
25275fi
25276
25277
25278
25279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25280
25281  # First separate the path from the arguments. This will split at the first
25282  # space.
25283  complete="$MCS"
25284  path="${complete%% *}"
25285  tmp="$complete EOL"
25286  arguments="${tmp#* }"
25287
25288  # Input might be given as Windows format, start by converting to
25289  # unix format.
25290  new_path=`$CYGPATH -u "$path"`
25291
25292  # Now try to locate executable using which
25293  new_path=`$WHICH "$new_path" 2> /dev/null`
25294  # bat and cmd files are not always considered executable in cygwin causing which
25295  # to not find them
25296  if test "x$new_path" = x \
25297           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25298           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25299    new_path=`$CYGPATH -u "$path"`
25300  fi
25301  if test "x$new_path" = x; then
25302    # Oops. Which didn't find the executable.
25303    # The splitting of arguments from the executable at a space might have been incorrect,
25304    # since paths with space are more likely in Windows. Give it another try with the whole
25305    # argument.
25306    path="$complete"
25307    arguments="EOL"
25308    new_path=`$CYGPATH -u "$path"`
25309    new_path=`$WHICH "$new_path" 2> /dev/null`
25310    # bat and cmd files are not always considered executable in cygwin causing which
25311    # to not find them
25312    if test "x$new_path" = x \
25313             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25314             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25315      new_path=`$CYGPATH -u "$path"`
25316    fi
25317    if test "x$new_path" = x; then
25318      # It's still not found. Now this is an unrecoverable error.
25319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25320$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25321      has_space=`$ECHO "$complete" | $GREP " "`
25322      if test "x$has_space" != x; then
25323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25325      fi
25326      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25327    fi
25328  fi
25329
25330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25333  # "foo.exe" is OK but "foo" is an error.
25334  #
25335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25336  # It is also a way to make sure we got the proper file name for the real test later on.
25337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25338  if test "x$test_shortpath" = x; then
25339    # Short path failed, file does not exist as specified.
25340    # Try adding .exe or .cmd
25341    if test -f "${new_path}.exe"; then
25342       input_to_shortpath="${new_path}.exe"
25343    elif test -f "${new_path}.cmd"; then
25344       input_to_shortpath="${new_path}.cmd"
25345    else
25346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25347$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25350      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25351    fi
25352  else
25353    input_to_shortpath="$new_path"
25354  fi
25355
25356  # Call helper function which possibly converts this using DOS-style short mode.
25357  # If so, the updated path is stored in $new_path.
25358  new_path="$input_to_shortpath"
25359
25360  input_path="$input_to_shortpath"
25361  # Check if we need to convert this using DOS-style short mode. If the path
25362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25363  # take no chances and rewrite it.
25364  # Note: m4 eats our [], so we need to use [ and ] instead.
25365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25366  if test "x$has_forbidden_chars" != x; then
25367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25371      # Going to short mode and back again did indeed matter. Since short mode is
25372      # case insensitive, let's make it lowercase to improve readability.
25373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25374      # Now convert it back to Unix-stile (cygpath)
25375      input_path=`$CYGPATH -u "$shortmode_path"`
25376      new_path="$input_path"
25377    fi
25378  fi
25379
25380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25381  if test "x$test_cygdrive_prefix" = x; then
25382    # As a simple fix, exclude /usr/bin since it's not a real path.
25383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25385      # a path prefixed by /cygdrive for fixpath to work.
25386      new_path="$CYGWIN_ROOT_PATH$input_path"
25387    fi
25388  fi
25389
25390  # remove trailing .exe if any
25391  new_path="${new_path/%.exe/}"
25392
25393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25394
25395  # First separate the path from the arguments. This will split at the first
25396  # space.
25397  complete="$MCS"
25398  path="${complete%% *}"
25399  tmp="$complete EOL"
25400  arguments="${tmp#* }"
25401
25402  # Input might be given as Windows format, start by converting to
25403  # unix format.
25404  new_path="$path"
25405
25406  windows_path="$new_path"
25407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25408    unix_path=`$CYGPATH -u "$windows_path"`
25409    new_path="$unix_path"
25410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25412    new_path="$unix_path"
25413  fi
25414
25415
25416  # Now try to locate executable using which
25417  new_path=`$WHICH "$new_path" 2> /dev/null`
25418
25419  if test "x$new_path" = x; then
25420    # Oops. Which didn't find the executable.
25421    # The splitting of arguments from the executable at a space might have been incorrect,
25422    # since paths with space are more likely in Windows. Give it another try with the whole
25423    # argument.
25424    path="$complete"
25425    arguments="EOL"
25426    new_path="$path"
25427
25428  windows_path="$new_path"
25429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25430    unix_path=`$CYGPATH -u "$windows_path"`
25431    new_path="$unix_path"
25432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25434    new_path="$unix_path"
25435  fi
25436
25437
25438    new_path=`$WHICH "$new_path" 2> /dev/null`
25439
25440    if test "x$new_path" = x; then
25441      # It's still not found. Now this is an unrecoverable error.
25442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25443$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25444      has_space=`$ECHO "$complete" | $GREP " "`
25445      if test "x$has_space" != x; then
25446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25448      fi
25449      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25450    fi
25451  fi
25452
25453  # Now new_path has a complete unix path to the binary
25454  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25455    # Keep paths in /bin as-is, but remove trailing .exe if any
25456    new_path="${new_path/%.exe/}"
25457    # Do not save /bin paths to all_fixpath_prefixes!
25458  else
25459    # Not in mixed or Windows style, start by that.
25460    new_path=`cmd //c echo $new_path`
25461
25462  input_path="$new_path"
25463  # Check if we need to convert this using DOS-style short mode. If the path
25464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25465  # take no chances and rewrite it.
25466  # Note: m4 eats our [], so we need to use [ and ] instead.
25467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25468  if test "x$has_forbidden_chars" != x; then
25469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25471  fi
25472
25473    # Output is in $new_path
25474
25475  windows_path="$new_path"
25476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25477    unix_path=`$CYGPATH -u "$windows_path"`
25478    new_path="$unix_path"
25479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25481    new_path="$unix_path"
25482  fi
25483
25484    # remove trailing .exe if any
25485    new_path="${new_path/%.exe/}"
25486
25487    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25488    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25489  fi
25490
25491  else
25492    # We're on a posix platform. Hooray! :)
25493    # First separate the path from the arguments. This will split at the first
25494    # space.
25495    complete="$MCS"
25496    path="${complete%% *}"
25497    tmp="$complete EOL"
25498    arguments="${tmp#* }"
25499
25500    # Cannot rely on the command "which" here since it doesn't always work.
25501    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25502    if test -z "$is_absolute_path"; then
25503      # Path to executable is not absolute. Find it.
25504      IFS_save="$IFS"
25505      IFS=:
25506      for p in $PATH; do
25507        if test -f "$p/$path" && test -x "$p/$path"; then
25508          new_path="$p/$path"
25509          break
25510        fi
25511      done
25512      IFS="$IFS_save"
25513    else
25514      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25515$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25516      new_path="$path"
25517    fi
25518
25519    if test "x$new_path" = x; then
25520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25521$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25522        has_space=`$ECHO "$complete" | $GREP " "`
25523        if test "x$has_space" != x; then
25524          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25525$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25526        fi
25527        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25528      fi
25529  fi
25530
25531      # Now join together the path and the arguments once again
25532      if test "x$arguments" != xEOL; then
25533        new_complete="$new_path ${arguments% *}"
25534      else
25535        new_complete="$new_path"
25536      fi
25537
25538  if test "x$complete" != "x$new_complete"; then
25539      MCS="$new_complete"
25540      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25541$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25542    fi
25543
25544elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25545    if test -n "$ac_tool_prefix"; then
25546  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25547set dummy ${ac_tool_prefix}nm; ac_word=$2
25548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25549$as_echo_n "checking for $ac_word... " >&6; }
25550if ${ac_cv_prog_NM+:} false; then :
25551  $as_echo_n "(cached) " >&6
25552else
25553  if test -n "$NM"; then
25554  ac_cv_prog_NM="$NM" # Let the user override the test.
25555else
25556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25557for as_dir in $PATH
25558do
25559  IFS=$as_save_IFS
25560  test -z "$as_dir" && as_dir=.
25561    for ac_exec_ext in '' $ac_executable_extensions; do
25562  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25563    ac_cv_prog_NM="${ac_tool_prefix}nm"
25564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25565    break 2
25566  fi
25567done
25568  done
25569IFS=$as_save_IFS
25570
25571fi
25572fi
25573NM=$ac_cv_prog_NM
25574if test -n "$NM"; then
25575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25576$as_echo "$NM" >&6; }
25577else
25578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25579$as_echo "no" >&6; }
25580fi
25581
25582
25583fi
25584if test -z "$ac_cv_prog_NM"; then
25585  ac_ct_NM=$NM
25586  # Extract the first word of "nm", so it can be a program name with args.
25587set dummy nm; ac_word=$2
25588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25589$as_echo_n "checking for $ac_word... " >&6; }
25590if ${ac_cv_prog_ac_ct_NM+:} false; then :
25591  $as_echo_n "(cached) " >&6
25592else
25593  if test -n "$ac_ct_NM"; then
25594  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25595else
25596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25597for as_dir in $PATH
25598do
25599  IFS=$as_save_IFS
25600  test -z "$as_dir" && as_dir=.
25601    for ac_exec_ext in '' $ac_executable_extensions; do
25602  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25603    ac_cv_prog_ac_ct_NM="nm"
25604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25605    break 2
25606  fi
25607done
25608  done
25609IFS=$as_save_IFS
25610
25611fi
25612fi
25613ac_ct_NM=$ac_cv_prog_ac_ct_NM
25614if test -n "$ac_ct_NM"; then
25615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25616$as_echo "$ac_ct_NM" >&6; }
25617else
25618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25619$as_echo "no" >&6; }
25620fi
25621
25622  if test "x$ac_ct_NM" = x; then
25623    NM=""
25624  else
25625    case $cross_compiling:$ac_tool_warned in
25626yes:)
25627{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25628$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25629ac_tool_warned=yes ;;
25630esac
25631    NM=$ac_ct_NM
25632  fi
25633else
25634  NM="$ac_cv_prog_NM"
25635fi
25636
25637
25638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25639
25640  # First separate the path from the arguments. This will split at the first
25641  # space.
25642  complete="$NM"
25643  path="${complete%% *}"
25644  tmp="$complete EOL"
25645  arguments="${tmp#* }"
25646
25647  # Input might be given as Windows format, start by converting to
25648  # unix format.
25649  new_path=`$CYGPATH -u "$path"`
25650
25651  # Now try to locate executable using which
25652  new_path=`$WHICH "$new_path" 2> /dev/null`
25653  # bat and cmd files are not always considered executable in cygwin causing which
25654  # to not find them
25655  if test "x$new_path" = x \
25656           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25657           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25658    new_path=`$CYGPATH -u "$path"`
25659  fi
25660  if test "x$new_path" = x; then
25661    # Oops. Which didn't find the executable.
25662    # The splitting of arguments from the executable at a space might have been incorrect,
25663    # since paths with space are more likely in Windows. Give it another try with the whole
25664    # argument.
25665    path="$complete"
25666    arguments="EOL"
25667    new_path=`$CYGPATH -u "$path"`
25668    new_path=`$WHICH "$new_path" 2> /dev/null`
25669    # bat and cmd files are not always considered executable in cygwin causing which
25670    # to not find them
25671    if test "x$new_path" = x \
25672             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25673             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25674      new_path=`$CYGPATH -u "$path"`
25675    fi
25676    if test "x$new_path" = x; then
25677      # It's still not found. Now this is an unrecoverable error.
25678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25679$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25680      has_space=`$ECHO "$complete" | $GREP " "`
25681      if test "x$has_space" != x; then
25682        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25683$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25684      fi
25685      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25686    fi
25687  fi
25688
25689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25692  # "foo.exe" is OK but "foo" is an error.
25693  #
25694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25695  # It is also a way to make sure we got the proper file name for the real test later on.
25696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25697  if test "x$test_shortpath" = x; then
25698    # Short path failed, file does not exist as specified.
25699    # Try adding .exe or .cmd
25700    if test -f "${new_path}.exe"; then
25701       input_to_shortpath="${new_path}.exe"
25702    elif test -f "${new_path}.cmd"; then
25703       input_to_shortpath="${new_path}.cmd"
25704    else
25705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25706$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25707      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25708$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25709      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25710    fi
25711  else
25712    input_to_shortpath="$new_path"
25713  fi
25714
25715  # Call helper function which possibly converts this using DOS-style short mode.
25716  # If so, the updated path is stored in $new_path.
25717  new_path="$input_to_shortpath"
25718
25719  input_path="$input_to_shortpath"
25720  # Check if we need to convert this using DOS-style short mode. If the path
25721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25722  # take no chances and rewrite it.
25723  # Note: m4 eats our [], so we need to use [ and ] instead.
25724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25725  if test "x$has_forbidden_chars" != x; then
25726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25730      # Going to short mode and back again did indeed matter. Since short mode is
25731      # case insensitive, let's make it lowercase to improve readability.
25732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25733      # Now convert it back to Unix-stile (cygpath)
25734      input_path=`$CYGPATH -u "$shortmode_path"`
25735      new_path="$input_path"
25736    fi
25737  fi
25738
25739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25740  if test "x$test_cygdrive_prefix" = x; then
25741    # As a simple fix, exclude /usr/bin since it's not a real path.
25742    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25744      # a path prefixed by /cygdrive for fixpath to work.
25745      new_path="$CYGWIN_ROOT_PATH$input_path"
25746    fi
25747  fi
25748
25749  # remove trailing .exe if any
25750  new_path="${new_path/%.exe/}"
25751
25752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25753
25754  # First separate the path from the arguments. This will split at the first
25755  # space.
25756  complete="$NM"
25757  path="${complete%% *}"
25758  tmp="$complete EOL"
25759  arguments="${tmp#* }"
25760
25761  # Input might be given as Windows format, start by converting to
25762  # unix format.
25763  new_path="$path"
25764
25765  windows_path="$new_path"
25766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25767    unix_path=`$CYGPATH -u "$windows_path"`
25768    new_path="$unix_path"
25769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25771    new_path="$unix_path"
25772  fi
25773
25774
25775  # Now try to locate executable using which
25776  new_path=`$WHICH "$new_path" 2> /dev/null`
25777
25778  if test "x$new_path" = x; then
25779    # Oops. Which didn't find the executable.
25780    # The splitting of arguments from the executable at a space might have been incorrect,
25781    # since paths with space are more likely in Windows. Give it another try with the whole
25782    # argument.
25783    path="$complete"
25784    arguments="EOL"
25785    new_path="$path"
25786
25787  windows_path="$new_path"
25788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25789    unix_path=`$CYGPATH -u "$windows_path"`
25790    new_path="$unix_path"
25791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25793    new_path="$unix_path"
25794  fi
25795
25796
25797    new_path=`$WHICH "$new_path" 2> /dev/null`
25798
25799    if test "x$new_path" = x; then
25800      # It's still not found. Now this is an unrecoverable error.
25801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25802$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25803      has_space=`$ECHO "$complete" | $GREP " "`
25804      if test "x$has_space" != x; then
25805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25807      fi
25808      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25809    fi
25810  fi
25811
25812  # Now new_path has a complete unix path to the binary
25813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25814    # Keep paths in /bin as-is, but remove trailing .exe if any
25815    new_path="${new_path/%.exe/}"
25816    # Do not save /bin paths to all_fixpath_prefixes!
25817  else
25818    # Not in mixed or Windows style, start by that.
25819    new_path=`cmd //c echo $new_path`
25820
25821  input_path="$new_path"
25822  # Check if we need to convert this using DOS-style short mode. If the path
25823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25824  # take no chances and rewrite it.
25825  # Note: m4 eats our [], so we need to use [ and ] instead.
25826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25827  if test "x$has_forbidden_chars" != x; then
25828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25830  fi
25831
25832    # Output is in $new_path
25833
25834  windows_path="$new_path"
25835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25836    unix_path=`$CYGPATH -u "$windows_path"`
25837    new_path="$unix_path"
25838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25840    new_path="$unix_path"
25841  fi
25842
25843    # remove trailing .exe if any
25844    new_path="${new_path/%.exe/}"
25845
25846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25848  fi
25849
25850  else
25851    # We're on a posix platform. Hooray! :)
25852    # First separate the path from the arguments. This will split at the first
25853    # space.
25854    complete="$NM"
25855    path="${complete%% *}"
25856    tmp="$complete EOL"
25857    arguments="${tmp#* }"
25858
25859    # Cannot rely on the command "which" here since it doesn't always work.
25860    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25861    if test -z "$is_absolute_path"; then
25862      # Path to executable is not absolute. Find it.
25863      IFS_save="$IFS"
25864      IFS=:
25865      for p in $PATH; do
25866        if test -f "$p/$path" && test -x "$p/$path"; then
25867          new_path="$p/$path"
25868          break
25869        fi
25870      done
25871      IFS="$IFS_save"
25872    else
25873      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25874$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25875      new_path="$path"
25876    fi
25877
25878    if test "x$new_path" = x; then
25879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25880$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25881        has_space=`$ECHO "$complete" | $GREP " "`
25882        if test "x$has_space" != x; then
25883          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25885        fi
25886        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25887      fi
25888  fi
25889
25890      # Now join together the path and the arguments once again
25891      if test "x$arguments" != xEOL; then
25892        new_complete="$new_path ${arguments% *}"
25893      else
25894        new_complete="$new_path"
25895      fi
25896
25897  if test "x$complete" != "x$new_complete"; then
25898      NM="$new_complete"
25899      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25900$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25901    fi
25902
25903    if test -n "$ac_tool_prefix"; then
25904  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25905set dummy ${ac_tool_prefix}strip; ac_word=$2
25906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25907$as_echo_n "checking for $ac_word... " >&6; }
25908if ${ac_cv_prog_STRIP+:} false; then :
25909  $as_echo_n "(cached) " >&6
25910else
25911  if test -n "$STRIP"; then
25912  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25913else
25914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25915for as_dir in $PATH
25916do
25917  IFS=$as_save_IFS
25918  test -z "$as_dir" && as_dir=.
25919    for ac_exec_ext in '' $ac_executable_extensions; do
25920  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25921    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25923    break 2
25924  fi
25925done
25926  done
25927IFS=$as_save_IFS
25928
25929fi
25930fi
25931STRIP=$ac_cv_prog_STRIP
25932if test -n "$STRIP"; then
25933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25934$as_echo "$STRIP" >&6; }
25935else
25936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25937$as_echo "no" >&6; }
25938fi
25939
25940
25941fi
25942if test -z "$ac_cv_prog_STRIP"; then
25943  ac_ct_STRIP=$STRIP
25944  # Extract the first word of "strip", so it can be a program name with args.
25945set dummy strip; ac_word=$2
25946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25947$as_echo_n "checking for $ac_word... " >&6; }
25948if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
25949  $as_echo_n "(cached) " >&6
25950else
25951  if test -n "$ac_ct_STRIP"; then
25952  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25953else
25954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25955for as_dir in $PATH
25956do
25957  IFS=$as_save_IFS
25958  test -z "$as_dir" && as_dir=.
25959    for ac_exec_ext in '' $ac_executable_extensions; do
25960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25961    ac_cv_prog_ac_ct_STRIP="strip"
25962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25963    break 2
25964  fi
25965done
25966  done
25967IFS=$as_save_IFS
25968
25969fi
25970fi
25971ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25972if test -n "$ac_ct_STRIP"; then
25973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25974$as_echo "$ac_ct_STRIP" >&6; }
25975else
25976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25977$as_echo "no" >&6; }
25978fi
25979
25980  if test "x$ac_ct_STRIP" = x; then
25981    STRIP=""
25982  else
25983    case $cross_compiling:$ac_tool_warned in
25984yes:)
25985{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25986$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25987ac_tool_warned=yes ;;
25988esac
25989    STRIP=$ac_ct_STRIP
25990  fi
25991else
25992  STRIP="$ac_cv_prog_STRIP"
25993fi
25994
25995
25996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25997
25998  # First separate the path from the arguments. This will split at the first
25999  # space.
26000  complete="$STRIP"
26001  path="${complete%% *}"
26002  tmp="$complete EOL"
26003  arguments="${tmp#* }"
26004
26005  # Input might be given as Windows format, start by converting to
26006  # unix format.
26007  new_path=`$CYGPATH -u "$path"`
26008
26009  # Now try to locate executable using which
26010  new_path=`$WHICH "$new_path" 2> /dev/null`
26011  # bat and cmd files are not always considered executable in cygwin causing which
26012  # to not find them
26013  if test "x$new_path" = x \
26014           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26015           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26016    new_path=`$CYGPATH -u "$path"`
26017  fi
26018  if test "x$new_path" = x; then
26019    # Oops. Which didn't find the executable.
26020    # The splitting of arguments from the executable at a space might have been incorrect,
26021    # since paths with space are more likely in Windows. Give it another try with the whole
26022    # argument.
26023    path="$complete"
26024    arguments="EOL"
26025    new_path=`$CYGPATH -u "$path"`
26026    new_path=`$WHICH "$new_path" 2> /dev/null`
26027    # bat and cmd files are not always considered executable in cygwin causing which
26028    # to not find them
26029    if test "x$new_path" = x \
26030             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26031             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26032      new_path=`$CYGPATH -u "$path"`
26033    fi
26034    if test "x$new_path" = x; then
26035      # It's still not found. Now this is an unrecoverable error.
26036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26037$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26038      has_space=`$ECHO "$complete" | $GREP " "`
26039      if test "x$has_space" != x; then
26040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26042      fi
26043      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26044    fi
26045  fi
26046
26047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26050  # "foo.exe" is OK but "foo" is an error.
26051  #
26052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26053  # It is also a way to make sure we got the proper file name for the real test later on.
26054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26055  if test "x$test_shortpath" = x; then
26056    # Short path failed, file does not exist as specified.
26057    # Try adding .exe or .cmd
26058    if test -f "${new_path}.exe"; then
26059       input_to_shortpath="${new_path}.exe"
26060    elif test -f "${new_path}.cmd"; then
26061       input_to_shortpath="${new_path}.cmd"
26062    else
26063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26064$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26067      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26068    fi
26069  else
26070    input_to_shortpath="$new_path"
26071  fi
26072
26073  # Call helper function which possibly converts this using DOS-style short mode.
26074  # If so, the updated path is stored in $new_path.
26075  new_path="$input_to_shortpath"
26076
26077  input_path="$input_to_shortpath"
26078  # Check if we need to convert this using DOS-style short mode. If the path
26079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26080  # take no chances and rewrite it.
26081  # Note: m4 eats our [], so we need to use [ and ] instead.
26082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26083  if test "x$has_forbidden_chars" != x; then
26084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26088      # Going to short mode and back again did indeed matter. Since short mode is
26089      # case insensitive, let's make it lowercase to improve readability.
26090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26091      # Now convert it back to Unix-stile (cygpath)
26092      input_path=`$CYGPATH -u "$shortmode_path"`
26093      new_path="$input_path"
26094    fi
26095  fi
26096
26097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26098  if test "x$test_cygdrive_prefix" = x; then
26099    # As a simple fix, exclude /usr/bin since it's not a real path.
26100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26102      # a path prefixed by /cygdrive for fixpath to work.
26103      new_path="$CYGWIN_ROOT_PATH$input_path"
26104    fi
26105  fi
26106
26107  # remove trailing .exe if any
26108  new_path="${new_path/%.exe/}"
26109
26110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26111
26112  # First separate the path from the arguments. This will split at the first
26113  # space.
26114  complete="$STRIP"
26115  path="${complete%% *}"
26116  tmp="$complete EOL"
26117  arguments="${tmp#* }"
26118
26119  # Input might be given as Windows format, start by converting to
26120  # unix format.
26121  new_path="$path"
26122
26123  windows_path="$new_path"
26124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26125    unix_path=`$CYGPATH -u "$windows_path"`
26126    new_path="$unix_path"
26127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26129    new_path="$unix_path"
26130  fi
26131
26132
26133  # Now try to locate executable using which
26134  new_path=`$WHICH "$new_path" 2> /dev/null`
26135
26136  if test "x$new_path" = x; then
26137    # Oops. Which didn't find the executable.
26138    # The splitting of arguments from the executable at a space might have been incorrect,
26139    # since paths with space are more likely in Windows. Give it another try with the whole
26140    # argument.
26141    path="$complete"
26142    arguments="EOL"
26143    new_path="$path"
26144
26145  windows_path="$new_path"
26146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26147    unix_path=`$CYGPATH -u "$windows_path"`
26148    new_path="$unix_path"
26149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26151    new_path="$unix_path"
26152  fi
26153
26154
26155    new_path=`$WHICH "$new_path" 2> /dev/null`
26156
26157    if test "x$new_path" = x; then
26158      # It's still not found. Now this is an unrecoverable error.
26159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26160$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26161      has_space=`$ECHO "$complete" | $GREP " "`
26162      if test "x$has_space" != x; then
26163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26165      fi
26166      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26167    fi
26168  fi
26169
26170  # Now new_path has a complete unix path to the binary
26171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26172    # Keep paths in /bin as-is, but remove trailing .exe if any
26173    new_path="${new_path/%.exe/}"
26174    # Do not save /bin paths to all_fixpath_prefixes!
26175  else
26176    # Not in mixed or Windows style, start by that.
26177    new_path=`cmd //c echo $new_path`
26178
26179  input_path="$new_path"
26180  # Check if we need to convert this using DOS-style short mode. If the path
26181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26182  # take no chances and rewrite it.
26183  # Note: m4 eats our [], so we need to use [ and ] instead.
26184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26185  if test "x$has_forbidden_chars" != x; then
26186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26188  fi
26189
26190    # Output is in $new_path
26191
26192  windows_path="$new_path"
26193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26194    unix_path=`$CYGPATH -u "$windows_path"`
26195    new_path="$unix_path"
26196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26198    new_path="$unix_path"
26199  fi
26200
26201    # remove trailing .exe if any
26202    new_path="${new_path/%.exe/}"
26203
26204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26206  fi
26207
26208  else
26209    # We're on a posix platform. Hooray! :)
26210    # First separate the path from the arguments. This will split at the first
26211    # space.
26212    complete="$STRIP"
26213    path="${complete%% *}"
26214    tmp="$complete EOL"
26215    arguments="${tmp#* }"
26216
26217    # Cannot rely on the command "which" here since it doesn't always work.
26218    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26219    if test -z "$is_absolute_path"; then
26220      # Path to executable is not absolute. Find it.
26221      IFS_save="$IFS"
26222      IFS=:
26223      for p in $PATH; do
26224        if test -f "$p/$path" && test -x "$p/$path"; then
26225          new_path="$p/$path"
26226          break
26227        fi
26228      done
26229      IFS="$IFS_save"
26230    else
26231      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26232$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26233      new_path="$path"
26234    fi
26235
26236    if test "x$new_path" = x; then
26237        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26238$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26239        has_space=`$ECHO "$complete" | $GREP " "`
26240        if test "x$has_space" != x; then
26241          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26242$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26243        fi
26244        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26245      fi
26246  fi
26247
26248      # Now join together the path and the arguments once again
26249      if test "x$arguments" != xEOL; then
26250        new_complete="$new_path ${arguments% *}"
26251      else
26252        new_complete="$new_path"
26253      fi
26254
26255  if test "x$complete" != "x$new_complete"; then
26256      STRIP="$new_complete"
26257      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26258$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26259    fi
26260
26261fi
26262
26263# objcopy is used for moving debug symbols to separate files when
26264# full debug symbols are enabled.
26265if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26266    if test -n "$ac_tool_prefix"; then
26267  for ac_prog in gobjcopy objcopy
26268  do
26269    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26270set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26272$as_echo_n "checking for $ac_word... " >&6; }
26273if ${ac_cv_prog_OBJCOPY+:} false; then :
26274  $as_echo_n "(cached) " >&6
26275else
26276  if test -n "$OBJCOPY"; then
26277  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26278else
26279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26280for as_dir in $PATH
26281do
26282  IFS=$as_save_IFS
26283  test -z "$as_dir" && as_dir=.
26284    for ac_exec_ext in '' $ac_executable_extensions; do
26285  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26286    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26288    break 2
26289  fi
26290done
26291  done
26292IFS=$as_save_IFS
26293
26294fi
26295fi
26296OBJCOPY=$ac_cv_prog_OBJCOPY
26297if test -n "$OBJCOPY"; then
26298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26299$as_echo "$OBJCOPY" >&6; }
26300else
26301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26302$as_echo "no" >&6; }
26303fi
26304
26305
26306    test -n "$OBJCOPY" && break
26307  done
26308fi
26309if test -z "$OBJCOPY"; then
26310  ac_ct_OBJCOPY=$OBJCOPY
26311  for ac_prog in gobjcopy objcopy
26312do
26313  # Extract the first word of "$ac_prog", so it can be a program name with args.
26314set dummy $ac_prog; ac_word=$2
26315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26316$as_echo_n "checking for $ac_word... " >&6; }
26317if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26318  $as_echo_n "(cached) " >&6
26319else
26320  if test -n "$ac_ct_OBJCOPY"; then
26321  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26322else
26323as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26324for as_dir in $PATH
26325do
26326  IFS=$as_save_IFS
26327  test -z "$as_dir" && as_dir=.
26328    for ac_exec_ext in '' $ac_executable_extensions; do
26329  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26330    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26332    break 2
26333  fi
26334done
26335  done
26336IFS=$as_save_IFS
26337
26338fi
26339fi
26340ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26341if test -n "$ac_ct_OBJCOPY"; then
26342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26343$as_echo "$ac_ct_OBJCOPY" >&6; }
26344else
26345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26346$as_echo "no" >&6; }
26347fi
26348
26349
26350  test -n "$ac_ct_OBJCOPY" && break
26351done
26352
26353  if test "x$ac_ct_OBJCOPY" = x; then
26354    OBJCOPY=""
26355  else
26356    case $cross_compiling:$ac_tool_warned in
26357yes:)
26358{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26359$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26360ac_tool_warned=yes ;;
26361esac
26362    OBJCOPY=$ac_ct_OBJCOPY
26363  fi
26364fi
26365
26366    # Only call fixup if objcopy was found.
26367    if test -n "$OBJCOPY"; then
26368
26369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26370
26371  # First separate the path from the arguments. This will split at the first
26372  # space.
26373  complete="$OBJCOPY"
26374  path="${complete%% *}"
26375  tmp="$complete EOL"
26376  arguments="${tmp#* }"
26377
26378  # Input might be given as Windows format, start by converting to
26379  # unix format.
26380  new_path=`$CYGPATH -u "$path"`
26381
26382  # Now try to locate executable using which
26383  new_path=`$WHICH "$new_path" 2> /dev/null`
26384  # bat and cmd files are not always considered executable in cygwin causing which
26385  # to not find them
26386  if test "x$new_path" = x \
26387           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26388           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26389    new_path=`$CYGPATH -u "$path"`
26390  fi
26391  if test "x$new_path" = x; then
26392    # Oops. Which didn't find the executable.
26393    # The splitting of arguments from the executable at a space might have been incorrect,
26394    # since paths with space are more likely in Windows. Give it another try with the whole
26395    # argument.
26396    path="$complete"
26397    arguments="EOL"
26398    new_path=`$CYGPATH -u "$path"`
26399    new_path=`$WHICH "$new_path" 2> /dev/null`
26400    # bat and cmd files are not always considered executable in cygwin causing which
26401    # to not find them
26402    if test "x$new_path" = x \
26403             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26404             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26405      new_path=`$CYGPATH -u "$path"`
26406    fi
26407    if test "x$new_path" = x; then
26408      # It's still not found. Now this is an unrecoverable error.
26409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26410$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26411      has_space=`$ECHO "$complete" | $GREP " "`
26412      if test "x$has_space" != x; then
26413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26415      fi
26416      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26417    fi
26418  fi
26419
26420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26423  # "foo.exe" is OK but "foo" is an error.
26424  #
26425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26426  # It is also a way to make sure we got the proper file name for the real test later on.
26427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26428  if test "x$test_shortpath" = x; then
26429    # Short path failed, file does not exist as specified.
26430    # Try adding .exe or .cmd
26431    if test -f "${new_path}.exe"; then
26432       input_to_shortpath="${new_path}.exe"
26433    elif test -f "${new_path}.cmd"; then
26434       input_to_shortpath="${new_path}.cmd"
26435    else
26436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26437$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26440      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26441    fi
26442  else
26443    input_to_shortpath="$new_path"
26444  fi
26445
26446  # Call helper function which possibly converts this using DOS-style short mode.
26447  # If so, the updated path is stored in $new_path.
26448  new_path="$input_to_shortpath"
26449
26450  input_path="$input_to_shortpath"
26451  # Check if we need to convert this using DOS-style short mode. If the path
26452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26453  # take no chances and rewrite it.
26454  # Note: m4 eats our [], so we need to use [ and ] instead.
26455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26456  if test "x$has_forbidden_chars" != x; then
26457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26461      # Going to short mode and back again did indeed matter. Since short mode is
26462      # case insensitive, let's make it lowercase to improve readability.
26463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26464      # Now convert it back to Unix-stile (cygpath)
26465      input_path=`$CYGPATH -u "$shortmode_path"`
26466      new_path="$input_path"
26467    fi
26468  fi
26469
26470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26471  if test "x$test_cygdrive_prefix" = x; then
26472    # As a simple fix, exclude /usr/bin since it's not a real path.
26473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26475      # a path prefixed by /cygdrive for fixpath to work.
26476      new_path="$CYGWIN_ROOT_PATH$input_path"
26477    fi
26478  fi
26479
26480  # remove trailing .exe if any
26481  new_path="${new_path/%.exe/}"
26482
26483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26484
26485  # First separate the path from the arguments. This will split at the first
26486  # space.
26487  complete="$OBJCOPY"
26488  path="${complete%% *}"
26489  tmp="$complete EOL"
26490  arguments="${tmp#* }"
26491
26492  # Input might be given as Windows format, start by converting to
26493  # unix format.
26494  new_path="$path"
26495
26496  windows_path="$new_path"
26497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26498    unix_path=`$CYGPATH -u "$windows_path"`
26499    new_path="$unix_path"
26500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26502    new_path="$unix_path"
26503  fi
26504
26505
26506  # Now try to locate executable using which
26507  new_path=`$WHICH "$new_path" 2> /dev/null`
26508
26509  if test "x$new_path" = x; then
26510    # Oops. Which didn't find the executable.
26511    # The splitting of arguments from the executable at a space might have been incorrect,
26512    # since paths with space are more likely in Windows. Give it another try with the whole
26513    # argument.
26514    path="$complete"
26515    arguments="EOL"
26516    new_path="$path"
26517
26518  windows_path="$new_path"
26519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26520    unix_path=`$CYGPATH -u "$windows_path"`
26521    new_path="$unix_path"
26522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26524    new_path="$unix_path"
26525  fi
26526
26527
26528    new_path=`$WHICH "$new_path" 2> /dev/null`
26529
26530    if test "x$new_path" = x; then
26531      # It's still not found. Now this is an unrecoverable error.
26532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26533$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26534      has_space=`$ECHO "$complete" | $GREP " "`
26535      if test "x$has_space" != x; then
26536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26538      fi
26539      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26540    fi
26541  fi
26542
26543  # Now new_path has a complete unix path to the binary
26544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26545    # Keep paths in /bin as-is, but remove trailing .exe if any
26546    new_path="${new_path/%.exe/}"
26547    # Do not save /bin paths to all_fixpath_prefixes!
26548  else
26549    # Not in mixed or Windows style, start by that.
26550    new_path=`cmd //c echo $new_path`
26551
26552  input_path="$new_path"
26553  # Check if we need to convert this using DOS-style short mode. If the path
26554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26555  # take no chances and rewrite it.
26556  # Note: m4 eats our [], so we need to use [ and ] instead.
26557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26558  if test "x$has_forbidden_chars" != x; then
26559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26561  fi
26562
26563    # Output is in $new_path
26564
26565  windows_path="$new_path"
26566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26567    unix_path=`$CYGPATH -u "$windows_path"`
26568    new_path="$unix_path"
26569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26571    new_path="$unix_path"
26572  fi
26573
26574    # remove trailing .exe if any
26575    new_path="${new_path/%.exe/}"
26576
26577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26579  fi
26580
26581  else
26582    # We're on a posix platform. Hooray! :)
26583    # First separate the path from the arguments. This will split at the first
26584    # space.
26585    complete="$OBJCOPY"
26586    path="${complete%% *}"
26587    tmp="$complete EOL"
26588    arguments="${tmp#* }"
26589
26590    # Cannot rely on the command "which" here since it doesn't always work.
26591    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26592    if test -z "$is_absolute_path"; then
26593      # Path to executable is not absolute. Find it.
26594      IFS_save="$IFS"
26595      IFS=:
26596      for p in $PATH; do
26597        if test -f "$p/$path" && test -x "$p/$path"; then
26598          new_path="$p/$path"
26599          break
26600        fi
26601      done
26602      IFS="$IFS_save"
26603    else
26604      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26605$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26606      new_path="$path"
26607    fi
26608
26609    if test "x$new_path" = x; then
26610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26611$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26612        has_space=`$ECHO "$complete" | $GREP " "`
26613        if test "x$has_space" != x; then
26614          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26615$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26616        fi
26617        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26618      fi
26619  fi
26620
26621      # Now join together the path and the arguments once again
26622      if test "x$arguments" != xEOL; then
26623        new_complete="$new_path ${arguments% *}"
26624      else
26625        new_complete="$new_path"
26626      fi
26627
26628  if test "x$complete" != "x$new_complete"; then
26629      OBJCOPY="$new_complete"
26630      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26631$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26632    fi
26633
26634    fi
26635fi
26636
26637if test -n "$ac_tool_prefix"; then
26638  for ac_prog in gobjdump objdump
26639  do
26640    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26641set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26643$as_echo_n "checking for $ac_word... " >&6; }
26644if ${ac_cv_prog_OBJDUMP+:} false; then :
26645  $as_echo_n "(cached) " >&6
26646else
26647  if test -n "$OBJDUMP"; then
26648  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26649else
26650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26651for as_dir in $PATH
26652do
26653  IFS=$as_save_IFS
26654  test -z "$as_dir" && as_dir=.
26655    for ac_exec_ext in '' $ac_executable_extensions; do
26656  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26657    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26659    break 2
26660  fi
26661done
26662  done
26663IFS=$as_save_IFS
26664
26665fi
26666fi
26667OBJDUMP=$ac_cv_prog_OBJDUMP
26668if test -n "$OBJDUMP"; then
26669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26670$as_echo "$OBJDUMP" >&6; }
26671else
26672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26673$as_echo "no" >&6; }
26674fi
26675
26676
26677    test -n "$OBJDUMP" && break
26678  done
26679fi
26680if test -z "$OBJDUMP"; then
26681  ac_ct_OBJDUMP=$OBJDUMP
26682  for ac_prog in gobjdump objdump
26683do
26684  # Extract the first word of "$ac_prog", so it can be a program name with args.
26685set dummy $ac_prog; ac_word=$2
26686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26687$as_echo_n "checking for $ac_word... " >&6; }
26688if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
26689  $as_echo_n "(cached) " >&6
26690else
26691  if test -n "$ac_ct_OBJDUMP"; then
26692  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26693else
26694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26695for as_dir in $PATH
26696do
26697  IFS=$as_save_IFS
26698  test -z "$as_dir" && as_dir=.
26699    for ac_exec_ext in '' $ac_executable_extensions; do
26700  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26701    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26703    break 2
26704  fi
26705done
26706  done
26707IFS=$as_save_IFS
26708
26709fi
26710fi
26711ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26712if test -n "$ac_ct_OBJDUMP"; then
26713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26714$as_echo "$ac_ct_OBJDUMP" >&6; }
26715else
26716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26717$as_echo "no" >&6; }
26718fi
26719
26720
26721  test -n "$ac_ct_OBJDUMP" && break
26722done
26723
26724  if test "x$ac_ct_OBJDUMP" = x; then
26725    OBJDUMP=""
26726  else
26727    case $cross_compiling:$ac_tool_warned in
26728yes:)
26729{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26730$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26731ac_tool_warned=yes ;;
26732esac
26733    OBJDUMP=$ac_ct_OBJDUMP
26734  fi
26735fi
26736
26737if test "x$OBJDUMP" != x; then
26738  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26739
26740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26741
26742  # First separate the path from the arguments. This will split at the first
26743  # space.
26744  complete="$OBJDUMP"
26745  path="${complete%% *}"
26746  tmp="$complete EOL"
26747  arguments="${tmp#* }"
26748
26749  # Input might be given as Windows format, start by converting to
26750  # unix format.
26751  new_path=`$CYGPATH -u "$path"`
26752
26753  # Now try to locate executable using which
26754  new_path=`$WHICH "$new_path" 2> /dev/null`
26755  # bat and cmd files are not always considered executable in cygwin causing which
26756  # to not find them
26757  if test "x$new_path" = x \
26758           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26759           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26760    new_path=`$CYGPATH -u "$path"`
26761  fi
26762  if test "x$new_path" = x; then
26763    # Oops. Which didn't find the executable.
26764    # The splitting of arguments from the executable at a space might have been incorrect,
26765    # since paths with space are more likely in Windows. Give it another try with the whole
26766    # argument.
26767    path="$complete"
26768    arguments="EOL"
26769    new_path=`$CYGPATH -u "$path"`
26770    new_path=`$WHICH "$new_path" 2> /dev/null`
26771    # bat and cmd files are not always considered executable in cygwin causing which
26772    # to not find them
26773    if test "x$new_path" = x \
26774             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26775             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26776      new_path=`$CYGPATH -u "$path"`
26777    fi
26778    if test "x$new_path" = x; then
26779      # It's still not found. Now this is an unrecoverable error.
26780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26781$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26782      has_space=`$ECHO "$complete" | $GREP " "`
26783      if test "x$has_space" != x; then
26784        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26785$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26786      fi
26787      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26788    fi
26789  fi
26790
26791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26794  # "foo.exe" is OK but "foo" is an error.
26795  #
26796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26797  # It is also a way to make sure we got the proper file name for the real test later on.
26798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26799  if test "x$test_shortpath" = x; then
26800    # Short path failed, file does not exist as specified.
26801    # Try adding .exe or .cmd
26802    if test -f "${new_path}.exe"; then
26803       input_to_shortpath="${new_path}.exe"
26804    elif test -f "${new_path}.cmd"; then
26805       input_to_shortpath="${new_path}.cmd"
26806    else
26807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26808$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26809      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26810$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26811      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26812    fi
26813  else
26814    input_to_shortpath="$new_path"
26815  fi
26816
26817  # Call helper function which possibly converts this using DOS-style short mode.
26818  # If so, the updated path is stored in $new_path.
26819  new_path="$input_to_shortpath"
26820
26821  input_path="$input_to_shortpath"
26822  # Check if we need to convert this using DOS-style short mode. If the path
26823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26824  # take no chances and rewrite it.
26825  # Note: m4 eats our [], so we need to use [ and ] instead.
26826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26827  if test "x$has_forbidden_chars" != x; then
26828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26832      # Going to short mode and back again did indeed matter. Since short mode is
26833      # case insensitive, let's make it lowercase to improve readability.
26834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26835      # Now convert it back to Unix-stile (cygpath)
26836      input_path=`$CYGPATH -u "$shortmode_path"`
26837      new_path="$input_path"
26838    fi
26839  fi
26840
26841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26842  if test "x$test_cygdrive_prefix" = x; then
26843    # As a simple fix, exclude /usr/bin since it's not a real path.
26844    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26846      # a path prefixed by /cygdrive for fixpath to work.
26847      new_path="$CYGWIN_ROOT_PATH$input_path"
26848    fi
26849  fi
26850
26851  # remove trailing .exe if any
26852  new_path="${new_path/%.exe/}"
26853
26854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26855
26856  # First separate the path from the arguments. This will split at the first
26857  # space.
26858  complete="$OBJDUMP"
26859  path="${complete%% *}"
26860  tmp="$complete EOL"
26861  arguments="${tmp#* }"
26862
26863  # Input might be given as Windows format, start by converting to
26864  # unix format.
26865  new_path="$path"
26866
26867  windows_path="$new_path"
26868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26869    unix_path=`$CYGPATH -u "$windows_path"`
26870    new_path="$unix_path"
26871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26873    new_path="$unix_path"
26874  fi
26875
26876
26877  # Now try to locate executable using which
26878  new_path=`$WHICH "$new_path" 2> /dev/null`
26879
26880  if test "x$new_path" = x; then
26881    # Oops. Which didn't find the executable.
26882    # The splitting of arguments from the executable at a space might have been incorrect,
26883    # since paths with space are more likely in Windows. Give it another try with the whole
26884    # argument.
26885    path="$complete"
26886    arguments="EOL"
26887    new_path="$path"
26888
26889  windows_path="$new_path"
26890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26891    unix_path=`$CYGPATH -u "$windows_path"`
26892    new_path="$unix_path"
26893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26895    new_path="$unix_path"
26896  fi
26897
26898
26899    new_path=`$WHICH "$new_path" 2> /dev/null`
26900
26901    if test "x$new_path" = x; then
26902      # It's still not found. Now this is an unrecoverable error.
26903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26904$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26905      has_space=`$ECHO "$complete" | $GREP " "`
26906      if test "x$has_space" != x; then
26907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26909      fi
26910      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26911    fi
26912  fi
26913
26914  # Now new_path has a complete unix path to the binary
26915  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26916    # Keep paths in /bin as-is, but remove trailing .exe if any
26917    new_path="${new_path/%.exe/}"
26918    # Do not save /bin paths to all_fixpath_prefixes!
26919  else
26920    # Not in mixed or Windows style, start by that.
26921    new_path=`cmd //c echo $new_path`
26922
26923  input_path="$new_path"
26924  # Check if we need to convert this using DOS-style short mode. If the path
26925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26926  # take no chances and rewrite it.
26927  # Note: m4 eats our [], so we need to use [ and ] instead.
26928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26929  if test "x$has_forbidden_chars" != x; then
26930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26932  fi
26933
26934    # Output is in $new_path
26935
26936  windows_path="$new_path"
26937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26938    unix_path=`$CYGPATH -u "$windows_path"`
26939    new_path="$unix_path"
26940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26942    new_path="$unix_path"
26943  fi
26944
26945    # remove trailing .exe if any
26946    new_path="${new_path/%.exe/}"
26947
26948    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26949    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26950  fi
26951
26952  else
26953    # We're on a posix platform. Hooray! :)
26954    # First separate the path from the arguments. This will split at the first
26955    # space.
26956    complete="$OBJDUMP"
26957    path="${complete%% *}"
26958    tmp="$complete EOL"
26959    arguments="${tmp#* }"
26960
26961    # Cannot rely on the command "which" here since it doesn't always work.
26962    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26963    if test -z "$is_absolute_path"; then
26964      # Path to executable is not absolute. Find it.
26965      IFS_save="$IFS"
26966      IFS=:
26967      for p in $PATH; do
26968        if test -f "$p/$path" && test -x "$p/$path"; then
26969          new_path="$p/$path"
26970          break
26971        fi
26972      done
26973      IFS="$IFS_save"
26974    else
26975      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26976$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26977      new_path="$path"
26978    fi
26979
26980    if test "x$new_path" = x; then
26981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26982$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26983        has_space=`$ECHO "$complete" | $GREP " "`
26984        if test "x$has_space" != x; then
26985          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26986$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26987        fi
26988        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26989      fi
26990  fi
26991
26992      # Now join together the path and the arguments once again
26993      if test "x$arguments" != xEOL; then
26994        new_complete="$new_path ${arguments% *}"
26995      else
26996        new_complete="$new_path"
26997      fi
26998
26999  if test "x$complete" != "x$new_complete"; then
27000      OBJDUMP="$new_complete"
27001      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27002$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27003    fi
27004
27005fi
27006
27007if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27008   # Extract the first word of "lipo", so it can be a program name with args.
27009set dummy lipo; ac_word=$2
27010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27011$as_echo_n "checking for $ac_word... " >&6; }
27012if ${ac_cv_path_LIPO+:} false; then :
27013  $as_echo_n "(cached) " >&6
27014else
27015  case $LIPO in
27016  [\\/]* | ?:[\\/]*)
27017  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27018  ;;
27019  *)
27020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27021for as_dir in $PATH
27022do
27023  IFS=$as_save_IFS
27024  test -z "$as_dir" && as_dir=.
27025    for ac_exec_ext in '' $ac_executable_extensions; do
27026  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27027    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27029    break 2
27030  fi
27031done
27032  done
27033IFS=$as_save_IFS
27034
27035  ;;
27036esac
27037fi
27038LIPO=$ac_cv_path_LIPO
27039if test -n "$LIPO"; then
27040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27041$as_echo "$LIPO" >&6; }
27042else
27043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27044$as_echo "no" >&6; }
27045fi
27046
27047
27048
27049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27050
27051  # First separate the path from the arguments. This will split at the first
27052  # space.
27053  complete="$LIPO"
27054  path="${complete%% *}"
27055  tmp="$complete EOL"
27056  arguments="${tmp#* }"
27057
27058  # Input might be given as Windows format, start by converting to
27059  # unix format.
27060  new_path=`$CYGPATH -u "$path"`
27061
27062  # Now try to locate executable using which
27063  new_path=`$WHICH "$new_path" 2> /dev/null`
27064  # bat and cmd files are not always considered executable in cygwin causing which
27065  # to not find them
27066  if test "x$new_path" = x \
27067           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27068           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27069    new_path=`$CYGPATH -u "$path"`
27070  fi
27071  if test "x$new_path" = x; then
27072    # Oops. Which didn't find the executable.
27073    # The splitting of arguments from the executable at a space might have been incorrect,
27074    # since paths with space are more likely in Windows. Give it another try with the whole
27075    # argument.
27076    path="$complete"
27077    arguments="EOL"
27078    new_path=`$CYGPATH -u "$path"`
27079    new_path=`$WHICH "$new_path" 2> /dev/null`
27080    # bat and cmd files are not always considered executable in cygwin causing which
27081    # to not find them
27082    if test "x$new_path" = x \
27083             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27084             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27085      new_path=`$CYGPATH -u "$path"`
27086    fi
27087    if test "x$new_path" = x; then
27088      # It's still not found. Now this is an unrecoverable error.
27089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27090$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27091      has_space=`$ECHO "$complete" | $GREP " "`
27092      if test "x$has_space" != x; then
27093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27095      fi
27096      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27097    fi
27098  fi
27099
27100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27103  # "foo.exe" is OK but "foo" is an error.
27104  #
27105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27106  # It is also a way to make sure we got the proper file name for the real test later on.
27107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27108  if test "x$test_shortpath" = x; then
27109    # Short path failed, file does not exist as specified.
27110    # Try adding .exe or .cmd
27111    if test -f "${new_path}.exe"; then
27112       input_to_shortpath="${new_path}.exe"
27113    elif test -f "${new_path}.cmd"; then
27114       input_to_shortpath="${new_path}.cmd"
27115    else
27116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27117$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27118      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27119$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27120      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27121    fi
27122  else
27123    input_to_shortpath="$new_path"
27124  fi
27125
27126  # Call helper function which possibly converts this using DOS-style short mode.
27127  # If so, the updated path is stored in $new_path.
27128  new_path="$input_to_shortpath"
27129
27130  input_path="$input_to_shortpath"
27131  # Check if we need to convert this using DOS-style short mode. If the path
27132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27133  # take no chances and rewrite it.
27134  # Note: m4 eats our [], so we need to use [ and ] instead.
27135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27136  if test "x$has_forbidden_chars" != x; then
27137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27141      # Going to short mode and back again did indeed matter. Since short mode is
27142      # case insensitive, let's make it lowercase to improve readability.
27143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27144      # Now convert it back to Unix-stile (cygpath)
27145      input_path=`$CYGPATH -u "$shortmode_path"`
27146      new_path="$input_path"
27147    fi
27148  fi
27149
27150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27151  if test "x$test_cygdrive_prefix" = x; then
27152    # As a simple fix, exclude /usr/bin since it's not a real path.
27153    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27155      # a path prefixed by /cygdrive for fixpath to work.
27156      new_path="$CYGWIN_ROOT_PATH$input_path"
27157    fi
27158  fi
27159
27160  # remove trailing .exe if any
27161  new_path="${new_path/%.exe/}"
27162
27163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27164
27165  # First separate the path from the arguments. This will split at the first
27166  # space.
27167  complete="$LIPO"
27168  path="${complete%% *}"
27169  tmp="$complete EOL"
27170  arguments="${tmp#* }"
27171
27172  # Input might be given as Windows format, start by converting to
27173  # unix format.
27174  new_path="$path"
27175
27176  windows_path="$new_path"
27177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27178    unix_path=`$CYGPATH -u "$windows_path"`
27179    new_path="$unix_path"
27180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27182    new_path="$unix_path"
27183  fi
27184
27185
27186  # Now try to locate executable using which
27187  new_path=`$WHICH "$new_path" 2> /dev/null`
27188
27189  if test "x$new_path" = x; then
27190    # Oops. Which didn't find the executable.
27191    # The splitting of arguments from the executable at a space might have been incorrect,
27192    # since paths with space are more likely in Windows. Give it another try with the whole
27193    # argument.
27194    path="$complete"
27195    arguments="EOL"
27196    new_path="$path"
27197
27198  windows_path="$new_path"
27199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27200    unix_path=`$CYGPATH -u "$windows_path"`
27201    new_path="$unix_path"
27202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27204    new_path="$unix_path"
27205  fi
27206
27207
27208    new_path=`$WHICH "$new_path" 2> /dev/null`
27209
27210    if test "x$new_path" = x; then
27211      # It's still not found. Now this is an unrecoverable error.
27212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27213$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27214      has_space=`$ECHO "$complete" | $GREP " "`
27215      if test "x$has_space" != x; then
27216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27218      fi
27219      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27220    fi
27221  fi
27222
27223  # Now new_path has a complete unix path to the binary
27224  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27225    # Keep paths in /bin as-is, but remove trailing .exe if any
27226    new_path="${new_path/%.exe/}"
27227    # Do not save /bin paths to all_fixpath_prefixes!
27228  else
27229    # Not in mixed or Windows style, start by that.
27230    new_path=`cmd //c echo $new_path`
27231
27232  input_path="$new_path"
27233  # Check if we need to convert this using DOS-style short mode. If the path
27234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27235  # take no chances and rewrite it.
27236  # Note: m4 eats our [], so we need to use [ and ] instead.
27237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27238  if test "x$has_forbidden_chars" != x; then
27239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27241  fi
27242
27243    # Output is in $new_path
27244
27245  windows_path="$new_path"
27246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27247    unix_path=`$CYGPATH -u "$windows_path"`
27248    new_path="$unix_path"
27249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27251    new_path="$unix_path"
27252  fi
27253
27254    # remove trailing .exe if any
27255    new_path="${new_path/%.exe/}"
27256
27257    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27258    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27259  fi
27260
27261  else
27262    # We're on a posix platform. Hooray! :)
27263    # First separate the path from the arguments. This will split at the first
27264    # space.
27265    complete="$LIPO"
27266    path="${complete%% *}"
27267    tmp="$complete EOL"
27268    arguments="${tmp#* }"
27269
27270    # Cannot rely on the command "which" here since it doesn't always work.
27271    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27272    if test -z "$is_absolute_path"; then
27273      # Path to executable is not absolute. Find it.
27274      IFS_save="$IFS"
27275      IFS=:
27276      for p in $PATH; do
27277        if test -f "$p/$path" && test -x "$p/$path"; then
27278          new_path="$p/$path"
27279          break
27280        fi
27281      done
27282      IFS="$IFS_save"
27283    else
27284      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27285$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27286      new_path="$path"
27287    fi
27288
27289    if test "x$new_path" = x; then
27290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27291$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27292        has_space=`$ECHO "$complete" | $GREP " "`
27293        if test "x$has_space" != x; then
27294          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27295$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27296        fi
27297        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27298      fi
27299  fi
27300
27301      # Now join together the path and the arguments once again
27302      if test "x$arguments" != xEOL; then
27303        new_complete="$new_path ${arguments% *}"
27304      else
27305        new_complete="$new_path"
27306      fi
27307
27308  if test "x$complete" != "x$new_complete"; then
27309      LIPO="$new_complete"
27310      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27311$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27312    fi
27313
27314fi
27315
27316# Restore old path without tools dir
27317PATH="$OLD_PATH"
27318
27319
27320# FIXME: Currently we must test this after paths but before flags. Fix!
27321
27322# And we can test some aspects on the target using configure macros.
27323
27324
27325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27326$as_echo_n "checking for ANSI C header files... " >&6; }
27327if ${ac_cv_header_stdc+:} false; then :
27328  $as_echo_n "(cached) " >&6
27329else
27330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27331/* end confdefs.h.  */
27332#include <stdlib.h>
27333#include <stdarg.h>
27334#include <string.h>
27335#include <float.h>
27336
27337int
27338main ()
27339{
27340
27341  ;
27342  return 0;
27343}
27344_ACEOF
27345if ac_fn_cxx_try_compile "$LINENO"; then :
27346  ac_cv_header_stdc=yes
27347else
27348  ac_cv_header_stdc=no
27349fi
27350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27351
27352if test $ac_cv_header_stdc = yes; then
27353  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27355/* end confdefs.h.  */
27356#include <string.h>
27357
27358_ACEOF
27359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27360  $EGREP "memchr" >/dev/null 2>&1; then :
27361
27362else
27363  ac_cv_header_stdc=no
27364fi
27365rm -f conftest*
27366
27367fi
27368
27369if test $ac_cv_header_stdc = yes; then
27370  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27372/* end confdefs.h.  */
27373#include <stdlib.h>
27374
27375_ACEOF
27376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27377  $EGREP "free" >/dev/null 2>&1; then :
27378
27379else
27380  ac_cv_header_stdc=no
27381fi
27382rm -f conftest*
27383
27384fi
27385
27386if test $ac_cv_header_stdc = yes; then
27387  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27388  if test "$cross_compiling" = yes; then :
27389  :
27390else
27391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27392/* end confdefs.h.  */
27393#include <ctype.h>
27394#include <stdlib.h>
27395#if ((' ' & 0x0FF) == 0x020)
27396# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27397# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27398#else
27399# define ISLOWER(c) \
27400		   (('a' <= (c) && (c) <= 'i') \
27401		     || ('j' <= (c) && (c) <= 'r') \
27402		     || ('s' <= (c) && (c) <= 'z'))
27403# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27404#endif
27405
27406#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27407int
27408main ()
27409{
27410  int i;
27411  for (i = 0; i < 256; i++)
27412    if (XOR (islower (i), ISLOWER (i))
27413	|| toupper (i) != TOUPPER (i))
27414      return 2;
27415  return 0;
27416}
27417_ACEOF
27418if ac_fn_cxx_try_run "$LINENO"; then :
27419
27420else
27421  ac_cv_header_stdc=no
27422fi
27423rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27424  conftest.$ac_objext conftest.beam conftest.$ac_ext
27425fi
27426
27427fi
27428fi
27429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27430$as_echo "$ac_cv_header_stdc" >&6; }
27431if test $ac_cv_header_stdc = yes; then
27432
27433$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27434
27435fi
27436
27437# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27438for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27439		  inttypes.h stdint.h unistd.h
27440do :
27441  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27442ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27443"
27444if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27445  cat >>confdefs.h <<_ACEOF
27446#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27447_ACEOF
27448
27449fi
27450
27451done
27452
27453
27454
27455###############################################################################
27456#
27457# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27458# (The JVM can use 32 or 64 bit Java pointers but that decision
27459# is made at runtime.)
27460#
27461if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27462  # Always specify -m flags on Solaris
27463
27464  # keep track of c/cxx flags that we added outselves...
27465  #   to prevent emitting warning...
27466  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27467  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27468  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27469
27470  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27471  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27472  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27473
27474  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27475  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27476  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27477
27478elif test "x$COMPILE_TYPE" = xreduced; then
27479  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27480    # Specify -m if running reduced on other Posix platforms
27481
27482  # keep track of c/cxx flags that we added outselves...
27483  #   to prevent emitting warning...
27484  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27485  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27486  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27487
27488  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27489  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27490  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27491
27492  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27493  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27494  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27495
27496  fi
27497fi
27498
27499# Make compilation sanity check
27500for ac_header in stdio.h
27501do :
27502  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27503if test "x$ac_cv_header_stdio_h" = xyes; then :
27504  cat >>confdefs.h <<_ACEOF
27505#define HAVE_STDIO_H 1
27506_ACEOF
27507
27508else
27509
27510  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27511$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27512  if test "x$COMPILE_TYPE" = xreduced; then
27513    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27514$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27515  elif test "x$COMPILE_TYPE" = xcross; then
27516    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27517$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27518  fi
27519  as_fn_error $? "Cannot continue." "$LINENO" 5
27520
27521fi
27522
27523done
27524
27525
27526# The cast to long int works around a bug in the HP C Compiler
27527# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27528# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27529# This bug is HP SR number 8606223364.
27530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27531$as_echo_n "checking size of int *... " >&6; }
27532if ${ac_cv_sizeof_int_p+:} false; then :
27533  $as_echo_n "(cached) " >&6
27534else
27535  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27536
27537else
27538  if test "$ac_cv_type_int_p" = yes; then
27539     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27541as_fn_error 77 "cannot compute sizeof (int *)
27542See \`config.log' for more details" "$LINENO" 5; }
27543   else
27544     ac_cv_sizeof_int_p=0
27545   fi
27546fi
27547
27548fi
27549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27550$as_echo "$ac_cv_sizeof_int_p" >&6; }
27551
27552
27553
27554cat >>confdefs.h <<_ACEOF
27555#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27556_ACEOF
27557
27558
27559
27560if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27561  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27562  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27563fi
27564
27565if test "x$SIZEOF_INT_P" = x; then
27566    # The test failed, lets stick to the assumed value.
27567    { $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
27568$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27569else
27570    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27571
27572    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27573        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
27574    fi
27575fi
27576
27577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27578$as_echo_n "checking for target address size... " >&6; }
27579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27580$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27581
27582
27583###############################################################################
27584#
27585# Is the target little of big endian?
27586#
27587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27588$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27589if ${ac_cv_c_bigendian+:} false; then :
27590  $as_echo_n "(cached) " >&6
27591else
27592  ac_cv_c_bigendian=unknown
27593    # See if we're dealing with a universal compiler.
27594    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27595/* end confdefs.h.  */
27596#ifndef __APPLE_CC__
27597	       not a universal capable compiler
27598	     #endif
27599	     typedef int dummy;
27600
27601_ACEOF
27602if ac_fn_cxx_try_compile "$LINENO"; then :
27603
27604	# Check for potential -arch flags.  It is not universal unless
27605	# there are at least two -arch flags with different values.
27606	ac_arch=
27607	ac_prev=
27608	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27609	 if test -n "$ac_prev"; then
27610	   case $ac_word in
27611	     i?86 | x86_64 | ppc | ppc64)
27612	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27613		 ac_arch=$ac_word
27614	       else
27615		 ac_cv_c_bigendian=universal
27616		 break
27617	       fi
27618	       ;;
27619	   esac
27620	   ac_prev=
27621	 elif test "x$ac_word" = "x-arch"; then
27622	   ac_prev=arch
27623	 fi
27624       done
27625fi
27626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27627    if test $ac_cv_c_bigendian = unknown; then
27628      # See if sys/param.h defines the BYTE_ORDER macro.
27629      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27630/* end confdefs.h.  */
27631#include <sys/types.h>
27632	     #include <sys/param.h>
27633
27634int
27635main ()
27636{
27637#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27638		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27639		     && LITTLE_ENDIAN)
27640	      bogus endian macros
27641	     #endif
27642
27643  ;
27644  return 0;
27645}
27646_ACEOF
27647if ac_fn_cxx_try_compile "$LINENO"; then :
27648  # It does; now see whether it defined to BIG_ENDIAN or not.
27649	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27650/* end confdefs.h.  */
27651#include <sys/types.h>
27652		#include <sys/param.h>
27653
27654int
27655main ()
27656{
27657#if BYTE_ORDER != BIG_ENDIAN
27658		 not big endian
27659		#endif
27660
27661  ;
27662  return 0;
27663}
27664_ACEOF
27665if ac_fn_cxx_try_compile "$LINENO"; then :
27666  ac_cv_c_bigendian=yes
27667else
27668  ac_cv_c_bigendian=no
27669fi
27670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27671fi
27672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27673    fi
27674    if test $ac_cv_c_bigendian = unknown; then
27675      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27676      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27677/* end confdefs.h.  */
27678#include <limits.h>
27679
27680int
27681main ()
27682{
27683#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27684	      bogus endian macros
27685	     #endif
27686
27687  ;
27688  return 0;
27689}
27690_ACEOF
27691if ac_fn_cxx_try_compile "$LINENO"; then :
27692  # It does; now see whether it defined to _BIG_ENDIAN or not.
27693	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27694/* end confdefs.h.  */
27695#include <limits.h>
27696
27697int
27698main ()
27699{
27700#ifndef _BIG_ENDIAN
27701		 not big endian
27702		#endif
27703
27704  ;
27705  return 0;
27706}
27707_ACEOF
27708if ac_fn_cxx_try_compile "$LINENO"; then :
27709  ac_cv_c_bigendian=yes
27710else
27711  ac_cv_c_bigendian=no
27712fi
27713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27714fi
27715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27716    fi
27717    if test $ac_cv_c_bigendian = unknown; then
27718      # Compile a test program.
27719      if test "$cross_compiling" = yes; then :
27720  # Try to guess by grepping values from an object file.
27721	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27722/* end confdefs.h.  */
27723short int ascii_mm[] =
27724		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27725		short int ascii_ii[] =
27726		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27727		int use_ascii (int i) {
27728		  return ascii_mm[i] + ascii_ii[i];
27729		}
27730		short int ebcdic_ii[] =
27731		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27732		short int ebcdic_mm[] =
27733		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27734		int use_ebcdic (int i) {
27735		  return ebcdic_mm[i] + ebcdic_ii[i];
27736		}
27737		extern int foo;
27738
27739int
27740main ()
27741{
27742return use_ascii (foo) == use_ebcdic (foo);
27743  ;
27744  return 0;
27745}
27746_ACEOF
27747if ac_fn_cxx_try_compile "$LINENO"; then :
27748  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27749	      ac_cv_c_bigendian=yes
27750	    fi
27751	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27752	      if test "$ac_cv_c_bigendian" = unknown; then
27753		ac_cv_c_bigendian=no
27754	      else
27755		# finding both strings is unlikely to happen, but who knows?
27756		ac_cv_c_bigendian=unknown
27757	      fi
27758	    fi
27759fi
27760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27761else
27762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27763/* end confdefs.h.  */
27764$ac_includes_default
27765int
27766main ()
27767{
27768
27769	     /* Are we little or big endian?  From Harbison&Steele.  */
27770	     union
27771	     {
27772	       long int l;
27773	       char c[sizeof (long int)];
27774	     } u;
27775	     u.l = 1;
27776	     return u.c[sizeof (long int) - 1] == 1;
27777
27778  ;
27779  return 0;
27780}
27781_ACEOF
27782if ac_fn_cxx_try_run "$LINENO"; then :
27783  ac_cv_c_bigendian=no
27784else
27785  ac_cv_c_bigendian=yes
27786fi
27787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27788  conftest.$ac_objext conftest.beam conftest.$ac_ext
27789fi
27790
27791    fi
27792fi
27793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27794$as_echo "$ac_cv_c_bigendian" >&6; }
27795 case $ac_cv_c_bigendian in #(
27796   yes)
27797     ENDIAN="big";; #(
27798   no)
27799     ENDIAN="little" ;; #(
27800   universal)
27801     ENDIAN="universal_endianness"
27802     ;; #(
27803   *)
27804     ENDIAN="unknown" ;;
27805 esac
27806
27807
27808if test "x$ENDIAN" = xuniversal_endianness; then
27809    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27810fi
27811if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27812    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
27813fi
27814
27815
27816# Configure flags for the tools
27817
27818
27819###############################################################################
27820#
27821# How to compile shared libraries.
27822#
27823
27824if test "x$GCC" = xyes; then
27825    COMPILER_NAME=gcc
27826    PICFLAG="-fPIC"
27827    LIBRARY_PREFIX=lib
27828    SHARED_LIBRARY='lib$1.so'
27829    STATIC_LIBRARY='lib$1.a'
27830    SHARED_LIBRARY_FLAGS="-shared"
27831    SHARED_LIBRARY_SUFFIX='.so'
27832    STATIC_LIBRARY_SUFFIX='.a'
27833    OBJ_SUFFIX='.o'
27834    EXE_SUFFIX=''
27835    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27836    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27837    C_FLAG_REORDER=''
27838    CXX_FLAG_REORDER=''
27839    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27840    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27841    LD="$CC"
27842    LDEXE="$CC"
27843    LDCXX="$CXX"
27844    LDEXECXX="$CXX"
27845    POST_STRIP_CMD="$STRIP -g"
27846
27847    # Linking is different on MacOSX
27848    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27849        # Might change in the future to clang.
27850        COMPILER_NAME=gcc
27851        SHARED_LIBRARY='lib$1.dylib'
27852        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27853        SHARED_LIBRARY_SUFFIX='.dylib'
27854        EXE_SUFFIX=''
27855        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27856        SET_SHARED_LIBRARY_MAPFILE=''
27857        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27858        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27859        POST_STRIP_CMD="$STRIP -S"
27860    fi
27861else
27862    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27863        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27864        COMPILER_NAME=ossc
27865        PICFLAG="-KPIC"
27866        LIBRARY_PREFIX=lib
27867        SHARED_LIBRARY='lib$1.so'
27868        STATIC_LIBRARY='lib$1.a'
27869        SHARED_LIBRARY_FLAGS="-G"
27870        SHARED_LIBRARY_SUFFIX='.so'
27871        STATIC_LIBRARY_SUFFIX='.a'
27872        OBJ_SUFFIX='.o'
27873        EXE_SUFFIX=''
27874        SET_SHARED_LIBRARY_NAME=''
27875        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27876	C_FLAG_REORDER='-xF'
27877	CXX_FLAG_REORDER='-xF'
27878        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27879        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27880        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27881        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27882        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27883        POST_STRIP_CMD="$STRIP -x"
27884        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27885    fi
27886    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27887        # If it is not gcc, then assume it is the MS Visual Studio compiler
27888        COMPILER_NAME=cl
27889        PICFLAG=""
27890        LIBRARY_PREFIX=
27891        SHARED_LIBRARY='$1.dll'
27892        STATIC_LIBRARY='$1.lib'
27893        SHARED_LIBRARY_FLAGS="-LD"
27894        SHARED_LIBRARY_SUFFIX='.dll'
27895        STATIC_LIBRARY_SUFFIX='.lib'
27896        OBJ_SUFFIX='.obj'
27897        EXE_SUFFIX='.exe'
27898        SET_SHARED_LIBRARY_NAME=''
27899        SET_SHARED_LIBRARY_MAPFILE=''
27900        SET_SHARED_LIBRARY_ORIGIN=''
27901        SET_EXECUTABLE_ORIGIN=''
27902    fi
27903fi
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922# The (cross) compiler is now configured, we can now test capabilities
27923# of the target platform.
27924
27925
27926
27927###############################################################################
27928#
27929# Setup the opt flags for different compilers
27930# and different operating systems.
27931#
27932
27933#
27934# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27935#
27936if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27937    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27938    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27939    CFLAGS="$CFLAGS -mstackrealign"
27940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27941$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27942    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27943/* end confdefs.h.  */
27944int main() { return 0; }
27945_ACEOF
27946if ac_fn_cxx_try_link "$LINENO"; then :
27947
27948		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27949$as_echo "yes" >&6; }
27950
27951else
27952
27953		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27954$as_echo "no" >&6; }
27955	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27956
27957fi
27958rm -f core conftest.err conftest.$ac_objext \
27959    conftest$ac_exeext conftest.$ac_ext
27960fi
27961
27962C_FLAG_DEPS="-MMD -MF"
27963CXX_FLAG_DEPS="-MMD -MF"
27964
27965case $COMPILER_TYPE in
27966  CC )
27967    D_FLAG="-g"
27968    case $COMPILER_NAME in
27969      gcc )
27970      	case $OPENJDK_TARGET_OS in
27971	  macosx )
27972	    # On MacOSX we optimize for size, something
27973	    # we should do for all platforms?
27974	    C_O_FLAG_HI="-Os"
27975	    C_O_FLAG_NORM="-Os"
27976	    C_O_FLAG_NONE=""
27977	    ;;
27978	  *)
27979	    C_O_FLAG_HI="-O3"
27980	    C_O_FLAG_NORM="-O2"
27981	    C_O_FLAG_NONE="-O0"
27982	    CFLAGS_DEBUG_SYMBOLS="-g"
27983	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27984	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27985	       CFLAGS_DEBUG_SYMBOLS="-g1"
27986	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27987	    fi
27988	    ;;
27989	esac
27990        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27991        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27992        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27993        ;;
27994      ossc )
27995        #
27996        # Forte has different names for this with their C++ compiler...
27997        #
27998        C_FLAG_DEPS="-xMMD -xMF"
27999        CXX_FLAG_DEPS="-xMMD -xMF"
28000
28001        # Extra options used with HIGHEST
28002        #
28003        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28004        #          done with care, there are some assumptions below that need to
28005        #          be understood about the use of pointers, and IEEE behavior.
28006        #
28007        # Use non-standard floating point mode (not IEEE 754)
28008        CC_HIGHEST="$CC_HIGHEST -fns"
28009        # Do some simplification of floating point arithmetic (not IEEE 754)
28010        CC_HIGHEST="$CC_HIGHEST -fsimple"
28011        # Use single precision floating point with 'float'
28012        CC_HIGHEST="$CC_HIGHEST -fsingle"
28013        # Assume memory references via basic pointer types do not alias
28014        #   (Source with excessing pointer casting and data access with mixed
28015        #    pointer types are not recommended)
28016        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28017        # Use intrinsic or inline versions for math/std functions
28018        #   (If you expect perfect errno behavior, do not use this)
28019        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28020        # Loop data dependency optimizations (need -xO3 or higher)
28021        CC_HIGHEST="$CC_HIGHEST -xdepend"
28022        # Pointer parameters to functions do not overlap
28023        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28024        #    If you pass in multiple pointers to the same data, do not use this)
28025        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28026        # Inline some library routines
28027        #   (If you expect perfect errno behavior, do not use this)
28028        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28029        # Use optimized math routines
28030        #   (If you expect perfect errno behavior, do not use this)
28031        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28032        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28033
28034        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28035          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28036          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28037        fi
28038
28039        case $OPENJDK_TARGET_CPU_ARCH in
28040          x86)
28041            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28042            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28043            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28044            C_O_FLAG_NONE="-xregs=no%frameptr"
28045            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28046            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28047            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28048            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28049            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28050               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28051               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28052            fi
28053            ;;
28054          sparc)
28055            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28056            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28057            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28058            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28059            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28060            C_O_FLAG_NONE=""
28061            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28062            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28063            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28064            CXX_O_FLAG_NONE=""
28065            ;;
28066        esac
28067
28068    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28069    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28070    esac
28071    ;;
28072  CL )
28073    D_FLAG=
28074    C_O_FLAG_HIGHEST="-O2"
28075    C_O_FLAG_HI="-O1"
28076    C_O_FLAG_NORM="-O1"
28077    C_O_FLAG_NONE="-Od"
28078    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28079    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28080    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28081    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28082    ;;
28083esac
28084
28085if test -z "$C_O_FLAG_HIGHEST"; then
28086   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28087fi
28088
28089if test -z "$CXX_O_FLAG_HIGHEST"; then
28090   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28091fi
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28107   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28108$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28109fi
28110
28111if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28112   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28113$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28114fi
28115
28116if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28117   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28118$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28119fi
28120
28121
28122# Check whether --with-extra-cflags was given.
28123if test "${with_extra_cflags+set}" = set; then :
28124  withval=$with_extra_cflags;
28125fi
28126
28127
28128
28129# Check whether --with-extra-cxxflags was given.
28130if test "${with_extra_cxxflags+set}" = set; then :
28131  withval=$with_extra_cxxflags;
28132fi
28133
28134
28135
28136# Check whether --with-extra-ldflags was given.
28137if test "${with_extra_ldflags+set}" = set; then :
28138  withval=$with_extra_ldflags;
28139fi
28140
28141
28142CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28143CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28144LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28145
28146# Hotspot needs these set in their legacy form
28147LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28148LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28149LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28150
28151
28152
28153
28154
28155###############################################################################
28156#
28157# Now setup the CFLAGS and LDFLAGS for the JDK build.
28158# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28159#
28160case $COMPILER_NAME in
28161      gcc )
28162      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28163                          -pipe \
28164                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28165	  case $OPENJDK_TARGET_CPU_ARCH in
28166	  arm )
28167            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28168	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28169	  ;;
28170	  ppc )
28171            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28172	  ;;
28173	  * )
28174	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28175	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28176          ;;
28177	  esac
28178          ;;
28179      ossc )
28180          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28181          case $OPENJDK_TARGET_CPU_ARCH in
28182          x86 )
28183            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28184       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28185          ;;
28186          esac
28187
28188      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28189      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28190
28191          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28192          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28193          ;;
28194      cl )
28195          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28196               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28197	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28198	       -DWIN32 -DIAL"
28199          case $OPENJDK_TARGET_CPU in
28200              x86 )
28201                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28202                  ;;
28203              x86_64 )
28204                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28205                  ;;
28206          esac
28207          ;;
28208esac
28209
28210###############################################################################
28211
28212CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28213
28214# The package path is used only on macosx?
28215PACKAGE_PATH=/opt/local
28216
28217
28218if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28219    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28220    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28221    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28222    #   Note: -Dmacro         is the same as    #define macro 1
28223    #         -Dmacro=	    is the same as    #define macro
28224    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28225        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28226    else
28227        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28228    fi
28229else
28230    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28231fi
28232if test "x$OPENJDK_TARGET_OS" = xlinux; then
28233    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28234fi
28235if test "x$OPENJDK_TARGET_OS" = xwindows; then
28236    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28237fi
28238if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28239    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28240fi
28241if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28242    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28243fi
28244if test "x$OPENJDK_TARGET_OS" = xbsd; then
28245    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28246fi
28247if test "x$DEBUG_LEVEL" = xrelease; then
28248    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28249    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28250        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28251    fi
28252else
28253    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28254fi
28255
28256CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28257CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28258
28259CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28260        -I${JDK_OUTPUTDIR}/include \
28261        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28262        -I${JDK_TOPDIR}/src/share/javavm/export \
28263        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28264        -I${JDK_TOPDIR}/src/share/native/common \
28265        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28266
28267# The shared libraries are compiled using the picflag.
28268CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28269CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28270
28271# Executable flags
28272CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28273CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28274
28275# Now this is odd. The JDK native libraries have to link against libjvm.so
28276# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28277# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28278# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28279# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28280# libraries will link to whatever is in memory. Yuck.
28281#
28282# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28283if test "x$COMPILER_NAME" = xcl; then
28284    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28285    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28286        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28287    fi
28288    # TODO: make -debug optional "--disable-full-debug-symbols"
28289    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28290    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28291    LDFLAGS_JDKLIB_SUFFIX=""
28292    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28293        LDFLAGS_STACK_SIZE=1048576
28294    else
28295        LDFLAGS_STACK_SIZE=327680
28296    fi
28297    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28298else
28299    if test "x$COMPILER_NAME" = xgcc; then
28300        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28301        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28302        if test -n "$HAS_GNU_HASH"; then
28303            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28304        fi
28305        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28306          # And since we now know that the linker is gnu, then add -z defs, to forbid
28307          # undefined symbols in object files.
28308          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28309          if test "x$DEBUG_LEVEL" = "xrelease"; then
28310              # When building release libraries, tell the linker optimize them.
28311              # Should this be supplied to the OSS linker as well?
28312              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28313          fi
28314        fi
28315    fi
28316    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28317                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28318
28319    # On some platforms (mac) the linker warns about non existing -L dirs.
28320    # Add server first if available. Linking aginst client does not always produce the same results.
28321    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28322    # Default to server for other variants.
28323    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28324        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28325    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28326        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28327    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28328        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28329    else
28330        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28331    fi
28332
28333    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28334    if test "x$COMPILER_NAME" = xossc; then
28335        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28336    fi
28337
28338    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28339    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28340        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28341    fi
28342fi
28343
28344# Adjust flags according to debug level.
28345case $DEBUG_LEVEL in
28346      fastdebug )
28347              CFLAGS="$CFLAGS $D_FLAG"
28348              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28349              ;;
28350      slowdebug )
28351              CFLAGS="$CFLAGS $D_FLAG"
28352	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28353	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28354	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28355	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28356              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28357              ;;
28358esac
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374# Setup debug symbols (need objcopy from the toolchain for that)
28375
28376#
28377# ENABLE_DEBUG_SYMBOLS
28378# This must be done after the toolchain is setup, since we're looking at objcopy.
28379#
28380# Check whether --enable-debug-symbols was given.
28381if test "${enable_debug_symbols+set}" = set; then :
28382  enableval=$enable_debug_symbols;
28383fi
28384
28385
28386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28387$as_echo_n "checking if we should generate debug symbols... " >&6; }
28388
28389if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28390   # explicit enabling of enable-debug-symbols and can't find objcopy
28391   #   this is an error
28392   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28393fi
28394
28395if test "x$enable_debug_symbols" = "xyes"; then
28396  ENABLE_DEBUG_SYMBOLS=true
28397elif test "x$enable_debug_symbols" = "xno"; then
28398  ENABLE_DEBUG_SYMBOLS=false
28399else
28400  # default on macosx is false
28401  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28402    ENABLE_DEBUG_SYMBOLS=false
28403  # Default is on if objcopy is found, otherwise off
28404  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28405    ENABLE_DEBUG_SYMBOLS=true
28406  else
28407    ENABLE_DEBUG_SYMBOLS=false
28408  fi
28409fi
28410
28411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28412$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28413
28414#
28415# ZIP_DEBUGINFO_FILES
28416#
28417# Check whether --enable-zip-debug-info was given.
28418if test "${enable_zip_debug_info+set}" = set; then :
28419  enableval=$enable_zip_debug_info;
28420fi
28421
28422
28423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28424$as_echo_n "checking if we should zip debug-info files... " >&6; }
28425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28426$as_echo "${enable_zip_debug_info}" >&6; }
28427
28428if test "x${enable_zip_debug_info}" = "xno"; then
28429   ZIP_DEBUGINFO_FILES=false
28430else
28431   ZIP_DEBUGINFO_FILES=true
28432fi
28433
28434
28435
28436
28437
28438
28439
28440###############################################################################
28441#
28442# Check dependencies for external and internal libraries.
28443#
28444###############################################################################
28445
28446
28447
28448###############################################################################
28449#
28450# OS specific settings that we never will need to probe.
28451#
28452if test "x$OPENJDK_TARGET_OS" = xlinux; then
28453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28454$as_echo_n "checking what is not needed on Linux?... " >&6; }
28455    PULSE_NOT_NEEDED=yes
28456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28457$as_echo "pulse" >&6; }
28458fi
28459
28460if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28462$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28463    ALSA_NOT_NEEDED=yes
28464    PULSE_NOT_NEEDED=yes
28465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28466$as_echo "alsa pulse" >&6; }
28467fi
28468
28469if test "x$OPENJDK_TARGET_OS" = xwindows; then
28470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28471$as_echo_n "checking what is not needed on Windows?... " >&6; }
28472    CUPS_NOT_NEEDED=yes
28473    ALSA_NOT_NEEDED=yes
28474    PULSE_NOT_NEEDED=yes
28475    X11_NOT_NEEDED=yes
28476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28477$as_echo "alsa cups pulse x11" >&6; }
28478fi
28479
28480if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28482$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28483    ALSA_NOT_NEEDED=yes
28484    PULSE_NOT_NEEDED=yes
28485    X11_NOT_NEEDED=yes
28486    FREETYPE2_NOT_NEEDED=yes
28487    # If the java runtime framework is disabled, then we need X11.
28488    # This will be adjusted below.
28489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28490$as_echo "alsa pulse x11" >&6; }
28491fi
28492
28493if test "x$OPENJDK_TARGET_OS" = xbsd; then
28494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28495$as_echo_n "checking what is not needed on bsd?... " >&6; }
28496    ALSA_NOT_NEEDED=yes
28497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28498$as_echo "alsa" >&6; }
28499fi
28500
28501if test "x$OPENJDK" = "xfalse"; then
28502    FREETYPE2_NOT_NEEDED=yes
28503fi
28504
28505if test "x$SUPPORT_HEADFUL" = xno; then
28506    X11_NOT_NEEDED=yes
28507fi
28508
28509###############################################################################
28510#
28511# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28512# that uses this API.
28513#
28514# Check whether --enable-macosx-runtime-support was given.
28515if test "${enable_macosx_runtime_support+set}" = set; then :
28516  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28517else
28518  MACOSX_RUNTIME_SUPPORT="no"
28519fi
28520
28521
28522USE_MACOSX_RUNTIME_SUPPORT=no
28523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28524$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28525if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28526    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28527        MACOSX_RUNTIME_SUPPORT=yes
28528        USE_MACOSX_RUNTIME_SUPPORT=yes
28529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28530$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28531    else
28532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28533$as_echo "yes, but explicitly disabled." >&6; }
28534    fi
28535else
28536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28537$as_echo "no" >&6; }
28538fi
28539
28540if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28542$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28543    X11_NOT_NEEDED=
28544    FREETYPE2_NOT_NEEDED=
28545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28546$as_echo "alsa pulse" >&6; }
28547fi
28548
28549
28550
28551
28552###############################################################################
28553#
28554# Check for X Windows
28555#
28556
28557# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28558# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28559# --x-libraries for the sysroot, if that seems to be correct.
28560if test "x$SYS_ROOT" != "x/"; then
28561  if test "x$x_includes" = xNONE; then
28562    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28563      x_includes="$SYS_ROOT/usr/X11R6/include"
28564    fi
28565  fi
28566  if test "x$x_libraries" = xNONE; then
28567    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28568      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28569    fi
28570  fi
28571fi
28572
28573# Now let autoconf do it's magic
28574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28575$as_echo_n "checking for X... " >&6; }
28576
28577
28578# Check whether --with-x was given.
28579if test "${with_x+set}" = set; then :
28580  withval=$with_x;
28581fi
28582
28583# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28584if test "x$with_x" = xno; then
28585  # The user explicitly disabled X.
28586  have_x=disabled
28587else
28588  case $x_includes,$x_libraries in #(
28589    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
28590    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
28591  $as_echo_n "(cached) " >&6
28592else
28593  # One or both of the vars are not set, and there is no cached value.
28594ac_x_includes=no ac_x_libraries=no
28595rm -f -r conftest.dir
28596if mkdir conftest.dir; then
28597  cd conftest.dir
28598  cat >Imakefile <<'_ACEOF'
28599incroot:
28600	@echo incroot='${INCROOT}'
28601usrlibdir:
28602	@echo usrlibdir='${USRLIBDIR}'
28603libdir:
28604	@echo libdir='${LIBDIR}'
28605_ACEOF
28606  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28607    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28608    for ac_var in incroot usrlibdir libdir; do
28609      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28610    done
28611    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28612    for ac_extension in a so sl dylib la dll; do
28613      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28614	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28615	ac_im_usrlibdir=$ac_im_libdir; break
28616      fi
28617    done
28618    # Screen out bogus values from the imake configuration.  They are
28619    # bogus both because they are the default anyway, and because
28620    # using them would break gcc on systems where it needs fixed includes.
28621    case $ac_im_incroot in
28622	/usr/include) ac_x_includes= ;;
28623	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28624    esac
28625    case $ac_im_usrlibdir in
28626	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28627	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28628    esac
28629  fi
28630  cd ..
28631  rm -f -r conftest.dir
28632fi
28633
28634# Standard set of common directories for X headers.
28635# Check X11 before X11Rn because it is often a symlink to the current release.
28636ac_x_header_dirs='
28637/usr/X11/include
28638/usr/X11R7/include
28639/usr/X11R6/include
28640/usr/X11R5/include
28641/usr/X11R4/include
28642
28643/usr/include/X11
28644/usr/include/X11R7
28645/usr/include/X11R6
28646/usr/include/X11R5
28647/usr/include/X11R4
28648
28649/usr/local/X11/include
28650/usr/local/X11R7/include
28651/usr/local/X11R6/include
28652/usr/local/X11R5/include
28653/usr/local/X11R4/include
28654
28655/usr/local/include/X11
28656/usr/local/include/X11R7
28657/usr/local/include/X11R6
28658/usr/local/include/X11R5
28659/usr/local/include/X11R4
28660
28661/usr/X386/include
28662/usr/x386/include
28663/usr/XFree86/include/X11
28664
28665/usr/include
28666/usr/local/include
28667/usr/unsupported/include
28668/usr/athena/include
28669/usr/local/x11r5/include
28670/usr/lpp/Xamples/include
28671
28672/usr/openwin/include
28673/usr/openwin/share/include'
28674
28675if test "$ac_x_includes" = no; then
28676  # Guess where to find include files, by looking for Xlib.h.
28677  # First, try using that file with no special directory specified.
28678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28679/* end confdefs.h.  */
28680#include <X11/Xlib.h>
28681_ACEOF
28682if ac_fn_cxx_try_cpp "$LINENO"; then :
28683  # We can compile using X headers with no special include directory.
28684ac_x_includes=
28685else
28686  for ac_dir in $ac_x_header_dirs; do
28687  if test -r "$ac_dir/X11/Xlib.h"; then
28688    ac_x_includes=$ac_dir
28689    break
28690  fi
28691done
28692fi
28693rm -f conftest.err conftest.i conftest.$ac_ext
28694fi # $ac_x_includes = no
28695
28696if test "$ac_x_libraries" = no; then
28697  # Check for the libraries.
28698  # See if we find them without any special options.
28699  # Don't add to $LIBS permanently.
28700  ac_save_LIBS=$LIBS
28701  LIBS="-lX11 $LIBS"
28702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28703/* end confdefs.h.  */
28704#include <X11/Xlib.h>
28705int
28706main ()
28707{
28708XrmInitialize ()
28709  ;
28710  return 0;
28711}
28712_ACEOF
28713if ac_fn_cxx_try_link "$LINENO"; then :
28714  LIBS=$ac_save_LIBS
28715# We can link X programs with no special library path.
28716ac_x_libraries=
28717else
28718  LIBS=$ac_save_LIBS
28719for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28720do
28721  # Don't even attempt the hair of trying to link an X program!
28722  for ac_extension in a so sl dylib la dll; do
28723    if test -r "$ac_dir/libX11.$ac_extension"; then
28724      ac_x_libraries=$ac_dir
28725      break 2
28726    fi
28727  done
28728done
28729fi
28730rm -f core conftest.err conftest.$ac_objext \
28731    conftest$ac_exeext conftest.$ac_ext
28732fi # $ac_x_libraries = no
28733
28734case $ac_x_includes,$ac_x_libraries in #(
28735  no,* | *,no | *\'*)
28736    # Didn't find X, or a directory has "'" in its name.
28737    ac_cv_have_x="have_x=no";; #(
28738  *)
28739    # Record where we found X for the cache.
28740    ac_cv_have_x="have_x=yes\
28741	ac_x_includes='$ac_x_includes'\
28742	ac_x_libraries='$ac_x_libraries'"
28743esac
28744fi
28745;; #(
28746    *) have_x=yes;;
28747  esac
28748  eval "$ac_cv_have_x"
28749fi # $with_x != no
28750
28751if test "$have_x" != yes; then
28752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28753$as_echo "$have_x" >&6; }
28754  no_x=yes
28755else
28756  # If each of the values was on the command line, it overrides each guess.
28757  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28758  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28759  # Update the cache value to reflect the command line values.
28760  ac_cv_have_x="have_x=yes\
28761	ac_x_includes='$x_includes'\
28762	ac_x_libraries='$x_libraries'"
28763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28764$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28765fi
28766
28767if test "$no_x" = yes; then
28768  # Not all programs may use this symbol, but it does not hurt to define it.
28769
28770$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28771
28772  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28773else
28774  if test -n "$x_includes"; then
28775    X_CFLAGS="$X_CFLAGS -I$x_includes"
28776  fi
28777
28778  # It would also be nice to do this for all -L options, not just this one.
28779  if test -n "$x_libraries"; then
28780    X_LIBS="$X_LIBS -L$x_libraries"
28781    # For Solaris; some versions of Sun CC require a space after -R and
28782    # others require no space.  Words are not sufficient . . . .
28783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28784$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28785    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28786    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28787    ac_cxx_werror_flag=yes
28788    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28789/* end confdefs.h.  */
28790
28791int
28792main ()
28793{
28794
28795  ;
28796  return 0;
28797}
28798_ACEOF
28799if ac_fn_cxx_try_link "$LINENO"; then :
28800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28801$as_echo "no" >&6; }
28802       X_LIBS="$X_LIBS -R$x_libraries"
28803else
28804  LIBS="$ac_xsave_LIBS -R $x_libraries"
28805       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28806/* end confdefs.h.  */
28807
28808int
28809main ()
28810{
28811
28812  ;
28813  return 0;
28814}
28815_ACEOF
28816if ac_fn_cxx_try_link "$LINENO"; then :
28817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28818$as_echo "yes" >&6; }
28819	  X_LIBS="$X_LIBS -R $x_libraries"
28820else
28821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28822$as_echo "neither works" >&6; }
28823fi
28824rm -f core conftest.err conftest.$ac_objext \
28825    conftest$ac_exeext conftest.$ac_ext
28826fi
28827rm -f core conftest.err conftest.$ac_objext \
28828    conftest$ac_exeext conftest.$ac_ext
28829    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28830    LIBS=$ac_xsave_LIBS
28831  fi
28832
28833  # Check for system-dependent libraries X programs must link with.
28834  # Do this before checking for the system-independent R6 libraries
28835  # (-lICE), since we may need -lsocket or whatever for X linking.
28836
28837  if test "$ISC" = yes; then
28838    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28839  else
28840    # Martyn Johnson says this is needed for Ultrix, if the X
28841    # libraries were built with DECnet support.  And Karl Berry says
28842    # the Alpha needs dnet_stub (dnet does not exist).
28843    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28844    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28845/* end confdefs.h.  */
28846
28847/* Override any GCC internal prototype to avoid an error.
28848   Use char because int might match the return type of a GCC
28849   builtin and then its argument prototype would still apply.  */
28850#ifdef __cplusplus
28851extern "C"
28852#endif
28853char XOpenDisplay ();
28854int
28855main ()
28856{
28857return XOpenDisplay ();
28858  ;
28859  return 0;
28860}
28861_ACEOF
28862if ac_fn_cxx_try_link "$LINENO"; then :
28863
28864else
28865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28866$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28867if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
28868  $as_echo_n "(cached) " >&6
28869else
28870  ac_check_lib_save_LIBS=$LIBS
28871LIBS="-ldnet  $LIBS"
28872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28873/* end confdefs.h.  */
28874
28875/* Override any GCC internal prototype to avoid an error.
28876   Use char because int might match the return type of a GCC
28877   builtin and then its argument prototype would still apply.  */
28878#ifdef __cplusplus
28879extern "C"
28880#endif
28881char dnet_ntoa ();
28882int
28883main ()
28884{
28885return dnet_ntoa ();
28886  ;
28887  return 0;
28888}
28889_ACEOF
28890if ac_fn_cxx_try_link "$LINENO"; then :
28891  ac_cv_lib_dnet_dnet_ntoa=yes
28892else
28893  ac_cv_lib_dnet_dnet_ntoa=no
28894fi
28895rm -f core conftest.err conftest.$ac_objext \
28896    conftest$ac_exeext conftest.$ac_ext
28897LIBS=$ac_check_lib_save_LIBS
28898fi
28899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28900$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28901if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
28902  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28903fi
28904
28905    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28906      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28907$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28908if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
28909  $as_echo_n "(cached) " >&6
28910else
28911  ac_check_lib_save_LIBS=$LIBS
28912LIBS="-ldnet_stub  $LIBS"
28913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28914/* end confdefs.h.  */
28915
28916/* Override any GCC internal prototype to avoid an error.
28917   Use char because int might match the return type of a GCC
28918   builtin and then its argument prototype would still apply.  */
28919#ifdef __cplusplus
28920extern "C"
28921#endif
28922char dnet_ntoa ();
28923int
28924main ()
28925{
28926return dnet_ntoa ();
28927  ;
28928  return 0;
28929}
28930_ACEOF
28931if ac_fn_cxx_try_link "$LINENO"; then :
28932  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28933else
28934  ac_cv_lib_dnet_stub_dnet_ntoa=no
28935fi
28936rm -f core conftest.err conftest.$ac_objext \
28937    conftest$ac_exeext conftest.$ac_ext
28938LIBS=$ac_check_lib_save_LIBS
28939fi
28940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28941$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28942if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
28943  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28944fi
28945
28946    fi
28947fi
28948rm -f core conftest.err conftest.$ac_objext \
28949    conftest$ac_exeext conftest.$ac_ext
28950    LIBS="$ac_xsave_LIBS"
28951
28952    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28953    # to get the SysV transport functions.
28954    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28955    # needs -lnsl.
28956    # The nsl library prevents programs from opening the X display
28957    # on Irix 5.2, according to T.E. Dickey.
28958    # The functions gethostbyname, getservbyname, and inet_addr are
28959    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28960    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28961if test "x$ac_cv_func_gethostbyname" = xyes; then :
28962
28963fi
28964
28965    if test $ac_cv_func_gethostbyname = no; then
28966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28967$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28968if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
28969  $as_echo_n "(cached) " >&6
28970else
28971  ac_check_lib_save_LIBS=$LIBS
28972LIBS="-lnsl  $LIBS"
28973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28974/* end confdefs.h.  */
28975
28976/* Override any GCC internal prototype to avoid an error.
28977   Use char because int might match the return type of a GCC
28978   builtin and then its argument prototype would still apply.  */
28979#ifdef __cplusplus
28980extern "C"
28981#endif
28982char gethostbyname ();
28983int
28984main ()
28985{
28986return gethostbyname ();
28987  ;
28988  return 0;
28989}
28990_ACEOF
28991if ac_fn_cxx_try_link "$LINENO"; then :
28992  ac_cv_lib_nsl_gethostbyname=yes
28993else
28994  ac_cv_lib_nsl_gethostbyname=no
28995fi
28996rm -f core conftest.err conftest.$ac_objext \
28997    conftest$ac_exeext conftest.$ac_ext
28998LIBS=$ac_check_lib_save_LIBS
28999fi
29000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29001$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29002if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
29003  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29004fi
29005
29006      if test $ac_cv_lib_nsl_gethostbyname = no; then
29007	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29008$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29009if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
29010  $as_echo_n "(cached) " >&6
29011else
29012  ac_check_lib_save_LIBS=$LIBS
29013LIBS="-lbsd  $LIBS"
29014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29015/* end confdefs.h.  */
29016
29017/* Override any GCC internal prototype to avoid an error.
29018   Use char because int might match the return type of a GCC
29019   builtin and then its argument prototype would still apply.  */
29020#ifdef __cplusplus
29021extern "C"
29022#endif
29023char gethostbyname ();
29024int
29025main ()
29026{
29027return gethostbyname ();
29028  ;
29029  return 0;
29030}
29031_ACEOF
29032if ac_fn_cxx_try_link "$LINENO"; then :
29033  ac_cv_lib_bsd_gethostbyname=yes
29034else
29035  ac_cv_lib_bsd_gethostbyname=no
29036fi
29037rm -f core conftest.err conftest.$ac_objext \
29038    conftest$ac_exeext conftest.$ac_ext
29039LIBS=$ac_check_lib_save_LIBS
29040fi
29041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29042$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29043if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
29044  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29045fi
29046
29047      fi
29048    fi
29049
29050    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29051    # socket/setsockopt and other routines are undefined under SCO ODT
29052    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29053    # on later versions), says Simon Leinen: it contains gethostby*
29054    # variants that don't use the name server (or something).  -lsocket
29055    # must be given before -lnsl if both are needed.  We assume that
29056    # if connect needs -lnsl, so does gethostbyname.
29057    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29058if test "x$ac_cv_func_connect" = xyes; then :
29059
29060fi
29061
29062    if test $ac_cv_func_connect = no; then
29063      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29064$as_echo_n "checking for connect in -lsocket... " >&6; }
29065if ${ac_cv_lib_socket_connect+:} false; then :
29066  $as_echo_n "(cached) " >&6
29067else
29068  ac_check_lib_save_LIBS=$LIBS
29069LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29071/* end confdefs.h.  */
29072
29073/* Override any GCC internal prototype to avoid an error.
29074   Use char because int might match the return type of a GCC
29075   builtin and then its argument prototype would still apply.  */
29076#ifdef __cplusplus
29077extern "C"
29078#endif
29079char connect ();
29080int
29081main ()
29082{
29083return connect ();
29084  ;
29085  return 0;
29086}
29087_ACEOF
29088if ac_fn_cxx_try_link "$LINENO"; then :
29089  ac_cv_lib_socket_connect=yes
29090else
29091  ac_cv_lib_socket_connect=no
29092fi
29093rm -f core conftest.err conftest.$ac_objext \
29094    conftest$ac_exeext conftest.$ac_ext
29095LIBS=$ac_check_lib_save_LIBS
29096fi
29097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29098$as_echo "$ac_cv_lib_socket_connect" >&6; }
29099if test "x$ac_cv_lib_socket_connect" = xyes; then :
29100  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29101fi
29102
29103    fi
29104
29105    # Guillermo Gomez says -lposix is necessary on A/UX.
29106    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29107if test "x$ac_cv_func_remove" = xyes; then :
29108
29109fi
29110
29111    if test $ac_cv_func_remove = no; then
29112      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29113$as_echo_n "checking for remove in -lposix... " >&6; }
29114if ${ac_cv_lib_posix_remove+:} false; then :
29115  $as_echo_n "(cached) " >&6
29116else
29117  ac_check_lib_save_LIBS=$LIBS
29118LIBS="-lposix  $LIBS"
29119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29120/* end confdefs.h.  */
29121
29122/* Override any GCC internal prototype to avoid an error.
29123   Use char because int might match the return type of a GCC
29124   builtin and then its argument prototype would still apply.  */
29125#ifdef __cplusplus
29126extern "C"
29127#endif
29128char remove ();
29129int
29130main ()
29131{
29132return remove ();
29133  ;
29134  return 0;
29135}
29136_ACEOF
29137if ac_fn_cxx_try_link "$LINENO"; then :
29138  ac_cv_lib_posix_remove=yes
29139else
29140  ac_cv_lib_posix_remove=no
29141fi
29142rm -f core conftest.err conftest.$ac_objext \
29143    conftest$ac_exeext conftest.$ac_ext
29144LIBS=$ac_check_lib_save_LIBS
29145fi
29146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29147$as_echo "$ac_cv_lib_posix_remove" >&6; }
29148if test "x$ac_cv_lib_posix_remove" = xyes; then :
29149  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29150fi
29151
29152    fi
29153
29154    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29155    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29156if test "x$ac_cv_func_shmat" = xyes; then :
29157
29158fi
29159
29160    if test $ac_cv_func_shmat = no; then
29161      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29162$as_echo_n "checking for shmat in -lipc... " >&6; }
29163if ${ac_cv_lib_ipc_shmat+:} false; then :
29164  $as_echo_n "(cached) " >&6
29165else
29166  ac_check_lib_save_LIBS=$LIBS
29167LIBS="-lipc  $LIBS"
29168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29169/* end confdefs.h.  */
29170
29171/* Override any GCC internal prototype to avoid an error.
29172   Use char because int might match the return type of a GCC
29173   builtin and then its argument prototype would still apply.  */
29174#ifdef __cplusplus
29175extern "C"
29176#endif
29177char shmat ();
29178int
29179main ()
29180{
29181return shmat ();
29182  ;
29183  return 0;
29184}
29185_ACEOF
29186if ac_fn_cxx_try_link "$LINENO"; then :
29187  ac_cv_lib_ipc_shmat=yes
29188else
29189  ac_cv_lib_ipc_shmat=no
29190fi
29191rm -f core conftest.err conftest.$ac_objext \
29192    conftest$ac_exeext conftest.$ac_ext
29193LIBS=$ac_check_lib_save_LIBS
29194fi
29195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29196$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29197if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29198  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29199fi
29200
29201    fi
29202  fi
29203
29204  # Check for libraries that X11R6 Xt/Xaw programs need.
29205  ac_save_LDFLAGS=$LDFLAGS
29206  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29207  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29208  # check for ICE first), but we must link in the order -lSM -lICE or
29209  # we get undefined symbols.  So assume we have SM if we have ICE.
29210  # These have to be linked with before -lX11, unlike the other
29211  # libraries we check for below, so use a different variable.
29212  # John Interrante, Karl Berry
29213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29214$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29215if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29216  $as_echo_n "(cached) " >&6
29217else
29218  ac_check_lib_save_LIBS=$LIBS
29219LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29221/* end confdefs.h.  */
29222
29223/* Override any GCC internal prototype to avoid an error.
29224   Use char because int might match the return type of a GCC
29225   builtin and then its argument prototype would still apply.  */
29226#ifdef __cplusplus
29227extern "C"
29228#endif
29229char IceConnectionNumber ();
29230int
29231main ()
29232{
29233return IceConnectionNumber ();
29234  ;
29235  return 0;
29236}
29237_ACEOF
29238if ac_fn_cxx_try_link "$LINENO"; then :
29239  ac_cv_lib_ICE_IceConnectionNumber=yes
29240else
29241  ac_cv_lib_ICE_IceConnectionNumber=no
29242fi
29243rm -f core conftest.err conftest.$ac_objext \
29244    conftest$ac_exeext conftest.$ac_ext
29245LIBS=$ac_check_lib_save_LIBS
29246fi
29247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29248$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29249if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29250  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29251fi
29252
29253  LDFLAGS=$ac_save_LDFLAGS
29254
29255fi
29256
29257
29258if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29259
29260    # Print a helpful message on how to acquire the necessary build dependency.
29261    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29262    MISSING_DEPENDENCY=x11
29263    PKGHANDLER_COMMAND=
29264
29265    case $PKGHANDLER in
29266	apt-get)
29267                apt_help     $MISSING_DEPENDENCY ;;
29268    yum)
29269                yum_help     $MISSING_DEPENDENCY ;;
29270	port)
29271                port_help    $MISSING_DEPENDENCY ;;
29272	pkgutil)
29273                pkgutil_help $MISSING_DEPENDENCY ;;
29274	pkgadd)
29275                pkgadd_help  $MISSING_DEPENDENCY ;;
29276    * )
29277      break ;;
29278    esac
29279
29280    if test "x$PKGHANDLER_COMMAND" != x; then
29281        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29282    fi
29283
29284    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29285fi
29286
29287# Some of the old makefiles require a setting of OPENWIN_HOME
29288# Since the X11R6 directory has disappeared on later Linuxes,
29289# we need to probe for it.
29290if test "x$OPENJDK_TARGET_OS" = xlinux; then
29291    if test -d "$SYS_ROOT/usr/X11R6"; then
29292        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29293    fi
29294    if test -d "$SYS_ROOT/usr/include/X11"; then
29295        OPENWIN_HOME="$SYS_ROOT/usr"
29296    fi
29297fi
29298if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29299    OPENWIN_HOME="/usr/openwin"
29300fi
29301
29302
29303
29304#
29305# Weird Sol10 something check...TODO change to try compile
29306#
29307if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29308  if test "`uname -r`" = "5.10"; then
29309     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29310     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29311     fi
29312  fi
29313fi
29314
29315ac_ext=c
29316ac_cpp='$CPP $CPPFLAGS'
29317ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29318ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29319ac_compiler_gnu=$ac_cv_c_compiler_gnu
29320
29321OLD_CFLAGS="$CFLAGS"
29322CFLAGS="$CFLAGS $X_CFLAGS"
29323
29324# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29325for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29326do :
29327  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29328ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29329                   # include <X11/Xutil.h>
29330
29331"
29332if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29333  cat >>confdefs.h <<_ACEOF
29334#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29335_ACEOF
29336 X11_A_OK=yes
29337else
29338  X11_A_OK=no
29339fi
29340
29341done
29342
29343
29344CFLAGS="$OLD_CFLAGS"
29345ac_ext=cpp
29346ac_cpp='$CXXCPP $CPPFLAGS'
29347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29350
29351
29352if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29353
29354    # Print a helpful message on how to acquire the necessary build dependency.
29355    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29356    MISSING_DEPENDENCY=x11
29357    PKGHANDLER_COMMAND=
29358
29359    case $PKGHANDLER in
29360	apt-get)
29361                apt_help     $MISSING_DEPENDENCY ;;
29362    yum)
29363                yum_help     $MISSING_DEPENDENCY ;;
29364	port)
29365                port_help    $MISSING_DEPENDENCY ;;
29366	pkgutil)
29367                pkgutil_help $MISSING_DEPENDENCY ;;
29368	pkgadd)
29369                pkgadd_help  $MISSING_DEPENDENCY ;;
29370    * )
29371      break ;;
29372    esac
29373
29374    if test "x$PKGHANDLER_COMMAND" != x; then
29375        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29376    fi
29377
29378    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29379fi
29380
29381
29382
29383
29384
29385
29386###############################################################################
29387#
29388# The common unix printing system cups is used to print from java.
29389#
29390
29391# Check whether --with-cups was given.
29392if test "${with_cups+set}" = set; then :
29393  withval=$with_cups;
29394fi
29395
29396
29397# Check whether --with-cups-include was given.
29398if test "${with_cups_include+set}" = set; then :
29399  withval=$with_cups_include;
29400fi
29401
29402
29403if test "x$CUPS_NOT_NEEDED" = xyes; then
29404	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29405		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29406$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29407	fi
29408	CUPS_CFLAGS=
29409else
29410	CUPS_FOUND=no
29411
29412	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29413	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29414	fi
29415
29416	if test "x${with_cups}" != x; then
29417	    CUPS_CFLAGS="-I${with_cups}/include"
29418	    CUPS_FOUND=yes
29419	fi
29420	if test "x${with_cups_include}" != x; then
29421	    CUPS_CFLAGS="-I${with_cups_include}"
29422	    CUPS_FOUND=yes
29423	fi
29424	if test "x$CUPS_FOUND" = xno; then
29425
29426
29427    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29428        # Source the builddeps file again, to make sure it uses the latest variables!
29429        . $builddepsfile
29430        # Look for a target and build machine specific resource!
29431        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29432        if test "x$resource" = x; then
29433            # Ok, lets instead look for a target specific resource
29434            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29435        fi
29436        if test "x$resource" = x; then
29437            # Ok, lets instead look for a build specific resource
29438            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29439        fi
29440        if test "x$resource" = x; then
29441            # Ok, lets instead look for a generic resource
29442            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29443            resource=${builddep_cups}
29444        fi
29445        if test "x$resource" != x; then
29446            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29447$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29448	    # If the resource in the builddeps.conf file is an existing directory,
29449	    # for example /java/linux/cups
29450	    if test -d ${resource}; then
29451	       depdir=${resource}
29452	    else
29453
29454# cups is for example mymodule
29455# $resource is for example libs/general/libmymod_1_2_3.zip
29456# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29457# $with_builddeps_dir is for example /localhome/builddeps
29458# depdir is the name of the variable into which we store the depdir, eg MYMOD
29459# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29460# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29461    filename=`basename $resource`
29462    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29463    filebase=${filename%%.*}
29464    extension=${filename#*.}
29465    installdir=$with_builddeps_dir/$filebase
29466    if test ! -f $installdir/$filename.unpacked; then
29467        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29468$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29469        if test ! -d $installdir; then
29470            mkdir -p $installdir
29471        fi
29472        if test ! -d $installdir; then
29473            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29474        fi
29475        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29476        touch $tmpfile
29477        if test ! -f $tmpfile; then
29478            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29479        fi
29480
29481    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29482    # $tmpfile is the local file name for the downloaded file.
29483    VALID_TOOL=no
29484    if test "x$BDEPS_FTP" = xwget; then
29485       VALID_TOOL=yes
29486       wget -O $tmpfile $with_builddeps_server/$resource
29487    fi
29488    if test "x$BDEPS_FTP" = xlftp; then
29489       VALID_TOOL=yes
29490       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29491    fi
29492    if test "x$BDEPS_FTP" = xftp; then
29493        VALID_TOOL=yes
29494        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29495        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29496        FTPUSERPWD=${FTPSERVER%%@*}
29497        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29498            FTPUSER=${userpwd%%:*}
29499            FTPPWD=${userpwd#*@}
29500            FTPSERVER=${FTPSERVER#*@}
29501        else
29502            FTPUSER=ftp
29503            FTPPWD=ftp
29504        fi
29505        # the "pass" command does not work on some
29506        # ftp clients (read ftp.exe) but if it works,
29507        # passive mode is better!
29508        (\
29509            echo "user $FTPUSER $FTPPWD"        ;\
29510            echo "pass"                         ;\
29511            echo "bin"                          ;\
29512            echo "get $FTPPATH $tmpfile"              ;\
29513        ) | ftp -in $FTPSERVER
29514    fi
29515    if test "x$VALID_TOOL" != xyes; then
29516       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29517    fi
29518
29519        mv $tmpfile $installdir/$filename
29520        if test ! -s $installdir/$filename; then
29521            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29522        fi
29523        case "$extension" in
29524            zip)  echo "Unzipping $installdir/$filename..."
29525               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29526            ;;
29527            tar.gz) echo "Untaring $installdir/$filename..."
29528               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29529            ;;
29530            tgz) echo "Untaring $installdir/$filename..."
29531               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29532            ;;
29533            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29534            ;;
29535        esac
29536    fi
29537    if test -f $installdir/$filename.unpacked; then
29538        depdir=$installdir
29539    fi
29540
29541	    fi
29542            # Source the builddeps file again, because in the previous command, the depdir
29543            # was updated to point at the current build dependency install directory.
29544            . $builddepsfile
29545            # Now extract variables from the builddeps.conf files.
29546            theroot=${builddep_cups_ROOT}
29547            thecflags=${builddep_cups_CFLAGS}
29548            thelibs=${builddep_cups_LIBS}
29549            if test "x$depdir" = x; then
29550                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29551            fi
29552            CUPS=$depdir
29553            if test "x$theroot" != x; then
29554               CUPS="$theroot"
29555            fi
29556            if test "x$thecflags" != x; then
29557               CUPS_CFLAGS="$thecflags"
29558            fi
29559            if test "x$thelibs" != x; then
29560               CUPS_LIBS="$thelibs"
29561            fi
29562            CUPS_FOUND=yes
29563
29564        fi
29565
29566    fi
29567
29568	fi
29569	if test "x$CUPS_FOUND" = xno; then
29570	    # Are the cups headers installed in the default /usr/include location?
29571	    for ac_header in cups/cups.h cups/ppd.h
29572do :
29573  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29574ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29575if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29576  cat >>confdefs.h <<_ACEOF
29577#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29578_ACEOF
29579 CUPS_FOUND=yes
29580	                      CUPS_CFLAGS=
29581	                      DEFAULT_CUPS=yes
29582fi
29583
29584done
29585
29586	fi
29587	if test "x$CUPS_FOUND" = xno; then
29588	    # Getting nervous now? Lets poke around for standard Solaris third-party
29589	    # package installation locations.
29590	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29591$as_echo_n "checking for cups headers... " >&6; }
29592	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29593	       # An SFW package seems to be installed!
29594	       CUPS_FOUND=yes
29595	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29596	    elif test -s /opt/csw/include/cups/cups.h; then
29597	       # A CSW package seems to be installed!
29598	       CUPS_FOUND=yes
29599	       CUPS_CFLAGS="-I/opt/csw/include"
29600	    fi
29601	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29602$as_echo "$CUPS_FOUND" >&6; }
29603	fi
29604	if test "x$CUPS_FOUND" = xno; then
29605
29606    # Print a helpful message on how to acquire the necessary build dependency.
29607    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29608    MISSING_DEPENDENCY=cups
29609    PKGHANDLER_COMMAND=
29610
29611    case $PKGHANDLER in
29612	apt-get)
29613                apt_help     $MISSING_DEPENDENCY ;;
29614    yum)
29615                yum_help     $MISSING_DEPENDENCY ;;
29616	port)
29617                port_help    $MISSING_DEPENDENCY ;;
29618	pkgutil)
29619                pkgutil_help $MISSING_DEPENDENCY ;;
29620	pkgadd)
29621                pkgadd_help  $MISSING_DEPENDENCY ;;
29622    * )
29623      break ;;
29624    esac
29625
29626    if test "x$PKGHANDLER_COMMAND" != x; then
29627        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29628    fi
29629
29630	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29631	fi
29632fi
29633
29634
29635
29636
29637
29638
29639###############################################################################
29640#
29641# The ubiquitous freetype2 library is used to render fonts.
29642#
29643
29644# Check whether --with-freetype was given.
29645if test "${with_freetype+set}" = set; then :
29646  withval=$with_freetype;
29647fi
29648
29649
29650# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29651USING_SYSTEM_FT_LIB=false
29652
29653if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29654	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29655		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29656$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29657	fi
29658	FREETYPE2_CFLAGS=
29659	FREETYPE2_LIBS=
29660        FREETYPE2_LIB_PATH=
29661else
29662	FREETYPE2_FOUND=no
29663
29664	if test "x$with_freetype" != x; then
29665
29666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29667
29668  # Input might be given as Windows format, start by converting to
29669  # unix format.
29670  path="$with_freetype"
29671  new_path=`$CYGPATH -u "$path"`
29672
29673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29676  # "foo.exe" is OK but "foo" is an error.
29677  #
29678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29679  # It is also a way to make sure we got the proper file name for the real test later on.
29680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29681  if test "x$test_shortpath" = x; then
29682    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29683$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29684    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29685  fi
29686
29687  # Call helper function which possibly converts this using DOS-style short mode.
29688  # If so, the updated path is stored in $new_path.
29689
29690  input_path="$new_path"
29691  # Check if we need to convert this using DOS-style short mode. If the path
29692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29693  # take no chances and rewrite it.
29694  # Note: m4 eats our [], so we need to use [ and ] instead.
29695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29696  if test "x$has_forbidden_chars" != x; then
29697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29701      # Going to short mode and back again did indeed matter. Since short mode is
29702      # case insensitive, let's make it lowercase to improve readability.
29703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29704      # Now convert it back to Unix-stile (cygpath)
29705      input_path=`$CYGPATH -u "$shortmode_path"`
29706      new_path="$input_path"
29707    fi
29708  fi
29709
29710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29711  if test "x$test_cygdrive_prefix" = x; then
29712    # As a simple fix, exclude /usr/bin since it's not a real path.
29713    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29715      # a path prefixed by /cygdrive for fixpath to work.
29716      new_path="$CYGWIN_ROOT_PATH$input_path"
29717    fi
29718  fi
29719
29720
29721  if test "x$path" != "x$new_path"; then
29722    with_freetype="$new_path"
29723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29724$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29725  fi
29726
29727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29728
29729  path="$with_freetype"
29730  has_colon=`$ECHO $path | $GREP ^.:`
29731  new_path="$path"
29732  if test "x$has_colon" = x; then
29733    # Not in mixed or Windows style, start by that.
29734    new_path=`cmd //c echo $path`
29735  fi
29736
29737
29738  input_path="$new_path"
29739  # Check if we need to convert this using DOS-style short mode. If the path
29740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29741  # take no chances and rewrite it.
29742  # Note: m4 eats our [], so we need to use [ and ] instead.
29743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29744  if test "x$has_forbidden_chars" != x; then
29745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29747  fi
29748
29749
29750  windows_path="$new_path"
29751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29752    unix_path=`$CYGPATH -u "$windows_path"`
29753    new_path="$unix_path"
29754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29756    new_path="$unix_path"
29757  fi
29758
29759  if test "x$path" != "x$new_path"; then
29760    with_freetype="$new_path"
29761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29762$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29763  fi
29764
29765  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29766  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29767
29768  else
29769    # We're on a posix platform. Hooray! :)
29770    path="$with_freetype"
29771
29772    if test ! -f "$path" && test ! -d "$path"; then
29773      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29774    fi
29775
29776    has_space=`$ECHO "$path" | $GREP " "`
29777    if test "x$has_space" != x; then
29778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29779$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29780      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29781    fi
29782  fi
29783
29784	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29785            FREETYPE2_LIB_PATH="$with_freetype/lib"
29786            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29787                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29788                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29789            fi
29790            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29791                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29792            fi
29793	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29794            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29795                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29796            fi
29797 	    FREETYPE2_FOUND=yes
29798   	    if test "x$FREETYPE2_FOUND" = xyes; then
29799	        # Verify that the directories exist
29800                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29801		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29802		fi
29803	        # List the contents of the lib.
29804		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29805                if test "x$FREETYPELIB" = x; then
29806		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29807		fi
29808	        # Check one h-file
29809                if ! test -s "$with_freetype/include/ft2build.h"; then
29810		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29811		fi
29812            fi
29813        fi
29814	if test "x$FREETYPE2_FOUND" = xno; then
29815
29816
29817    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29818        # Source the builddeps file again, to make sure it uses the latest variables!
29819        . $builddepsfile
29820        # Look for a target and build machine specific resource!
29821        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29822        if test "x$resource" = x; then
29823            # Ok, lets instead look for a target specific resource
29824            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29825        fi
29826        if test "x$resource" = x; then
29827            # Ok, lets instead look for a build specific resource
29828            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29829        fi
29830        if test "x$resource" = x; then
29831            # Ok, lets instead look for a generic resource
29832            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29833            resource=${builddep_freetype2}
29834        fi
29835        if test "x$resource" != x; then
29836            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29837$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29838	    # If the resource in the builddeps.conf file is an existing directory,
29839	    # for example /java/linux/cups
29840	    if test -d ${resource}; then
29841	       depdir=${resource}
29842	    else
29843
29844# freetype2 is for example mymodule
29845# $resource is for example libs/general/libmymod_1_2_3.zip
29846# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29847# $with_builddeps_dir is for example /localhome/builddeps
29848# depdir is the name of the variable into which we store the depdir, eg MYMOD
29849# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29850# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29851    filename=`basename $resource`
29852    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29853    filebase=${filename%%.*}
29854    extension=${filename#*.}
29855    installdir=$with_builddeps_dir/$filebase
29856    if test ! -f $installdir/$filename.unpacked; then
29857        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29858$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29859        if test ! -d $installdir; then
29860            mkdir -p $installdir
29861        fi
29862        if test ! -d $installdir; then
29863            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29864        fi
29865        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29866        touch $tmpfile
29867        if test ! -f $tmpfile; then
29868            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29869        fi
29870
29871    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29872    # $tmpfile is the local file name for the downloaded file.
29873    VALID_TOOL=no
29874    if test "x$BDEPS_FTP" = xwget; then
29875       VALID_TOOL=yes
29876       wget -O $tmpfile $with_builddeps_server/$resource
29877    fi
29878    if test "x$BDEPS_FTP" = xlftp; then
29879       VALID_TOOL=yes
29880       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29881    fi
29882    if test "x$BDEPS_FTP" = xftp; then
29883        VALID_TOOL=yes
29884        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29885        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29886        FTPUSERPWD=${FTPSERVER%%@*}
29887        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29888            FTPUSER=${userpwd%%:*}
29889            FTPPWD=${userpwd#*@}
29890            FTPSERVER=${FTPSERVER#*@}
29891        else
29892            FTPUSER=ftp
29893            FTPPWD=ftp
29894        fi
29895        # the "pass" command does not work on some
29896        # ftp clients (read ftp.exe) but if it works,
29897        # passive mode is better!
29898        (\
29899            echo "user $FTPUSER $FTPPWD"        ;\
29900            echo "pass"                         ;\
29901            echo "bin"                          ;\
29902            echo "get $FTPPATH $tmpfile"              ;\
29903        ) | ftp -in $FTPSERVER
29904    fi
29905    if test "x$VALID_TOOL" != xyes; then
29906       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29907    fi
29908
29909        mv $tmpfile $installdir/$filename
29910        if test ! -s $installdir/$filename; then
29911            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29912        fi
29913        case "$extension" in
29914            zip)  echo "Unzipping $installdir/$filename..."
29915               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29916            ;;
29917            tar.gz) echo "Untaring $installdir/$filename..."
29918               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29919            ;;
29920            tgz) echo "Untaring $installdir/$filename..."
29921               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29922            ;;
29923            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29924            ;;
29925        esac
29926    fi
29927    if test -f $installdir/$filename.unpacked; then
29928        depdir=$installdir
29929    fi
29930
29931	    fi
29932            # Source the builddeps file again, because in the previous command, the depdir
29933            # was updated to point at the current build dependency install directory.
29934            . $builddepsfile
29935            # Now extract variables from the builddeps.conf files.
29936            theroot=${builddep_freetype2_ROOT}
29937            thecflags=${builddep_freetype2_CFLAGS}
29938            thelibs=${builddep_freetype2_LIBS}
29939            if test "x$depdir" = x; then
29940                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29941            fi
29942            FREETYPE2=$depdir
29943            if test "x$theroot" != x; then
29944               FREETYPE2="$theroot"
29945            fi
29946            if test "x$thecflags" != x; then
29947               FREETYPE2_CFLAGS="$thecflags"
29948            fi
29949            if test "x$thelibs" != x; then
29950               FREETYPE2_LIBS="$thelibs"
29951            fi
29952            FREETYPE2_FOUND=yes
29953            else FREETYPE2_FOUND=no
29954
29955        fi
29956        else FREETYPE2_FOUND=no
29957
29958    fi
29959
29960            USING_SYSTEM_FT_LIB=true
29961	fi
29962	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29963            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29964
29965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29966
29967  # Input might be given as Windows format, start by converting to
29968  # unix format.
29969  path="$FREETYPELOCATION"
29970  new_path=`$CYGPATH -u "$path"`
29971
29972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29975  # "foo.exe" is OK but "foo" is an error.
29976  #
29977  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29978  # It is also a way to make sure we got the proper file name for the real test later on.
29979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29980  if test "x$test_shortpath" = x; then
29981    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29982$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29983    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29984  fi
29985
29986  # Call helper function which possibly converts this using DOS-style short mode.
29987  # If so, the updated path is stored in $new_path.
29988
29989  input_path="$new_path"
29990  # Check if we need to convert this using DOS-style short mode. If the path
29991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29992  # take no chances and rewrite it.
29993  # Note: m4 eats our [], so we need to use [ and ] instead.
29994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29995  if test "x$has_forbidden_chars" != x; then
29996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30000      # Going to short mode and back again did indeed matter. Since short mode is
30001      # case insensitive, let's make it lowercase to improve readability.
30002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30003      # Now convert it back to Unix-stile (cygpath)
30004      input_path=`$CYGPATH -u "$shortmode_path"`
30005      new_path="$input_path"
30006    fi
30007  fi
30008
30009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30010  if test "x$test_cygdrive_prefix" = x; then
30011    # As a simple fix, exclude /usr/bin since it's not a real path.
30012    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30014      # a path prefixed by /cygdrive for fixpath to work.
30015      new_path="$CYGWIN_ROOT_PATH$input_path"
30016    fi
30017  fi
30018
30019
30020  if test "x$path" != "x$new_path"; then
30021    FREETYPELOCATION="$new_path"
30022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30023$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30024  fi
30025
30026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30027
30028  path="$FREETYPELOCATION"
30029  has_colon=`$ECHO $path | $GREP ^.:`
30030  new_path="$path"
30031  if test "x$has_colon" = x; then
30032    # Not in mixed or Windows style, start by that.
30033    new_path=`cmd //c echo $path`
30034  fi
30035
30036
30037  input_path="$new_path"
30038  # Check if we need to convert this using DOS-style short mode. If the path
30039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30040  # take no chances and rewrite it.
30041  # Note: m4 eats our [], so we need to use [ and ] instead.
30042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30043  if test "x$has_forbidden_chars" != x; then
30044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30046  fi
30047
30048
30049  windows_path="$new_path"
30050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30051    unix_path=`$CYGPATH -u "$windows_path"`
30052    new_path="$unix_path"
30053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30055    new_path="$unix_path"
30056  fi
30057
30058  if test "x$path" != "x$new_path"; then
30059    FREETYPELOCATION="$new_path"
30060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30061$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30062  fi
30063
30064  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30065  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30066
30067  else
30068    # We're on a posix platform. Hooray! :)
30069    path="$FREETYPELOCATION"
30070
30071    if test ! -f "$path" && test ! -d "$path"; then
30072      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30073    fi
30074
30075    has_space=`$ECHO "$path" | $GREP " "`
30076    if test "x$has_space" != x; then
30077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30078$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30079      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30080    fi
30081  fi
30082
30083	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30084$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30085	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30086	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30087	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30088 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30089                if ! test -s "$FREETYPE2_LIBS"; then
30090		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30091		fi
30092                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30093		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30094		fi
30095                USING_SYSTEM_FT_LIB=true
30096                FREETYPE2_FOUND=yes
30097	    fi
30098	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30099$as_echo "$FREETYPE2_FOUND" >&6; }
30100        fi
30101	if test "x$FREETYPE2_FOUND" = xno; then
30102
30103pkg_failed=no
30104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30105$as_echo_n "checking for FREETYPE2... " >&6; }
30106
30107if test -n "$FREETYPE2_CFLAGS"; then
30108    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30109 elif test -n "$PKG_CONFIG"; then
30110    if test -n "$PKG_CONFIG" && \
30111    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30112  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30113  ac_status=$?
30114  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30115  test $ac_status = 0; }; then
30116  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30117else
30118  pkg_failed=yes
30119fi
30120 else
30121    pkg_failed=untried
30122fi
30123if test -n "$FREETYPE2_LIBS"; then
30124    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30125 elif test -n "$PKG_CONFIG"; then
30126    if test -n "$PKG_CONFIG" && \
30127    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30128  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30129  ac_status=$?
30130  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30131  test $ac_status = 0; }; then
30132  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30133else
30134  pkg_failed=yes
30135fi
30136 else
30137    pkg_failed=untried
30138fi
30139
30140
30141
30142if test $pkg_failed = yes; then
30143
30144if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30145        _pkg_short_errors_supported=yes
30146else
30147        _pkg_short_errors_supported=no
30148fi
30149        if test $_pkg_short_errors_supported = yes; then
30150	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30151        else
30152	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30153        fi
30154	# Put the nasty error message in config.log where it belongs
30155	echo "$FREETYPE2_PKG_ERRORS" >&5
30156
30157	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30158$as_echo "no" >&6; }
30159                FREETYPE2_FOUND=no
30160elif test $pkg_failed = untried; then
30161	FREETYPE2_FOUND=no
30162else
30163	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30164	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30166$as_echo "yes" >&6; }
30167	FREETYPE2_FOUND=yes
30168fi
30169            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30170            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30171            USING_SYSTEM_FT_LIB=true
30172            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30173            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30174              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30175            fi
30176	fi
30177	if test "x$FREETYPE2_FOUND" = xno; then
30178	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30179$as_echo_n "checking for freetype in some standard locations... " >&6; }
30180
30181	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30182	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30183	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30184	    fi
30185	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30186	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30187	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30188	    fi
30189
30190	    PREV_CXXCFLAGS="$CXXFLAGS"
30191	    PREV_LDFLAGS="$LDFLAGS"
30192	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30193	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30194	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30195/* end confdefs.h.  */
30196#include<ft2build.h>
30197	                    #include FT_FREETYPE_H
30198	                   int main() { return 0; }
30199
30200_ACEOF
30201if ac_fn_cxx_try_link "$LINENO"; then :
30202
30203	                      # Yes, the default cflags and libs did the trick.
30204	                      FREETYPE2_FOUND=yes
30205	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30206	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30207
30208else
30209
30210	                      FREETYPE2_FOUND=no
30211
30212fi
30213rm -f core conftest.err conftest.$ac_objext \
30214    conftest$ac_exeext conftest.$ac_ext
30215            CXXCFLAGS="$PREV_CXXFLAGS"
30216	    LDFLAGS="$PREV_LDFLAGS"
30217	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30218$as_echo "$FREETYPE2_FOUND" >&6; }
30219            USING_SYSTEM_FT_LIB=true
30220	fi
30221	if test "x$FREETYPE2_FOUND" = xno; then
30222
30223    # Print a helpful message on how to acquire the necessary build dependency.
30224    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30225    MISSING_DEPENDENCY=freetype2
30226    PKGHANDLER_COMMAND=
30227
30228    case $PKGHANDLER in
30229	apt-get)
30230                apt_help     $MISSING_DEPENDENCY ;;
30231    yum)
30232                yum_help     $MISSING_DEPENDENCY ;;
30233	port)
30234                port_help    $MISSING_DEPENDENCY ;;
30235	pkgutil)
30236                pkgutil_help $MISSING_DEPENDENCY ;;
30237	pkgadd)
30238                pkgadd_help  $MISSING_DEPENDENCY ;;
30239    * )
30240      break ;;
30241    esac
30242
30243    if test "x$PKGHANDLER_COMMAND" != x; then
30244        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30245    fi
30246
30247		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30248	fi
30249
30250        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30251            # AC_CHECK_LIB does not support use of cl.exe
30252            PREV_LDFLAGS="$LDFLAGS"
30253            LDFLAGS="$FREETYPE2_LIBS"
30254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30255$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30256if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30257  $as_echo_n "(cached) " >&6
30258else
30259  ac_check_lib_save_LIBS=$LIBS
30260LIBS="-lfreetype  $LIBS"
30261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30262/* end confdefs.h.  */
30263
30264/* Override any GCC internal prototype to avoid an error.
30265   Use char because int might match the return type of a GCC
30266   builtin and then its argument prototype would still apply.  */
30267#ifdef __cplusplus
30268extern "C"
30269#endif
30270char FT_Init_FreeType ();
30271int
30272main ()
30273{
30274return FT_Init_FreeType ();
30275  ;
30276  return 0;
30277}
30278_ACEOF
30279if ac_fn_cxx_try_link "$LINENO"; then :
30280  ac_cv_lib_freetype_FT_Init_FreeType=yes
30281else
30282  ac_cv_lib_freetype_FT_Init_FreeType=no
30283fi
30284rm -f core conftest.err conftest.$ac_objext \
30285    conftest$ac_exeext conftest.$ac_ext
30286LIBS=$ac_check_lib_save_LIBS
30287fi
30288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30289$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30290if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30291  FREETYPE2_FOUND=true
30292else
30293  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30294fi
30295
30296            LDFLAGS="$PREV_LDFLAGS"
30297        fi
30298fi
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308###############################################################################
30309#
30310# Check for alsa headers and libraries. Used on Linux/GNU systems.
30311#
30312
30313# Check whether --with-alsa was given.
30314if test "${with_alsa+set}" = set; then :
30315  withval=$with_alsa;
30316fi
30317
30318
30319# Check whether --with-alsa-include was given.
30320if test "${with_alsa_include+set}" = set; then :
30321  withval=$with_alsa_include;
30322fi
30323
30324
30325# Check whether --with-alsa-lib was given.
30326if test "${with_alsa_lib+set}" = set; then :
30327  withval=$with_alsa_lib;
30328fi
30329
30330
30331if test "x$ALSA_NOT_NEEDED" = xyes; then
30332	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30333		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30334$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30335	fi
30336	ALSA_CFLAGS=
30337	ALSA_LIBS=
30338else
30339	ALSA_FOUND=no
30340
30341	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30342	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30343	fi
30344
30345	if test "x${with_alsa}" != x; then
30346	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30347	    ALSA_CFLAGS="-I${with_alsa}/include"
30348	    ALSA_FOUND=yes
30349	fi
30350	if test "x${with_alsa_include}" != x; then
30351	    ALSA_CFLAGS="-I${with_alsa_include}"
30352	    ALSA_FOUND=yes
30353	fi
30354	if test "x${with_alsa_lib}" != x; then
30355	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30356	    ALSA_FOUND=yes
30357	fi
30358	if test "x$ALSA_FOUND" = xno; then
30359
30360
30361    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30362        # Source the builddeps file again, to make sure it uses the latest variables!
30363        . $builddepsfile
30364        # Look for a target and build machine specific resource!
30365        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30366        if test "x$resource" = x; then
30367            # Ok, lets instead look for a target specific resource
30368            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30369        fi
30370        if test "x$resource" = x; then
30371            # Ok, lets instead look for a build specific resource
30372            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30373        fi
30374        if test "x$resource" = x; then
30375            # Ok, lets instead look for a generic resource
30376            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30377            resource=${builddep_alsa}
30378        fi
30379        if test "x$resource" != x; then
30380            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30381$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30382	    # If the resource in the builddeps.conf file is an existing directory,
30383	    # for example /java/linux/cups
30384	    if test -d ${resource}; then
30385	       depdir=${resource}
30386	    else
30387
30388# alsa is for example mymodule
30389# $resource is for example libs/general/libmymod_1_2_3.zip
30390# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30391# $with_builddeps_dir is for example /localhome/builddeps
30392# depdir is the name of the variable into which we store the depdir, eg MYMOD
30393# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30394# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30395    filename=`basename $resource`
30396    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30397    filebase=${filename%%.*}
30398    extension=${filename#*.}
30399    installdir=$with_builddeps_dir/$filebase
30400    if test ! -f $installdir/$filename.unpacked; then
30401        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30402$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30403        if test ! -d $installdir; then
30404            mkdir -p $installdir
30405        fi
30406        if test ! -d $installdir; then
30407            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30408        fi
30409        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30410        touch $tmpfile
30411        if test ! -f $tmpfile; then
30412            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30413        fi
30414
30415    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30416    # $tmpfile is the local file name for the downloaded file.
30417    VALID_TOOL=no
30418    if test "x$BDEPS_FTP" = xwget; then
30419       VALID_TOOL=yes
30420       wget -O $tmpfile $with_builddeps_server/$resource
30421    fi
30422    if test "x$BDEPS_FTP" = xlftp; then
30423       VALID_TOOL=yes
30424       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30425    fi
30426    if test "x$BDEPS_FTP" = xftp; then
30427        VALID_TOOL=yes
30428        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30429        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30430        FTPUSERPWD=${FTPSERVER%%@*}
30431        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30432            FTPUSER=${userpwd%%:*}
30433            FTPPWD=${userpwd#*@}
30434            FTPSERVER=${FTPSERVER#*@}
30435        else
30436            FTPUSER=ftp
30437            FTPPWD=ftp
30438        fi
30439        # the "pass" command does not work on some
30440        # ftp clients (read ftp.exe) but if it works,
30441        # passive mode is better!
30442        (\
30443            echo "user $FTPUSER $FTPPWD"        ;\
30444            echo "pass"                         ;\
30445            echo "bin"                          ;\
30446            echo "get $FTPPATH $tmpfile"              ;\
30447        ) | ftp -in $FTPSERVER
30448    fi
30449    if test "x$VALID_TOOL" != xyes; then
30450       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30451    fi
30452
30453        mv $tmpfile $installdir/$filename
30454        if test ! -s $installdir/$filename; then
30455            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30456        fi
30457        case "$extension" in
30458            zip)  echo "Unzipping $installdir/$filename..."
30459               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30460            ;;
30461            tar.gz) echo "Untaring $installdir/$filename..."
30462               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30463            ;;
30464            tgz) echo "Untaring $installdir/$filename..."
30465               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30466            ;;
30467            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30468            ;;
30469        esac
30470    fi
30471    if test -f $installdir/$filename.unpacked; then
30472        depdir=$installdir
30473    fi
30474
30475	    fi
30476            # Source the builddeps file again, because in the previous command, the depdir
30477            # was updated to point at the current build dependency install directory.
30478            . $builddepsfile
30479            # Now extract variables from the builddeps.conf files.
30480            theroot=${builddep_alsa_ROOT}
30481            thecflags=${builddep_alsa_CFLAGS}
30482            thelibs=${builddep_alsa_LIBS}
30483            if test "x$depdir" = x; then
30484                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30485            fi
30486            ALSA=$depdir
30487            if test "x$theroot" != x; then
30488               ALSA="$theroot"
30489            fi
30490            if test "x$thecflags" != x; then
30491               ALSA_CFLAGS="$thecflags"
30492            fi
30493            if test "x$thelibs" != x; then
30494               ALSA_LIBS="$thelibs"
30495            fi
30496            ALSA_FOUND=yes
30497            else ALSA_FOUND=no
30498
30499        fi
30500        else ALSA_FOUND=no
30501
30502    fi
30503
30504	fi
30505	if test "x$ALSA_FOUND" = xno; then
30506
30507pkg_failed=no
30508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30509$as_echo_n "checking for ALSA... " >&6; }
30510
30511if test -n "$ALSA_CFLAGS"; then
30512    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30513 elif test -n "$PKG_CONFIG"; then
30514    if test -n "$PKG_CONFIG" && \
30515    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30516  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30517  ac_status=$?
30518  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30519  test $ac_status = 0; }; then
30520  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30521else
30522  pkg_failed=yes
30523fi
30524 else
30525    pkg_failed=untried
30526fi
30527if test -n "$ALSA_LIBS"; then
30528    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30529 elif test -n "$PKG_CONFIG"; then
30530    if test -n "$PKG_CONFIG" && \
30531    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30532  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30533  ac_status=$?
30534  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30535  test $ac_status = 0; }; then
30536  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30537else
30538  pkg_failed=yes
30539fi
30540 else
30541    pkg_failed=untried
30542fi
30543
30544
30545
30546if test $pkg_failed = yes; then
30547
30548if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30549        _pkg_short_errors_supported=yes
30550else
30551        _pkg_short_errors_supported=no
30552fi
30553        if test $_pkg_short_errors_supported = yes; then
30554	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30555        else
30556	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30557        fi
30558	# Put the nasty error message in config.log where it belongs
30559	echo "$ALSA_PKG_ERRORS" >&5
30560
30561	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30562$as_echo "no" >&6; }
30563                ALSA_FOUND=no
30564elif test $pkg_failed = untried; then
30565	ALSA_FOUND=no
30566else
30567	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30568	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30570$as_echo "yes" >&6; }
30571	ALSA_FOUND=yes
30572fi
30573	fi
30574	if test "x$ALSA_FOUND" = xno; then
30575	    for ac_header in alsa/asoundlib.h
30576do :
30577  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30578if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
30579  cat >>confdefs.h <<_ACEOF
30580#define HAVE_ALSA_ASOUNDLIB_H 1
30581_ACEOF
30582 ALSA_FOUND=yes
30583	                      ALSA_CFLAGS=-Iignoreme
30584	                      ALSA_LIBS=-lasound
30585	                      DEFAULT_ALSA=yes
30586else
30587  ALSA_FOUND=no
30588fi
30589
30590done
30591
30592	fi
30593	if test "x$ALSA_FOUND" = xno; then
30594
30595    # Print a helpful message on how to acquire the necessary build dependency.
30596    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30597    MISSING_DEPENDENCY=alsa
30598    PKGHANDLER_COMMAND=
30599
30600    case $PKGHANDLER in
30601	apt-get)
30602                apt_help     $MISSING_DEPENDENCY ;;
30603    yum)
30604                yum_help     $MISSING_DEPENDENCY ;;
30605	port)
30606                port_help    $MISSING_DEPENDENCY ;;
30607	pkgutil)
30608                pkgutil_help $MISSING_DEPENDENCY ;;
30609	pkgadd)
30610                pkgadd_help  $MISSING_DEPENDENCY ;;
30611    * )
30612      break ;;
30613    esac
30614
30615    if test "x$PKGHANDLER_COMMAND" != x; then
30616        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30617    fi
30618
30619	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30620	fi
30621fi
30622
30623
30624
30625
30626
30627
30628
30629###############################################################################
30630#
30631# Check for the jpeg library
30632#
30633
30634USE_EXTERNAL_LIBJPEG=true
30635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30636$as_echo_n "checking for main in -ljpeg... " >&6; }
30637if ${ac_cv_lib_jpeg_main+:} false; then :
30638  $as_echo_n "(cached) " >&6
30639else
30640  ac_check_lib_save_LIBS=$LIBS
30641LIBS="-ljpeg  $LIBS"
30642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30643/* end confdefs.h.  */
30644
30645
30646int
30647main ()
30648{
30649return main ();
30650  ;
30651  return 0;
30652}
30653_ACEOF
30654if ac_fn_cxx_try_link "$LINENO"; then :
30655  ac_cv_lib_jpeg_main=yes
30656else
30657  ac_cv_lib_jpeg_main=no
30658fi
30659rm -f core conftest.err conftest.$ac_objext \
30660    conftest$ac_exeext conftest.$ac_ext
30661LIBS=$ac_check_lib_save_LIBS
30662fi
30663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30664$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30665if test "x$ac_cv_lib_jpeg_main" = xyes; then :
30666  cat >>confdefs.h <<_ACEOF
30667#define HAVE_LIBJPEG 1
30668_ACEOF
30669
30670  LIBS="-ljpeg $LIBS"
30671
30672else
30673   USE_EXTERNAL_LIBJPEG=false
30674               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30675$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30676
30677fi
30678
30679
30680
30681###############################################################################
30682#
30683# Check for the gif library
30684#
30685
30686USE_EXTERNAL_LIBJPEG=true
30687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30688$as_echo_n "checking for main in -lgif... " >&6; }
30689if ${ac_cv_lib_gif_main+:} false; then :
30690  $as_echo_n "(cached) " >&6
30691else
30692  ac_check_lib_save_LIBS=$LIBS
30693LIBS="-lgif  $LIBS"
30694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30695/* end confdefs.h.  */
30696
30697
30698int
30699main ()
30700{
30701return main ();
30702  ;
30703  return 0;
30704}
30705_ACEOF
30706if ac_fn_cxx_try_link "$LINENO"; then :
30707  ac_cv_lib_gif_main=yes
30708else
30709  ac_cv_lib_gif_main=no
30710fi
30711rm -f core conftest.err conftest.$ac_objext \
30712    conftest$ac_exeext conftest.$ac_ext
30713LIBS=$ac_check_lib_save_LIBS
30714fi
30715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30716$as_echo "$ac_cv_lib_gif_main" >&6; }
30717if test "x$ac_cv_lib_gif_main" = xyes; then :
30718  cat >>confdefs.h <<_ACEOF
30719#define HAVE_LIBGIF 1
30720_ACEOF
30721
30722  LIBS="-lgif $LIBS"
30723
30724else
30725   USE_EXTERNAL_LIBGIF=false
30726               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30727$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30728
30729fi
30730
30731
30732
30733###############################################################################
30734#
30735# Check for the zlib library
30736#
30737
30738
30739# Check whether --with-zlib was given.
30740if test "${with_zlib+set}" = set; then :
30741  withval=$with_zlib;
30742fi
30743
30744
30745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30746$as_echo_n "checking for compress in -lz... " >&6; }
30747if ${ac_cv_lib_z_compress+:} false; then :
30748  $as_echo_n "(cached) " >&6
30749else
30750  ac_check_lib_save_LIBS=$LIBS
30751LIBS="-lz  $LIBS"
30752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30753/* end confdefs.h.  */
30754
30755/* Override any GCC internal prototype to avoid an error.
30756   Use char because int might match the return type of a GCC
30757   builtin and then its argument prototype would still apply.  */
30758#ifdef __cplusplus
30759extern "C"
30760#endif
30761char compress ();
30762int
30763main ()
30764{
30765return compress ();
30766  ;
30767  return 0;
30768}
30769_ACEOF
30770if ac_fn_cxx_try_link "$LINENO"; then :
30771  ac_cv_lib_z_compress=yes
30772else
30773  ac_cv_lib_z_compress=no
30774fi
30775rm -f core conftest.err conftest.$ac_objext \
30776    conftest$ac_exeext conftest.$ac_ext
30777LIBS=$ac_check_lib_save_LIBS
30778fi
30779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30780$as_echo "$ac_cv_lib_z_compress" >&6; }
30781if test "x$ac_cv_lib_z_compress" = xyes; then :
30782   ZLIB_FOUND=yes
30783else
30784   ZLIB_FOUND=no
30785fi
30786
30787
30788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30789$as_echo_n "checking for which zlib to use... " >&6; }
30790
30791DEFAULT_ZLIB=bundled
30792if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30793#
30794# On macosx default is system...on others default is
30795#
30796    DEFAULT_ZLIB=system
30797fi
30798
30799if test "x${ZLIB_FOUND}" != "xyes"; then
30800#
30801# If we don't find any system...set default to bundled
30802#
30803    DEFAULT_ZLIB=bundled
30804fi
30805
30806#
30807# If user didn't specify, use DEFAULT_ZLIB
30808#
30809if test "x${with_zlib}" = "x"; then
30810    with_zlib=${DEFAULT_ZLIB}
30811fi
30812
30813if test "x${with_zlib}" = "xbundled"; then
30814    USE_EXTERNAL_LIBZ=false
30815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30816$as_echo "bundled" >&6; }
30817elif test "x${with_zlib}" = "xsystem"; then
30818    if test "x${ZLIB_FOUND}" = "xyes"; then
30819        USE_EXTERNAL_LIBZ=true
30820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30821$as_echo "system" >&6; }
30822    else
30823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30824$as_echo "system not found" >&6; }
30825        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30826    fi
30827else
30828    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30829fi
30830
30831
30832
30833###############################################################################
30834LIBZIP_CAN_USE_MMAP=true
30835
30836
30837
30838###############################################################################
30839#
30840# Check if altzone exists in time.h
30841#
30842
30843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30844/* end confdefs.h.  */
30845#include <time.h>
30846int
30847main ()
30848{
30849return (int)altzone;
30850  ;
30851  return 0;
30852}
30853_ACEOF
30854if ac_fn_cxx_try_link "$LINENO"; then :
30855  has_altzone=yes
30856else
30857  has_altzone=no
30858fi
30859rm -f core conftest.err conftest.$ac_objext \
30860    conftest$ac_exeext conftest.$ac_ext
30861if test "x$has_altzone" = xyes; then
30862
30863$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30864
30865fi
30866
30867###############################################################################
30868#
30869# Check the maths library
30870#
30871
30872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30873$as_echo_n "checking for cos in -lm... " >&6; }
30874if ${ac_cv_lib_m_cos+:} false; then :
30875  $as_echo_n "(cached) " >&6
30876else
30877  ac_check_lib_save_LIBS=$LIBS
30878LIBS="-lm  $LIBS"
30879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30880/* end confdefs.h.  */
30881
30882/* Override any GCC internal prototype to avoid an error.
30883   Use char because int might match the return type of a GCC
30884   builtin and then its argument prototype would still apply.  */
30885#ifdef __cplusplus
30886extern "C"
30887#endif
30888char cos ();
30889int
30890main ()
30891{
30892return cos ();
30893  ;
30894  return 0;
30895}
30896_ACEOF
30897if ac_fn_cxx_try_link "$LINENO"; then :
30898  ac_cv_lib_m_cos=yes
30899else
30900  ac_cv_lib_m_cos=no
30901fi
30902rm -f core conftest.err conftest.$ac_objext \
30903    conftest$ac_exeext conftest.$ac_ext
30904LIBS=$ac_check_lib_save_LIBS
30905fi
30906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30907$as_echo "$ac_cv_lib_m_cos" >&6; }
30908if test "x$ac_cv_lib_m_cos" = xyes; then :
30909  cat >>confdefs.h <<_ACEOF
30910#define HAVE_LIBM 1
30911_ACEOF
30912
30913  LIBS="-lm $LIBS"
30914
30915else
30916
30917                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30918$as_echo "$as_me: Maths library was not found" >&6;}
30919
30920fi
30921
30922
30923
30924###############################################################################
30925#
30926# Check for libdl.so
30927
30928save_LIBS="$LIBS"
30929LIBS=""
30930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30931$as_echo_n "checking for dlopen in -ldl... " >&6; }
30932if ${ac_cv_lib_dl_dlopen+:} false; then :
30933  $as_echo_n "(cached) " >&6
30934else
30935  ac_check_lib_save_LIBS=$LIBS
30936LIBS="-ldl  $LIBS"
30937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30938/* end confdefs.h.  */
30939
30940/* Override any GCC internal prototype to avoid an error.
30941   Use char because int might match the return type of a GCC
30942   builtin and then its argument prototype would still apply.  */
30943#ifdef __cplusplus
30944extern "C"
30945#endif
30946char dlopen ();
30947int
30948main ()
30949{
30950return dlopen ();
30951  ;
30952  return 0;
30953}
30954_ACEOF
30955if ac_fn_cxx_try_link "$LINENO"; then :
30956  ac_cv_lib_dl_dlopen=yes
30957else
30958  ac_cv_lib_dl_dlopen=no
30959fi
30960rm -f core conftest.err conftest.$ac_objext \
30961    conftest$ac_exeext conftest.$ac_ext
30962LIBS=$ac_check_lib_save_LIBS
30963fi
30964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30965$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30966if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
30967  cat >>confdefs.h <<_ACEOF
30968#define HAVE_LIBDL 1
30969_ACEOF
30970
30971  LIBS="-ldl $LIBS"
30972
30973fi
30974
30975LIBDL="$LIBS"
30976
30977LIBS="$save_LIBS"
30978
30979
30980
30981###############################################################################
30982#
30983# statically link libstdc++ before C++ ABI is stablized on Linux unless
30984# dynamic build is configured on command line.
30985#
30986
30987# Check whether --with-stdc++lib was given.
30988if test "${with_stdc__lib+set}" = set; then :
30989  withval=$with_stdc__lib;
30990    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30991        && test "x$with_stdc__lib" != xdefault; then
30992      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30993    fi
30994
30995else
30996  with_stdc__lib=default
30997
30998fi
30999
31000
31001if test "x$OPENJDK_TARGET_OS" = xlinux; then
31002    # Test if -lstdc++ works.
31003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31004$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31005    ac_ext=cpp
31006ac_cpp='$CXXCPP $CPPFLAGS'
31007ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31008ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31009ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31010
31011    OLD_CXXFLAGS="$CXXFLAGS"
31012    CXXFLAGS="$CXXFLAGS -lstdc++"
31013    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31014/* end confdefs.h.  */
31015
31016int
31017main ()
31018{
31019return 0;
31020  ;
31021  return 0;
31022}
31023_ACEOF
31024if ac_fn_cxx_try_link "$LINENO"; then :
31025  has_dynamic_libstdcxx=yes
31026else
31027  has_dynamic_libstdcxx=no
31028fi
31029rm -f core conftest.err conftest.$ac_objext \
31030    conftest$ac_exeext conftest.$ac_ext
31031    CXXFLAGS="$OLD_CXXFLAGS"
31032    ac_ext=cpp
31033ac_cpp='$CXXCPP $CPPFLAGS'
31034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31037
31038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31039$as_echo "$has_dynamic_libstdcxx" >&6; }
31040
31041    # Test if stdc++ can be linked statically.
31042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31043$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31044    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31045    ac_ext=cpp
31046ac_cpp='$CXXCPP $CPPFLAGS'
31047ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31048ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31049ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31050
31051    OLD_LIBS="$LIBS"
31052    OLD_CXX="$CXX"
31053    LIBS="$STATIC_STDCXX_FLAGS"
31054    CXX="$CC"
31055    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31056/* end confdefs.h.  */
31057
31058int
31059main ()
31060{
31061return 0;
31062  ;
31063  return 0;
31064}
31065_ACEOF
31066if ac_fn_cxx_try_link "$LINENO"; then :
31067  has_static_libstdcxx=yes
31068else
31069  has_static_libstdcxx=no
31070fi
31071rm -f core conftest.err conftest.$ac_objext \
31072    conftest$ac_exeext conftest.$ac_ext
31073    LIBS="$OLD_LIBS"
31074    CXX="$OLD_CXX"
31075    ac_ext=cpp
31076ac_cpp='$CXXCPP $CPPFLAGS'
31077ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31078ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31079ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31080
31081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31082$as_echo "$has_static_libstdcxx" >&6; }
31083
31084    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31085        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31086    fi
31087
31088    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31089        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31090    fi
31091
31092    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31093        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31094    fi
31095
31096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31097$as_echo_n "checking how to link with libstdc++... " >&6; }
31098    # If dynamic was requested, it's available since it would fail above otherwise.
31099    # If dynamic wasn't requested, go with static unless it isn't available.
31100    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31101        LIBCXX="$LIBCXX -lstdc++"
31102        LDCXX="$CXX"
31103        STATIC_CXX_SETTING="STATIC_CXX=false"
31104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31105$as_echo "dynamic" >&6; }
31106    else
31107        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31108        LDCXX="$CC"
31109        STATIC_CXX_SETTING="STATIC_CXX=true"
31110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31111$as_echo "static" >&6; }
31112    fi
31113fi
31114
31115
31116# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31117if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31118    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31119fi
31120
31121# TODO better (platform agnostic) test
31122if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31123    LIBCXX="-lstdc++"
31124fi
31125
31126
31127
31128
31129
31130# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31131
31132# When using cygwin or msys, we need a wrapper binary that renames
31133# /cygdrive/c/ arguments into c:/ arguments and peeks into
31134# @files and rewrites these too! This wrapper binary is
31135# called fixpath.
31136FIXPATH=
31137if test "x$OPENJDK_BUILD_OS" = xwindows; then
31138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31139$as_echo_n "checking if fixpath can be created... " >&6; }
31140    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31141    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31142    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31143      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31144      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31145      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31146      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31147    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31148      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31149      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31150
31151      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31152      # @ was chosen as separator to minimize risk of other tools messing around with it
31153      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31154      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31155
31156      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31157    fi
31158    rm -f $OUTPUT_ROOT/fixpath*
31159    cd $OUTPUT_ROOT
31160    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31161    cd $CURDIR
31162
31163    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31165$as_echo "no" >&6; }
31166        cat $OUTPUT_ROOT/fixpath1.log
31167        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31168    fi
31169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31170$as_echo "yes" >&6; }
31171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31172$as_echo_n "checking if fixpath.exe works... " >&6; }
31173    cd $OUTPUT_ROOT
31174    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31175    cd $CURDIR
31176    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31178$as_echo "no" >&6; }
31179        cat $OUTPUT_ROOT/fixpath2.log
31180        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31181    fi
31182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31183$as_echo "yes" >&6; }
31184    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31185fi
31186
31187
31188
31189
31190###############################################################################
31191#
31192# We need to do some final tweaking, when everything else is done.
31193#
31194###############################################################################
31195
31196
31197HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31198
31199
31200# The name of the Service Agent jar.
31201SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31202if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31203  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31204fi
31205
31206
31207
31208
31209###############################################################################
31210#
31211# Configure parts of the build that only affect the build performance,
31212# not the result.
31213#
31214###############################################################################
31215
31216
31217# How many cores do we have on this build system?
31218
31219# Check whether --with-num-cores was given.
31220if test "${with_num_cores+set}" = set; then :
31221  withval=$with_num_cores;
31222fi
31223
31224if test "x$with_num_cores" = x; then
31225    # The number of cores were not specified, try to probe them.
31226
31227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31228$as_echo_n "checking for number of cores... " >&6; }
31229    NUM_CORES=1
31230    FOUND_CORES=no
31231
31232    if test -f /proc/cpuinfo; then
31233        # Looks like a Linux (or cygwin) system
31234        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31235        FOUND_CORES=yes
31236    elif test -x /usr/sbin/psrinfo; then
31237        # Looks like a Solaris system
31238        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31239        FOUND_CORES=yes
31240    elif test -x /usr/sbin/system_profiler; then
31241        # Looks like a MacOSX system
31242        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31243        FOUND_CORES=yes
31244    elif test -n "$NUMBER_OF_PROCESSORS"; then
31245        # On windows, look in the env
31246        NUM_CORES=$NUMBER_OF_PROCESSORS
31247        FOUND_CORES=yes
31248    fi
31249
31250    # For c/c++ code we run twice as many concurrent build
31251    # jobs than we have cores, otherwise we will stall on io.
31252    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31253
31254    if test "x$FOUND_CORES" = xyes; then
31255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31256$as_echo "$NUM_CORES" >&6; }
31257    else
31258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31259$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31260        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31261$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31262    fi
31263
31264
31265else
31266    NUM_CORES=$with_num_cores
31267    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31268fi
31269
31270
31271
31272
31273# How much memory do we have on this build system?
31274
31275# Check whether --with-memory-size was given.
31276if test "${with_memory_size+set}" = set; then :
31277  withval=$with_memory_size;
31278fi
31279
31280if test "x$with_memory_size" = x; then
31281    # The memory size was not specified, try to probe it.
31282
31283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31284$as_echo_n "checking for memory size... " >&6; }
31285    # Default to 1024 MB
31286    MEMORY_SIZE=1024
31287    FOUND_MEM=no
31288
31289    if test -f /proc/meminfo; then
31290        # Looks like a Linux (or cygwin) system
31291        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31292        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31293        FOUND_MEM=yes
31294    elif test -x /usr/sbin/prtconf; then
31295        # Looks like a Solaris system
31296        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31297        FOUND_MEM=yes
31298    elif test -x /usr/sbin/system_profiler; then
31299        # Looks like a MacOSX system
31300        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31301        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31302        FOUND_MEM=yes
31303    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31304        # Windows, but without cygwin
31305        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31306        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31307        FOUND_MEM=yes
31308    fi
31309
31310    if test "x$FOUND_MEM" = xyes; then
31311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31312$as_echo "$MEMORY_SIZE MB" >&6; }
31313    else
31314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31315$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31317$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31318    fi
31319
31320else
31321    MEMORY_SIZE=$with_memory_size
31322fi
31323
31324
31325
31326# Setup smart javac (after cores and memory have been setup)
31327
31328
31329# Check whether --with-sjavac-server-java was given.
31330if test "${with_sjavac_server_java+set}" = set; then :
31331  withval=$with_sjavac_server_java;
31332fi
31333
31334
31335if test "x$with_sjavac_server_java" != x; then
31336    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31337    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31338    if test "x$FOUND_VERSION" = x; then
31339        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31340    fi
31341else
31342    SJAVAC_SERVER_JAVA=""
31343    # Hotspot specific options.
31344
31345    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31346    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31347    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31348    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31349    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31350        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31351    fi
31352
31353    # JRockit specific options.
31354
31355    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31356    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31357    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31358    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31359    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31360        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31361    fi
31362
31363    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31364fi
31365
31366
31367
31368# Check whether --with-sjavac-server-cores was given.
31369if test "${with_sjavac_server_cores+set}" = set; then :
31370  withval=$with_sjavac_server_cores;
31371fi
31372
31373if test "x$with_sjavac_server_cores" != x; then
31374    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31375else
31376    if test "$NUM_CORES" -gt 16; then
31377        # We set this arbitrary limit because we want to limit the heap
31378        # size of the javac server.
31379        # In the future we will make the javac compilers in the server
31380        # share more and more state, thus enabling us to use more and
31381        # more concurrent threads in the server.
31382        SJAVAC_SERVER_CORES="16"
31383    else
31384        SJAVAC_SERVER_CORES="$NUM_CORES"
31385    fi
31386
31387    if test "$MEMORY_SIZE" -gt "17000"; then
31388        MAX_HEAP_MEM=10000
31389
31390    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31391    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31392    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31393    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31394    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31395        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31396    fi
31397
31398
31399    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31400    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31401    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31402    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31403    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31404        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31405    fi
31406
31407    elif test "$MEMORY_SIZE" -gt "10000"; then
31408        MAX_HEAP_MEM=6000
31409
31410    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31411    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31412    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31413    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31414    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31415        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31416    fi
31417
31418
31419    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31420    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31421    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31422    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31423    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31424        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31425    fi
31426
31427    elif test "$MEMORY_SIZE" -gt "5000"; then
31428        MAX_HEAP_MEM=3000
31429
31430    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31431    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31432    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31433    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31434    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31435        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31436    fi
31437
31438
31439    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31440    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31441    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31442    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31443    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31444        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31445    fi
31446
31447    elif test "$MEMORY_SIZE" -gt "3800"; then
31448        MAX_HEAP_MEM=2500
31449
31450    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31451    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31452    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31453    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31454    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31455        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31456    fi
31457
31458    elif test "$MEMORY_SIZE" -gt "1900"; then
31459        MAX_HEAP_MEM=1200
31460
31461    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31462    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31463    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31464    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31465    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31466        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31467    fi
31468
31469    elif test "$MEMORY_SIZE" -gt "1000"; then
31470        MAX_HEAP_MEM=900
31471
31472    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31473    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31474    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31475    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31476    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31477        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31478    fi
31479
31480    else
31481        MAX_HEAP_MEM=512
31482
31483    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31484    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31485    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31486    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31487    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31488        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31489    fi
31490
31491    fi
31492
31493
31494    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31495    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31496    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31497    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31498    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31499        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31500    fi
31501
31502
31503    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31504    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31505    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31506    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31507    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31508        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31509    fi
31510
31511
31512    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31513    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31514    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31515    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31516    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31517        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31518    fi
31519
31520
31521    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31522    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31524$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31525        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31527$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31528    fi
31529fi
31530
31531
31532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31533$as_echo_n "checking whether to use sjavac... " >&6; }
31534# Check whether --enable-sjavac was given.
31535if test "${enable_sjavac+set}" = set; then :
31536  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31537else
31538  ENABLE_SJAVAC='no'
31539fi
31540
31541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31542$as_echo "$ENABLE_SJAVAC" >&6; }
31543
31544
31545if test "x$ENABLE_SJAVAC" = xyes; then
31546    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31547else
31548    SJAVAC_SERVER_DIR=
31549fi
31550
31551
31552
31553
31554# Can the C/C++ compiler use precompiled headers?
31555
31556
31557###############################################################################
31558#
31559# Can the C/C++ compiler use precompiled headers?
31560#
31561# Check whether --enable-precompiled-headers was given.
31562if test "${enable_precompiled_headers+set}" = set; then :
31563  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31564else
31565  ENABLE_PRECOMPH=yes
31566fi
31567
31568
31569USE_PRECOMPILED_HEADER=1
31570if test "x$ENABLE_PRECOMPH" = xno; then
31571    USE_PRECOMPILED_HEADER=0
31572fi
31573
31574if test "x$ENABLE_PRECOMPH" = xyes; then
31575    # Check that the compiler actually supports precomp headers.
31576    if test "x$GCC" = xyes; then
31577         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31578$as_echo_n "checking that precompiled headers work... " >&6; }
31579         echo "int alfa();" > conftest.h
31580         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31581         if test ! -f conftest.hpp.gch; then
31582             USE_PRECOMPILED_HEADER=0
31583             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31584$as_echo "no" >&6; }
31585         else
31586             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31587$as_echo "yes" >&6; }
31588         fi
31589         rm -f conftest.h conftest.hpp.gch
31590    fi
31591fi
31592
31593
31594
31595
31596# Setup use of ccache, if available
31597
31598    # Check whether --enable-ccache was given.
31599if test "${enable_ccache+set}" = set; then :
31600  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31601else
31602  ENABLE_CCACHE=yes
31603fi
31604
31605    if test "x$ENABLE_CCACHE" = xyes; then
31606        # Extract the first word of "ccache", so it can be a program name with args.
31607set dummy ccache; ac_word=$2
31608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31609$as_echo_n "checking for $ac_word... " >&6; }
31610if ${ac_cv_path_CCACHE+:} false; then :
31611  $as_echo_n "(cached) " >&6
31612else
31613  case $CCACHE in
31614  [\\/]* | ?:[\\/]*)
31615  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31616  ;;
31617  *)
31618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31619for as_dir in $PATH
31620do
31621  IFS=$as_save_IFS
31622  test -z "$as_dir" && as_dir=.
31623    for ac_exec_ext in '' $ac_executable_extensions; do
31624  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31625    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31627    break 2
31628  fi
31629done
31630  done
31631IFS=$as_save_IFS
31632
31633  ;;
31634esac
31635fi
31636CCACHE=$ac_cv_path_CCACHE
31637if test -n "$CCACHE"; then
31638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31639$as_echo "$CCACHE" >&6; }
31640else
31641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31642$as_echo "no" >&6; }
31643fi
31644
31645
31646    else
31647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31648$as_echo_n "checking for ccache... " >&6; }
31649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31650$as_echo "explicitly disabled" >&6; }
31651        CCACHE=
31652    fi
31653
31654
31655
31656# Check whether --with-ccache-dir was given.
31657if test "${with_ccache_dir+set}" = set; then :
31658  withval=$with_ccache_dir;
31659fi
31660
31661
31662    if test "x$with_ccache_dir" != x; then
31663        # When using a non home ccache directory, assume the use is to share ccache files
31664        # with other users. Thus change the umask.
31665        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31666    fi
31667    CCACHE_FOUND=""
31668    if test "x$CCACHE" != x; then
31669
31670    if test "x$CCACHE" != x; then
31671        CCACHE_FOUND="true"
31672        # Only use ccache if it is 3.1.4 or later, which supports
31673        # precompiled headers.
31674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31675$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31676        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31677        if test "x$HAS_GOOD_CCACHE" = x; then
31678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31679$as_echo "no, disabling ccache" >&6; }
31680            CCACHE=
31681        else
31682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31683$as_echo "yes" >&6; }
31684            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31685$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31686            PUSHED_FLAGS="$CXXFLAGS"
31687            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31688            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31689/* end confdefs.h.  */
31690
31691int
31692main ()
31693{
31694
31695  ;
31696  return 0;
31697}
31698_ACEOF
31699if ac_fn_cxx_try_compile "$LINENO"; then :
31700  CC_KNOWS_CCACHE_TRICK=yes
31701else
31702  CC_KNOWS_CCACHE_TRICK=no
31703fi
31704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31705            CXXFLAGS="$PUSHED_FLAGS"
31706            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31707                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31708$as_echo "yes" >&6; }
31709            else
31710                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31711$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31712                CCACHE=
31713            fi
31714        fi
31715    fi
31716
31717    if test "x$CCACHE" != x; then
31718        CCACHE_SLOPPINESS=time_macros
31719        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31720        CCACHE_FLAGS=-fpch-preprocess
31721
31722        if test "x$SET_CCACHE_DIR" != x; then
31723            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31724	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31725        fi
31726    fi
31727
31728    fi
31729
31730
31731###############################################################################
31732#
31733# And now the finish...
31734#
31735###############################################################################
31736
31737# Check for some common pitfalls
31738
31739  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31740    file_to_test="$SRC_ROOT/LICENSE"
31741    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31742      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
31743    fi
31744  fi
31745
31746
31747
31748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31749$as_echo_n "checking if build directory is on local disk... " >&6; }
31750
31751	# df -l lists only local disks; if the given directory is not found then
31752	# a non-zero exit code is given
31753  if test "x$DF" = x; then
31754    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31755      # msys does not have df; use Windows "net use" instead.
31756      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31757      if test "x$IS_NETWORK_DISK" = x; then
31758        OUTPUT_DIR_IS_LOCAL="yes"
31759      else
31760        OUTPUT_DIR_IS_LOCAL="no"
31761      fi
31762    else
31763      # No df here, say it's local
31764      OUTPUT_DIR_IS_LOCAL="yes"
31765    fi
31766  else
31767    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31768      OUTPUT_DIR_IS_LOCAL="yes"
31769    else
31770      OUTPUT_DIR_IS_LOCAL="no"
31771    fi
31772  fi
31773
31774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31775$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31776
31777
31778
31779# Check if the user has any old-style ALT_ variables set.
31780FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31781
31782# Before generating output files, test if they exist. If they do, this is a reconfigure.
31783# Since we can't properly handle the dependencies for this, warn the user about the situation
31784if test -e $OUTPUT_ROOT/spec.gmk; then
31785  IS_RECONFIGURE=yes
31786else
31787  IS_RECONFIGURE=no
31788fi
31789
31790if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31791  HIDE_PERFORMANCE_HINTS=yes
31792else
31793  HIDE_PERFORMANCE_HINTS=no
31794  # Hide it the next time around...
31795  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31796fi
31797
31798
31799
31800# At the end, call the custom hook. (Dummy macro if no custom sources available)
31801
31802
31803# We're messing a bit with internal autoconf variables to put the config.status
31804# in the output directory instead of the current directory.
31805CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31806# Create the actual output files. Now the main work of configure is done.
31807cat >confcache <<\_ACEOF
31808# This file is a shell script that caches the results of configure
31809# tests run on this system so they can be shared between configure
31810# scripts and configure runs, see configure's option --config-cache.
31811# It is not useful on other systems.  If it contains results you don't
31812# want to keep, you may remove or edit it.
31813#
31814# config.status only pays attention to the cache file if you give it
31815# the --recheck option to rerun configure.
31816#
31817# `ac_cv_env_foo' variables (set or unset) will be overridden when
31818# loading this file, other *unset* `ac_cv_foo' will be assigned the
31819# following values.
31820
31821_ACEOF
31822
31823# The following way of writing the cache mishandles newlines in values,
31824# but we know of no workaround that is simple, portable, and efficient.
31825# So, we kill variables containing newlines.
31826# Ultrix sh set writes to stderr and can't be redirected directly,
31827# and sets the high bit in the cache file unless we assign to the vars.
31828(
31829  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31830    eval ac_val=\$$ac_var
31831    case $ac_val in #(
31832    *${as_nl}*)
31833      case $ac_var in #(
31834      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31835$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31836      esac
31837      case $ac_var in #(
31838      _ | IFS | as_nl) ;; #(
31839      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31840      *) { eval $ac_var=; unset $ac_var;} ;;
31841      esac ;;
31842    esac
31843  done
31844
31845  (set) 2>&1 |
31846    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31847    *${as_nl}ac_space=\ *)
31848      # `set' does not quote correctly, so add quotes: double-quote
31849      # substitution turns \\\\ into \\, and sed turns \\ into \.
31850      sed -n \
31851	"s/'/'\\\\''/g;
31852	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31853      ;; #(
31854    *)
31855      # `set' quotes correctly as required by POSIX, so do not add quotes.
31856      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31857      ;;
31858    esac |
31859    sort
31860) |
31861  sed '
31862     /^ac_cv_env_/b end
31863     t clear
31864     :clear
31865     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31866     t end
31867     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31868     :end' >>confcache
31869if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31870  if test -w "$cache_file"; then
31871    if test "x$cache_file" != "x/dev/null"; then
31872      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31873$as_echo "$as_me: updating cache $cache_file" >&6;}
31874      if test ! -f "$cache_file" || test -h "$cache_file"; then
31875	cat confcache >"$cache_file"
31876      else
31877        case $cache_file in #(
31878        */* | ?:*)
31879	  mv -f confcache "$cache_file"$$ &&
31880	  mv -f "$cache_file"$$ "$cache_file" ;; #(
31881        *)
31882	  mv -f confcache "$cache_file" ;;
31883	esac
31884      fi
31885    fi
31886  else
31887    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31888$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31889  fi
31890fi
31891rm -f confcache
31892
31893test "x$prefix" = xNONE && prefix=$ac_default_prefix
31894# Let make expand exec_prefix.
31895test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31896
31897DEFS=-DHAVE_CONFIG_H
31898
31899ac_libobjs=
31900ac_ltlibobjs=
31901U=
31902for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31903  # 1. Remove the extension, and $U if already installed.
31904  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31905  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31906  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31907  #    will be set to the directory where LIBOBJS objects are built.
31908  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31909  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31910done
31911LIBOBJS=$ac_libobjs
31912
31913LTLIBOBJS=$ac_ltlibobjs
31914
31915
31916
31917: "${CONFIG_STATUS=./config.status}"
31918ac_write_fail=0
31919ac_clean_files_save=$ac_clean_files
31920ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31921{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31922$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31923as_write_fail=0
31924cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31925#! $SHELL
31926# Generated by $as_me.
31927# Run this file to recreate the current configuration.
31928# Compiler output produced by configure, useful for debugging
31929# configure, is in config.log if it exists.
31930
31931debug=false
31932ac_cs_recheck=false
31933ac_cs_silent=false
31934
31935SHELL=\${CONFIG_SHELL-$SHELL}
31936export SHELL
31937_ASEOF
31938cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31939## -------------------- ##
31940## M4sh Initialization. ##
31941## -------------------- ##
31942
31943# Be more Bourne compatible
31944DUALCASE=1; export DUALCASE # for MKS sh
31945if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31946  emulate sh
31947  NULLCMD=:
31948  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31949  # is contrary to our usage.  Disable this feature.
31950  alias -g '${1+"$@"}'='"$@"'
31951  setopt NO_GLOB_SUBST
31952else
31953  case `(set -o) 2>/dev/null` in #(
31954  *posix*) :
31955    set -o posix ;; #(
31956  *) :
31957     ;;
31958esac
31959fi
31960
31961
31962as_nl='
31963'
31964export as_nl
31965# Printing a long string crashes Solaris 7 /usr/bin/printf.
31966as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31967as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31968as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31969# Prefer a ksh shell builtin over an external printf program on Solaris,
31970# but without wasting forks for bash or zsh.
31971if test -z "$BASH_VERSION$ZSH_VERSION" \
31972    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31973  as_echo='print -r --'
31974  as_echo_n='print -rn --'
31975elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31976  as_echo='printf %s\n'
31977  as_echo_n='printf %s'
31978else
31979  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31980    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31981    as_echo_n='/usr/ucb/echo -n'
31982  else
31983    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31984    as_echo_n_body='eval
31985      arg=$1;
31986      case $arg in #(
31987      *"$as_nl"*)
31988	expr "X$arg" : "X\\(.*\\)$as_nl";
31989	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31990      esac;
31991      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31992    '
31993    export as_echo_n_body
31994    as_echo_n='sh -c $as_echo_n_body as_echo'
31995  fi
31996  export as_echo_body
31997  as_echo='sh -c $as_echo_body as_echo'
31998fi
31999
32000# The user is always right.
32001if test "${PATH_SEPARATOR+set}" != set; then
32002  PATH_SEPARATOR=:
32003  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32004    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32005      PATH_SEPARATOR=';'
32006  }
32007fi
32008
32009
32010# IFS
32011# We need space, tab and new line, in precisely that order.  Quoting is
32012# there to prevent editors from complaining about space-tab.
32013# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32014# splitting by setting IFS to empty value.)
32015IFS=" ""	$as_nl"
32016
32017# Find who we are.  Look in the path if we contain no directory separator.
32018as_myself=
32019case $0 in #((
32020  *[\\/]* ) as_myself=$0 ;;
32021  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32022for as_dir in $PATH
32023do
32024  IFS=$as_save_IFS
32025  test -z "$as_dir" && as_dir=.
32026    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32027  done
32028IFS=$as_save_IFS
32029
32030     ;;
32031esac
32032# We did not find ourselves, most probably we were run as `sh COMMAND'
32033# in which case we are not to be found in the path.
32034if test "x$as_myself" = x; then
32035  as_myself=$0
32036fi
32037if test ! -f "$as_myself"; then
32038  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32039  exit 1
32040fi
32041
32042# Unset variables that we do not need and which cause bugs (e.g. in
32043# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32044# suppresses any "Segmentation fault" message there.  '((' could
32045# trigger a bug in pdksh 5.2.14.
32046for as_var in BASH_ENV ENV MAIL MAILPATH
32047do eval test x\${$as_var+set} = xset \
32048  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32049done
32050PS1='$ '
32051PS2='> '
32052PS4='+ '
32053
32054# NLS nuisances.
32055LC_ALL=C
32056export LC_ALL
32057LANGUAGE=C
32058export LANGUAGE
32059
32060# CDPATH.
32061(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32062
32063
32064# as_fn_error STATUS ERROR [LINENO LOG_FD]
32065# ----------------------------------------
32066# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32067# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32068# script with STATUS, using 1 if that was 0.
32069as_fn_error ()
32070{
32071  as_status=$1; test $as_status -eq 0 && as_status=1
32072  if test "$4"; then
32073    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32074    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32075  fi
32076  $as_echo "$as_me: error: $2" >&2
32077  as_fn_exit $as_status
32078} # as_fn_error
32079
32080
32081# as_fn_set_status STATUS
32082# -----------------------
32083# Set $? to STATUS, without forking.
32084as_fn_set_status ()
32085{
32086  return $1
32087} # as_fn_set_status
32088
32089# as_fn_exit STATUS
32090# -----------------
32091# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32092as_fn_exit ()
32093{
32094  set +e
32095  as_fn_set_status $1
32096  exit $1
32097} # as_fn_exit
32098
32099# as_fn_unset VAR
32100# ---------------
32101# Portably unset VAR.
32102as_fn_unset ()
32103{
32104  { eval $1=; unset $1;}
32105}
32106as_unset=as_fn_unset
32107# as_fn_append VAR VALUE
32108# ----------------------
32109# Append the text in VALUE to the end of the definition contained in VAR. Take
32110# advantage of any shell optimizations that allow amortized linear growth over
32111# repeated appends, instead of the typical quadratic growth present in naive
32112# implementations.
32113if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32114  eval 'as_fn_append ()
32115  {
32116    eval $1+=\$2
32117  }'
32118else
32119  as_fn_append ()
32120  {
32121    eval $1=\$$1\$2
32122  }
32123fi # as_fn_append
32124
32125# as_fn_arith ARG...
32126# ------------------
32127# Perform arithmetic evaluation on the ARGs, and store the result in the
32128# global $as_val. Take advantage of shells that can avoid forks. The arguments
32129# must be portable across $(()) and expr.
32130if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32131  eval 'as_fn_arith ()
32132  {
32133    as_val=$(( $* ))
32134  }'
32135else
32136  as_fn_arith ()
32137  {
32138    as_val=`expr "$@" || test $? -eq 1`
32139  }
32140fi # as_fn_arith
32141
32142
32143if expr a : '\(a\)' >/dev/null 2>&1 &&
32144   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32145  as_expr=expr
32146else
32147  as_expr=false
32148fi
32149
32150if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32151  as_basename=basename
32152else
32153  as_basename=false
32154fi
32155
32156if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32157  as_dirname=dirname
32158else
32159  as_dirname=false
32160fi
32161
32162as_me=`$as_basename -- "$0" ||
32163$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32164	 X"$0" : 'X\(//\)$' \| \
32165	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32166$as_echo X/"$0" |
32167    sed '/^.*\/\([^/][^/]*\)\/*$/{
32168	    s//\1/
32169	    q
32170	  }
32171	  /^X\/\(\/\/\)$/{
32172	    s//\1/
32173	    q
32174	  }
32175	  /^X\/\(\/\).*/{
32176	    s//\1/
32177	    q
32178	  }
32179	  s/.*/./; q'`
32180
32181# Avoid depending upon Character Ranges.
32182as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32183as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32184as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32185as_cr_digits='0123456789'
32186as_cr_alnum=$as_cr_Letters$as_cr_digits
32187
32188ECHO_C= ECHO_N= ECHO_T=
32189case `echo -n x` in #(((((
32190-n*)
32191  case `echo 'xy\c'` in
32192  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32193  xy)  ECHO_C='\c';;
32194  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32195       ECHO_T='	';;
32196  esac;;
32197*)
32198  ECHO_N='-n';;
32199esac
32200
32201rm -f conf$$ conf$$.exe conf$$.file
32202if test -d conf$$.dir; then
32203  rm -f conf$$.dir/conf$$.file
32204else
32205  rm -f conf$$.dir
32206  mkdir conf$$.dir 2>/dev/null
32207fi
32208if (echo >conf$$.file) 2>/dev/null; then
32209  if ln -s conf$$.file conf$$ 2>/dev/null; then
32210    as_ln_s='ln -s'
32211    # ... but there are two gotchas:
32212    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32213    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32214    # In both cases, we have to default to `cp -p'.
32215    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32216      as_ln_s='cp -p'
32217  elif ln conf$$.file conf$$ 2>/dev/null; then
32218    as_ln_s=ln
32219  else
32220    as_ln_s='cp -p'
32221  fi
32222else
32223  as_ln_s='cp -p'
32224fi
32225rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32226rmdir conf$$.dir 2>/dev/null
32227
32228
32229# as_fn_mkdir_p
32230# -------------
32231# Create "$as_dir" as a directory, including parents if necessary.
32232as_fn_mkdir_p ()
32233{
32234
32235  case $as_dir in #(
32236  -*) as_dir=./$as_dir;;
32237  esac
32238  test -d "$as_dir" || eval $as_mkdir_p || {
32239    as_dirs=
32240    while :; do
32241      case $as_dir in #(
32242      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32243      *) as_qdir=$as_dir;;
32244      esac
32245      as_dirs="'$as_qdir' $as_dirs"
32246      as_dir=`$as_dirname -- "$as_dir" ||
32247$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32248	 X"$as_dir" : 'X\(//\)[^/]' \| \
32249	 X"$as_dir" : 'X\(//\)$' \| \
32250	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32251$as_echo X"$as_dir" |
32252    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32253	    s//\1/
32254	    q
32255	  }
32256	  /^X\(\/\/\)[^/].*/{
32257	    s//\1/
32258	    q
32259	  }
32260	  /^X\(\/\/\)$/{
32261	    s//\1/
32262	    q
32263	  }
32264	  /^X\(\/\).*/{
32265	    s//\1/
32266	    q
32267	  }
32268	  s/.*/./; q'`
32269      test -d "$as_dir" && break
32270    done
32271    test -z "$as_dirs" || eval "mkdir $as_dirs"
32272  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32273
32274
32275} # as_fn_mkdir_p
32276if mkdir -p . 2>/dev/null; then
32277  as_mkdir_p='mkdir -p "$as_dir"'
32278else
32279  test -d ./-p && rmdir ./-p
32280  as_mkdir_p=false
32281fi
32282
32283if test -x / >/dev/null 2>&1; then
32284  as_test_x='test -x'
32285else
32286  if ls -dL / >/dev/null 2>&1; then
32287    as_ls_L_option=L
32288  else
32289    as_ls_L_option=
32290  fi
32291  as_test_x='
32292    eval sh -c '\''
32293      if test -d "$1"; then
32294	test -d "$1/.";
32295      else
32296	case $1 in #(
32297	-*)set "./$1";;
32298	esac;
32299	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32300	???[sx]*):;;*)false;;esac;fi
32301    '\'' sh
32302  '
32303fi
32304as_executable_p=$as_test_x
32305
32306# Sed expression to map a string onto a valid CPP name.
32307as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32308
32309# Sed expression to map a string onto a valid variable name.
32310as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32311
32312
32313exec 6>&1
32314## ----------------------------------- ##
32315## Main body of $CONFIG_STATUS script. ##
32316## ----------------------------------- ##
32317_ASEOF
32318test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32319
32320cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32321# Save the log message, to keep $0 and so on meaningful, and to
32322# report actual input values of CONFIG_FILES etc. instead of their
32323# values after options handling.
32324ac_log="
32325This file was extended by OpenJDK $as_me jdk8, which was
32326generated by GNU Autoconf 2.68.  Invocation command line was
32327
32328  CONFIG_FILES    = $CONFIG_FILES
32329  CONFIG_HEADERS  = $CONFIG_HEADERS
32330  CONFIG_LINKS    = $CONFIG_LINKS
32331  CONFIG_COMMANDS = $CONFIG_COMMANDS
32332  $ $0 $@
32333
32334on `(hostname || uname -n) 2>/dev/null | sed 1q`
32335"
32336
32337_ACEOF
32338
32339case $ac_config_files in *"
32340"*) set x $ac_config_files; shift; ac_config_files=$*;;
32341esac
32342
32343case $ac_config_headers in *"
32344"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32345esac
32346
32347
32348cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32349# Files that config.status was made for.
32350config_files="$ac_config_files"
32351config_headers="$ac_config_headers"
32352
32353_ACEOF
32354
32355cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32356ac_cs_usage="\
32357\`$as_me' instantiates files and other configuration actions
32358from templates according to the current configuration.  Unless the files
32359and actions are specified as TAGs, all are instantiated by default.
32360
32361Usage: $0 [OPTION]... [TAG]...
32362
32363  -h, --help       print this help, then exit
32364  -V, --version    print version number and configuration settings, then exit
32365      --config     print configuration, then exit
32366  -q, --quiet, --silent
32367                   do not print progress messages
32368  -d, --debug      don't remove temporary files
32369      --recheck    update $as_me by reconfiguring in the same conditions
32370      --file=FILE[:TEMPLATE]
32371                   instantiate the configuration file FILE
32372      --header=FILE[:TEMPLATE]
32373                   instantiate the configuration header FILE
32374
32375Configuration files:
32376$config_files
32377
32378Configuration headers:
32379$config_headers
32380
32381Report bugs to <build-dev@openjdk.java.net>.
32382OpenJDK home page: <http://openjdk.java.net>."
32383
32384_ACEOF
32385cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32386ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32387ac_cs_version="\\
32388OpenJDK config.status jdk8
32389configured by $0, generated by GNU Autoconf 2.68,
32390  with options \\"\$ac_cs_config\\"
32391
32392Copyright (C) 2010 Free Software Foundation, Inc.
32393This config.status script is free software; the Free Software Foundation
32394gives unlimited permission to copy, distribute and modify it."
32395
32396ac_pwd='$ac_pwd'
32397srcdir='$srcdir'
32398AWK='$AWK'
32399test -n "\$AWK" || AWK=awk
32400_ACEOF
32401
32402cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32403# The default lists apply if the user does not specify any file.
32404ac_need_defaults=:
32405while test $# != 0
32406do
32407  case $1 in
32408  --*=?*)
32409    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32410    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32411    ac_shift=:
32412    ;;
32413  --*=)
32414    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32415    ac_optarg=
32416    ac_shift=:
32417    ;;
32418  *)
32419    ac_option=$1
32420    ac_optarg=$2
32421    ac_shift=shift
32422    ;;
32423  esac
32424
32425  case $ac_option in
32426  # Handling of the options.
32427  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32428    ac_cs_recheck=: ;;
32429  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32430    $as_echo "$ac_cs_version"; exit ;;
32431  --config | --confi | --conf | --con | --co | --c )
32432    $as_echo "$ac_cs_config"; exit ;;
32433  --debug | --debu | --deb | --de | --d | -d )
32434    debug=: ;;
32435  --file | --fil | --fi | --f )
32436    $ac_shift
32437    case $ac_optarg in
32438    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32439    '') as_fn_error $? "missing file argument" ;;
32440    esac
32441    as_fn_append CONFIG_FILES " '$ac_optarg'"
32442    ac_need_defaults=false;;
32443  --header | --heade | --head | --hea )
32444    $ac_shift
32445    case $ac_optarg in
32446    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32447    esac
32448    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32449    ac_need_defaults=false;;
32450  --he | --h)
32451    # Conflict between --help and --header
32452    as_fn_error $? "ambiguous option: \`$1'
32453Try \`$0 --help' for more information.";;
32454  --help | --hel | -h )
32455    $as_echo "$ac_cs_usage"; exit ;;
32456  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32457  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32458    ac_cs_silent=: ;;
32459
32460  # This is an error.
32461  -*) as_fn_error $? "unrecognized option: \`$1'
32462Try \`$0 --help' for more information." ;;
32463
32464  *) as_fn_append ac_config_targets " $1"
32465     ac_need_defaults=false ;;
32466
32467  esac
32468  shift
32469done
32470
32471ac_configure_extra_args=
32472
32473if $ac_cs_silent; then
32474  exec 6>/dev/null
32475  ac_configure_extra_args="$ac_configure_extra_args --silent"
32476fi
32477
32478_ACEOF
32479cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32480if \$ac_cs_recheck; then
32481  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32482  shift
32483  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32484  CONFIG_SHELL='$SHELL'
32485  export CONFIG_SHELL
32486  exec "\$@"
32487fi
32488
32489_ACEOF
32490cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32491exec 5>>config.log
32492{
32493  echo
32494  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32495## Running $as_me. ##
32496_ASBOX
32497  $as_echo "$ac_log"
32498} >&5
32499
32500_ACEOF
32501cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32502_ACEOF
32503
32504cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32505
32506# Handling of arguments.
32507for ac_config_target in $ac_config_targets
32508do
32509  case $ac_config_target in
32510    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32511    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32512    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32513    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32514    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32515    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32516    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32517
32518  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32519  esac
32520done
32521
32522
32523# If the user did not use the arguments to specify the items to instantiate,
32524# then the envvar interface is used.  Set only those that are not.
32525# We use the long form for the default assignment because of an extremely
32526# bizarre bug on SunOS 4.1.3.
32527if $ac_need_defaults; then
32528  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32529  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32530fi
32531
32532# Have a temporary directory for convenience.  Make it in the build tree
32533# simply because there is no reason against having it here, and in addition,
32534# creating and moving files from /tmp can sometimes cause problems.
32535# Hook for its removal unless debugging.
32536# Note that there is a small window in which the directory will not be cleaned:
32537# after its creation but before its name has been assigned to `$tmp'.
32538$debug ||
32539{
32540  tmp= ac_tmp=
32541  trap 'exit_status=$?
32542  : "${ac_tmp:=$tmp}"
32543  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
32544' 0
32545  trap 'as_fn_exit 1' 1 2 13 15
32546}
32547# Create a (secure) tmp directory for tmp files.
32548
32549{
32550  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32551  test -d "$tmp"
32552}  ||
32553{
32554  tmp=./conf$$-$RANDOM
32555  (umask 077 && mkdir "$tmp")
32556} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32557ac_tmp=$tmp
32558
32559# Set up the scripts for CONFIG_FILES section.
32560# No need to generate them if there are no CONFIG_FILES.
32561# This happens for instance with `./config.status config.h'.
32562if test -n "$CONFIG_FILES"; then
32563
32564
32565ac_cr=`echo X | tr X '\015'`
32566# On cygwin, bash can eat \r inside `` if the user requested igncr.
32567# But we know of no other shell where ac_cr would be empty at this
32568# point, so we can use a bashism as a fallback.
32569if test "x$ac_cr" = x; then
32570  eval ac_cr=\$\'\\r\'
32571fi
32572ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32573if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32574  ac_cs_awk_cr='\\r'
32575else
32576  ac_cs_awk_cr=$ac_cr
32577fi
32578
32579echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
32580_ACEOF
32581
32582
32583{
32584  echo "cat >conf$$subs.awk <<_ACEOF" &&
32585  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32586  echo "_ACEOF"
32587} >conf$$subs.sh ||
32588  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32589ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32590ac_delim='%!_!# '
32591for ac_last_try in false false false false false :; do
32592  . ./conf$$subs.sh ||
32593    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32594
32595  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32596  if test $ac_delim_n = $ac_delim_num; then
32597    break
32598  elif $ac_last_try; then
32599    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32600  else
32601    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32602  fi
32603done
32604rm -f conf$$subs.sh
32605
32606cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32607cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
32608_ACEOF
32609sed -n '
32610h
32611s/^/S["/; s/!.*/"]=/
32612p
32613g
32614s/^[^!]*!//
32615:repl
32616t repl
32617s/'"$ac_delim"'$//
32618t delim
32619:nl
32620h
32621s/\(.\{148\}\)..*/\1/
32622t more1
32623s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32624p
32625n
32626b repl
32627:more1
32628s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32629p
32630g
32631s/.\{148\}//
32632t nl
32633:delim
32634h
32635s/\(.\{148\}\)..*/\1/
32636t more2
32637s/["\\]/\\&/g; s/^/"/; s/$/"/
32638p
32639b
32640:more2
32641s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32642p
32643g
32644s/.\{148\}//
32645t delim
32646' <conf$$subs.awk | sed '
32647/^[^""]/{
32648  N
32649  s/\n//
32650}
32651' >>$CONFIG_STATUS || ac_write_fail=1
32652rm -f conf$$subs.awk
32653cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32654_ACAWK
32655cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
32656  for (key in S) S_is_set[key] = 1
32657  FS = ""
32658
32659}
32660{
32661  line = $ 0
32662  nfields = split(line, field, "@")
32663  substed = 0
32664  len = length(field[1])
32665  for (i = 2; i < nfields; i++) {
32666    key = field[i]
32667    keylen = length(key)
32668    if (S_is_set[key]) {
32669      value = S[key]
32670      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32671      len += length(value) + length(field[++i])
32672      substed = 1
32673    } else
32674      len += 1 + keylen
32675  }
32676
32677  print line
32678}
32679
32680_ACAWK
32681_ACEOF
32682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32683if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32684  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32685else
32686  cat
32687fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
32688  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32689_ACEOF
32690
32691# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32692# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32693# trailing colons and then remove the whole line if VPATH becomes empty
32694# (actually we leave an empty line to preserve line numbers).
32695if test "x$srcdir" = x.; then
32696  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32697h
32698s///
32699s/^/:/
32700s/[	 ]*$/:/
32701s/:\$(srcdir):/:/g
32702s/:\${srcdir}:/:/g
32703s/:@srcdir@:/:/g
32704s/^:*//
32705s/:*$//
32706x
32707s/\(=[	 ]*\).*/\1/
32708G
32709s/\n//
32710s/^[^=]*=[	 ]*$//
32711}'
32712fi
32713
32714cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32715fi # test -n "$CONFIG_FILES"
32716
32717# Set up the scripts for CONFIG_HEADERS section.
32718# No need to generate them if there are no CONFIG_HEADERS.
32719# This happens for instance with `./config.status Makefile'.
32720if test -n "$CONFIG_HEADERS"; then
32721cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
32722BEGIN {
32723_ACEOF
32724
32725# Transform confdefs.h into an awk script `defines.awk', embedded as
32726# here-document in config.status, that substitutes the proper values into
32727# config.h.in to produce config.h.
32728
32729# Create a delimiter string that does not exist in confdefs.h, to ease
32730# handling of long lines.
32731ac_delim='%!_!# '
32732for ac_last_try in false false :; do
32733  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
32734  if test -z "$ac_tt"; then
32735    break
32736  elif $ac_last_try; then
32737    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32738  else
32739    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32740  fi
32741done
32742
32743# For the awk script, D is an array of macro values keyed by name,
32744# likewise P contains macro parameters if any.  Preserve backslash
32745# newline sequences.
32746
32747ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32748sed -n '
32749s/.\{148\}/&'"$ac_delim"'/g
32750t rset
32751:rset
32752s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32753t def
32754d
32755:def
32756s/\\$//
32757t bsnl
32758s/["\\]/\\&/g
32759s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32760D["\1"]=" \3"/p
32761s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32762d
32763:bsnl
32764s/["\\]/\\&/g
32765s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32766D["\1"]=" \3\\\\\\n"\\/p
32767t cont
32768s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32769t cont
32770d
32771:cont
32772n
32773s/.\{148\}/&'"$ac_delim"'/g
32774t clear
32775:clear
32776s/\\$//
32777t bsnlc
32778s/["\\]/\\&/g; s/^/"/; s/$/"/p
32779d
32780:bsnlc
32781s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32782b cont
32783' <confdefs.h | sed '
32784s/'"$ac_delim"'/"\\\
32785"/g' >>$CONFIG_STATUS || ac_write_fail=1
32786
32787cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32788  for (key in D) D_is_set[key] = 1
32789  FS = ""
32790}
32791/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32792  line = \$ 0
32793  split(line, arg, " ")
32794  if (arg[1] == "#") {
32795    defundef = arg[2]
32796    mac1 = arg[3]
32797  } else {
32798    defundef = substr(arg[1], 2)
32799    mac1 = arg[2]
32800  }
32801  split(mac1, mac2, "(") #)
32802  macro = mac2[1]
32803  prefix = substr(line, 1, index(line, defundef) - 1)
32804  if (D_is_set[macro]) {
32805    # Preserve the white space surrounding the "#".
32806    print prefix "define", macro P[macro] D[macro]
32807    next
32808  } else {
32809    # Replace #undef with comments.  This is necessary, for example,
32810    # in the case of _POSIX_SOURCE, which is predefined and required
32811    # on some systems where configure will not decide to define it.
32812    if (defundef == "undef") {
32813      print "/*", prefix defundef, macro, "*/"
32814      next
32815    }
32816  }
32817}
32818{ print }
32819_ACAWK
32820_ACEOF
32821cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32822  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32823fi # test -n "$CONFIG_HEADERS"
32824
32825
32826eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32827shift
32828for ac_tag
32829do
32830  case $ac_tag in
32831  :[FHLC]) ac_mode=$ac_tag; continue;;
32832  esac
32833  case $ac_mode$ac_tag in
32834  :[FHL]*:*);;
32835  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32836  :[FH]-) ac_tag=-:-;;
32837  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32838  esac
32839  ac_save_IFS=$IFS
32840  IFS=:
32841  set x $ac_tag
32842  IFS=$ac_save_IFS
32843  shift
32844  ac_file=$1
32845  shift
32846
32847  case $ac_mode in
32848  :L) ac_source=$1;;
32849  :[FH])
32850    ac_file_inputs=
32851    for ac_f
32852    do
32853      case $ac_f in
32854      -) ac_f="$ac_tmp/stdin";;
32855      *) # Look for the file first in the build tree, then in the source tree
32856	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32857	 # because $ac_f cannot contain `:'.
32858	 test -f "$ac_f" ||
32859	   case $ac_f in
32860	   [\\/$]*) false;;
32861	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32862	   esac ||
32863	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32864      esac
32865      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32866      as_fn_append ac_file_inputs " '$ac_f'"
32867    done
32868
32869    # Let's still pretend it is `configure' which instantiates (i.e., don't
32870    # use $as_me), people would be surprised to read:
32871    #    /* config.h.  Generated by config.status.  */
32872    configure_input='Generated from '`
32873	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32874	`' by configure.'
32875    if test x"$ac_file" != x-; then
32876      configure_input="$ac_file.  $configure_input"
32877      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32878$as_echo "$as_me: creating $ac_file" >&6;}
32879    fi
32880    # Neutralize special characters interpreted by sed in replacement strings.
32881    case $configure_input in #(
32882    *\&* | *\|* | *\\* )
32883       ac_sed_conf_input=`$as_echo "$configure_input" |
32884       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32885    *) ac_sed_conf_input=$configure_input;;
32886    esac
32887
32888    case $ac_tag in
32889    *:-:* | *:-) cat >"$ac_tmp/stdin" \
32890      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32891    esac
32892    ;;
32893  esac
32894
32895  ac_dir=`$as_dirname -- "$ac_file" ||
32896$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32897	 X"$ac_file" : 'X\(//\)[^/]' \| \
32898	 X"$ac_file" : 'X\(//\)$' \| \
32899	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32900$as_echo X"$ac_file" |
32901    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32902	    s//\1/
32903	    q
32904	  }
32905	  /^X\(\/\/\)[^/].*/{
32906	    s//\1/
32907	    q
32908	  }
32909	  /^X\(\/\/\)$/{
32910	    s//\1/
32911	    q
32912	  }
32913	  /^X\(\/\).*/{
32914	    s//\1/
32915	    q
32916	  }
32917	  s/.*/./; q'`
32918  as_dir="$ac_dir"; as_fn_mkdir_p
32919  ac_builddir=.
32920
32921case "$ac_dir" in
32922.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32923*)
32924  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32925  # A ".." for each directory in $ac_dir_suffix.
32926  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32927  case $ac_top_builddir_sub in
32928  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32929  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32930  esac ;;
32931esac
32932ac_abs_top_builddir=$ac_pwd
32933ac_abs_builddir=$ac_pwd$ac_dir_suffix
32934# for backward compatibility:
32935ac_top_builddir=$ac_top_build_prefix
32936
32937case $srcdir in
32938  .)  # We are building in place.
32939    ac_srcdir=.
32940    ac_top_srcdir=$ac_top_builddir_sub
32941    ac_abs_top_srcdir=$ac_pwd ;;
32942  [\\/]* | ?:[\\/]* )  # Absolute name.
32943    ac_srcdir=$srcdir$ac_dir_suffix;
32944    ac_top_srcdir=$srcdir
32945    ac_abs_top_srcdir=$srcdir ;;
32946  *) # Relative name.
32947    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32948    ac_top_srcdir=$ac_top_build_prefix$srcdir
32949    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32950esac
32951ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32952
32953
32954  case $ac_mode in
32955  :F)
32956  #
32957  # CONFIG_FILE
32958  #
32959
32960_ACEOF
32961
32962cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32963# If the template does not know about datarootdir, expand it.
32964# FIXME: This hack should be removed a few years after 2.60.
32965ac_datarootdir_hack=; ac_datarootdir_seen=
32966ac_sed_dataroot='
32967/datarootdir/ {
32968  p
32969  q
32970}
32971/@datadir@/p
32972/@docdir@/p
32973/@infodir@/p
32974/@localedir@/p
32975/@mandir@/p'
32976case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32977*datarootdir*) ac_datarootdir_seen=yes;;
32978*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32979  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32980$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32981_ACEOF
32982cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32983  ac_datarootdir_hack='
32984  s&@datadir@&$datadir&g
32985  s&@docdir@&$docdir&g
32986  s&@infodir@&$infodir&g
32987  s&@localedir@&$localedir&g
32988  s&@mandir@&$mandir&g
32989  s&\\\${datarootdir}&$datarootdir&g' ;;
32990esac
32991_ACEOF
32992
32993# Neutralize VPATH when `$srcdir' = `.'.
32994# Shell code in configure.ac might set extrasub.
32995# FIXME: do we really want to maintain this feature?
32996cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32997ac_sed_extra="$ac_vpsub
32998$extrasub
32999_ACEOF
33000cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33001:t
33002/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33003s|@configure_input@|$ac_sed_conf_input|;t t
33004s&@top_builddir@&$ac_top_builddir_sub&;t t
33005s&@top_build_prefix@&$ac_top_build_prefix&;t t
33006s&@srcdir@&$ac_srcdir&;t t
33007s&@abs_srcdir@&$ac_abs_srcdir&;t t
33008s&@top_srcdir@&$ac_top_srcdir&;t t
33009s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33010s&@builddir@&$ac_builddir&;t t
33011s&@abs_builddir@&$ac_abs_builddir&;t t
33012s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33013$ac_datarootdir_hack
33014"
33015eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33016  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33017
33018test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33019  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33020  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
33021      "$ac_tmp/out"`; test -z "$ac_out"; } &&
33022  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33023which seems to be undefined.  Please make sure it is defined" >&5
33024$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33025which seems to be undefined.  Please make sure it is defined" >&2;}
33026
33027  rm -f "$ac_tmp/stdin"
33028  case $ac_file in
33029  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33030  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33031  esac \
33032  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33033 ;;
33034  :H)
33035  #
33036  # CONFIG_HEADER
33037  #
33038  if test x"$ac_file" != x-; then
33039    {
33040      $as_echo "/* $configure_input  */" \
33041      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33042    } >"$ac_tmp/config.h" \
33043      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33044    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33045      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33046$as_echo "$as_me: $ac_file is unchanged" >&6;}
33047    else
33048      rm -f "$ac_file"
33049      mv "$ac_tmp/config.h" "$ac_file" \
33050	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33051    fi
33052  else
33053    $as_echo "/* $configure_input  */" \
33054      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33055      || as_fn_error $? "could not create -" "$LINENO" 5
33056  fi
33057 ;;
33058
33059
33060  esac
33061
33062done # for ac_tag
33063
33064
33065as_fn_exit 0
33066_ACEOF
33067ac_clean_files=$ac_clean_files_save
33068
33069test $ac_write_fail = 0 ||
33070  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33071
33072
33073# configure is writing to config.log, and then calls config.status.
33074# config.status does its own redirection, appending to config.log.
33075# Unfortunately, on DOS this fails, as config.log is still kept open
33076# by configure, so config.status won't be able to write to it; its
33077# output is simply discarded.  So we exec the FD to /dev/null,
33078# effectively closing config.log, so it can be properly (re)opened and
33079# appended to by config.status.  When coming back to configure, we
33080# need to make the FD available again.
33081if test "$no_create" != yes; then
33082  ac_cs_success=:
33083  ac_config_status_args=
33084  test "$silent" = yes &&
33085    ac_config_status_args="$ac_config_status_args --quiet"
33086  exec 5>/dev/null
33087  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33088  exec 5>>config.log
33089  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33090  # would make configure fail if this is the last instruction.
33091  $ac_cs_success || as_fn_exit 1
33092fi
33093if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33094  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33095$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33096fi
33097
33098
33099# Make the compare script executable
33100$CHMOD +x $OUTPUT_ROOT/compare.sh
33101
33102# Finally output some useful information to the user
33103
33104# Finally output some useful information to the user
33105
33106if test "x$CCACHE_FOUND" != x; then
33107	if  test "x$HAS_GOOD_CCACHE" = x; then
33108		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33109		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33110	else
33111		CCACHE_STATUS="installed and in use"
33112	fi
33113else
33114	if test "x$GCC" = xyes; then
33115		CCACHE_STATUS="not installed (consider installing)"
33116		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33117	else
33118		CCACHE_STATUS="not available for your system"
33119	fi
33120fi
33121
33122printf "\n"
33123printf "====================================================\n"
33124printf "A new configuration has been successfully created in\n"
33125printf "$OUTPUT_ROOT\n"
33126if test "x$CONFIGURE_COMMAND_LINE" != x; then
33127	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33128else
33129	printf "using default settings.\n"
33130fi
33131
33132printf "\n"
33133printf "Configuration summary:\n"
33134printf "* Debug level:    $DEBUG_LEVEL\n"
33135printf "* JDK variant:    $JDK_VARIANT\n"
33136printf "* JVM variants:   $with_jvm_variants\n"
33137printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33138
33139printf "\n"
33140printf "Tools summary:\n"
33141if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33142  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33143fi
33144printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33145printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33146printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33147
33148printf "\n"
33149printf "Build performance summary:\n"
33150printf "* Cores to use:   $NUM_CORES\n"
33151printf "* Memory limit:   $MEMORY_SIZE MB\n"
33152printf "* ccache status:  $CCACHE_STATUS\n"
33153printf "\n"
33154
33155if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33156	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33157	printf "$CCACHE_HELP_MSG\n"
33158
33159    # Print a helpful message on how to acquire the necessary build dependency.
33160    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33161    MISSING_DEPENDENCY=ccache
33162    PKGHANDLER_COMMAND=
33163
33164    case $PKGHANDLER in
33165	apt-get)
33166                apt_help     $MISSING_DEPENDENCY ;;
33167    yum)
33168                yum_help     $MISSING_DEPENDENCY ;;
33169	port)
33170                port_help    $MISSING_DEPENDENCY ;;
33171	pkgutil)
33172                pkgutil_help $MISSING_DEPENDENCY ;;
33173	pkgadd)
33174                pkgadd_help  $MISSING_DEPENDENCY ;;
33175    * )
33176      break ;;
33177    esac
33178
33179    if test "x$PKGHANDLER_COMMAND" != x; then
33180        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33181    fi
33182
33183	printf "$HELP_MSG\n"
33184	printf "\n"
33185fi
33186
33187if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33188	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33189	printf "will result in longer build times.\n"
33190	printf "\n"
33191fi
33192
33193if test "x$FOUND_ALT_VARIABLES" != "x"; then
33194	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33195	printf "These are not respected, and will be ignored. It is recommended\n"
33196	printf "that you clean your environment. The following variables are set:\n"
33197	printf "$FOUND_ALT_VARIABLES\n"
33198	printf "\n"
33199fi
33200
33201if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33202	printf "WARNING: Your build output directory is not on a local disk.\n"
33203	printf "This will severely degrade build performance!\n"
33204	printf "It is recommended that you create an output directory on a local disk,\n"
33205	printf "and run the configure script again from that directory.\n"
33206	printf "\n"
33207fi
33208
33209if test "x$IS_RECONFIGURE" = "xyes"; then
33210	printf "WARNING: The result of this configuration has overridden an older\n"
33211	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33212	printf "proper build. Failure to do so might result in strange build problems.\n"
33213	printf "\n"
33214fi
33215
33216