generated-configure.sh revision 693:1dfcc874461e
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
612JOBS
613MEMORY_SIZE
614NUM_CORES
615ENABLE_INTREE_EC
616SALIB_NAME
617HOTSPOT_MAKE_ARGS
618FIXPATH
619LIBCXX
620LLVM_LIBS
621LLVM_LDFLAGS
622LLVM_CFLAGS
623LLVM_CONFIG
624LIBFFI_LIBS
625LIBFFI_CFLAGS
626STATIC_CXX_SETTING
627LIBDL
628LIBM
629LIBZIP_CAN_USE_MMAP
630USE_EXTERNAL_LIBZ
631USE_EXTERNAL_LIBGIF
632USE_EXTERNAL_LIBJPEG
633ALSA_LIBS
634ALSA_CFLAGS
635FREETYPE2_LIB_PATH
636USING_SYSTEM_FT_LIB
637FREETYPE2_LIBS
638FREETYPE2_CFLAGS
639CUPS_CFLAGS
640OPENWIN_HOME
641X_EXTRA_LIBS
642X_LIBS
643X_PRE_LIBS
644X_CFLAGS
645XMKMF
646CXXFLAGS_DEBUG_SYMBOLS
647CFLAGS_DEBUG_SYMBOLS
648ZIP_DEBUGINFO_FILES
649ENABLE_DEBUG_SYMBOLS
650LDFLAGS_CXX_JDK
651LDFLAGS_JDKEXE_SUFFIX
652LDFLAGS_JDKLIB_SUFFIX
653LDFLAGS_JDKEXE
654LDFLAGS_JDKLIB
655CXXFLAGS_JDKEXE
656CXXFLAGS_JDKLIB
657CFLAGS_JDKEXE
658CFLAGS_JDKLIB
659MACOSX_VERSION_MIN
660PACKAGE_PATH
661LEGACY_EXTRA_LDFLAGS
662LEGACY_EXTRA_CXXFLAGS
663LEGACY_EXTRA_CFLAGS
664CXX_FLAG_DEPS
665C_FLAG_DEPS
666CXX_O_FLAG_NONE
667CXX_O_FLAG_NORM
668CXX_O_FLAG_HI
669CXX_O_FLAG_HIGHEST
670C_O_FLAG_NONE
671C_O_FLAG_NORM
672C_O_FLAG_HI
673C_O_FLAG_HIGHEST
674POST_MCS_CMD
675POST_STRIP_CMD
676SET_EXECUTABLE_ORIGIN
677SET_SHARED_LIBRARY_ORIGIN
678CXX_FLAG_REORDER
679C_FLAG_REORDER
680SET_SHARED_LIBRARY_MAPFILE
681SET_SHARED_LIBRARY_NAME
682SHARED_LIBRARY_FLAGS
683EXE_SUFFIX
684STATIC_LIBRARY_SUFFIX
685SHARED_LIBRARY_SUFFIX
686LIBRARY_PREFIX
687STATIC_LIBRARY
688SHARED_LIBRARY
689OBJ_SUFFIX
690COMPILER_SUPPORTS_TARGET_BITS_FLAG
691LIPO
692ac_ct_OBJDUMP
693OBJDUMP
694ac_ct_OBJCOPY
695OBJCOPY
696MCS
697STRIP
698GNM
699NM
700AS
701CXXCPP
702CPP
703COMPILER_TYPE
704RC_FLAGS
705DUMPBIN
706WINAR
707HOTSPOT_RC
708HOTSPOT_MT
709RC
710MT
711WINLD
712HOTSPOT_LD
713HOTSPOT_CXX
714ARFLAGS
715AR
716LDEXECXX
717LDCXX
718LDEXE
719LD
720ac_ct_OBJC
721OBJCFLAGS
722OBJC
723ac_ct_PROPER_COMPILER_CXX
724PROPER_COMPILER_CXX
725POTENTIAL_CXX
726TOOLS_DIR_CXX
727ac_ct_PROPER_COMPILER_CC
728PROPER_COMPILER_CC
729POTENTIAL_CC
730TOOLS_DIR_CC
731BUILD_LD
732BUILD_CXX
733BUILD_CC
734MSVCR_DLL
735DXSDK_INCLUDE_PATH
736DXSDK_LIB_PATH
737VS_PATH
738VS_LIB
739VS_INCLUDE
740CYGWIN_LINK
741AR_OUT_OPTION
742LD_OUT_OPTION
743EXE_OUT_OPTION
744CC_OUT_OPTION
745BUILD_HOTSPOT
746HOTSPOT_DIST
747BUILD_OUTPUT
748OVERRIDE_SRC_ROOT
749ADD_SRC_ROOT
750JDK_TOPDIR
751NASHORN_TOPDIR
752HOTSPOT_TOPDIR
753JAXWS_TOPDIR
754JAXP_TOPDIR
755CORBA_TOPDIR
756LANGTOOLS_TOPDIR
757BOOT_JDK_JVMARGS
758JAVAC_FLAGS
759BOOT_JDK_SOURCETARGET
760BOOT_JDK
761BOOT_TOOLSJAR
762BOOT_RTJAR
763JAVA_CHECK
764JAVAC_CHECK
765COOKED_BUILD_NUMBER
766JDK_VERSION
767COPYRIGHT_YEAR
768MACOSX_BUNDLE_ID_BASE
769MACOSX_BUNDLE_NAME_BASE
770COMPANY_NAME
771JDK_RC_PLATFORM_NAME
772PRODUCT_SUFFIX
773PRODUCT_NAME
774LAUNCHER_NAME
775MILESTONE
776JDK_BUILD_NUMBER
777JDK_UPDATE_VERSION
778JDK_MICRO_VERSION
779JDK_MINOR_VERSION
780JDK_MAJOR_VERSION
781USER_RELEASE_SUFFIX
782COMPRESS_JARS
783UNLIMITED_CRYPTO
784CACERTS_FILE
785TEST_IN_BUILD
786BUILD_HEADLESS
787SUPPORT_HEADFUL
788SUPPORT_HEADLESS
789BDEPS_FTP
790BDEPS_UNZIP
791OS_VERSION_MICRO
792OS_VERSION_MINOR
793OS_VERSION_MAJOR
794PKG_CONFIG
795XATTR
796TIME
797STAT
798HG
799READELF
800OTOOL
801LDD
802ZIP
803UNZIP
804FIND_DELETE
805MAKE
806CHECK_TOOLSDIR_MAKE
807CHECK_TOOLSDIR_GMAKE
808CHECK_MAKE
809CHECK_GMAKE
810PKGHANDLER
811OUTPUT_ROOT
812CONF_NAME
813SPEC
814BUILD_VARIANT_RELEASE
815DEBUG_CLASSFILES
816FASTDEBUG
817VARIANT
818DEBUG_LEVEL
819MACOSX_UNIVERSAL
820INCLUDE_SA
821JVM_VARIANT_ZEROSHARK
822JVM_VARIANT_ZERO
823JVM_VARIANT_KERNEL
824JVM_VARIANT_MINIMAL1
825JVM_VARIANT_CLIENT
826JVM_VARIANT_SERVER
827JVM_VARIANTS
828JDK_VARIANT
829SET_OPENJDK
830BUILD_LOG_WRAPPER
831BUILD_LOG_PREVIOUS
832BUILD_LOG
833SYS_ROOT
834PATH_SEP
835SRC_ROOT
836ZERO_ARCHDEF
837ZERO_ARCHFLAG
838ac_ct_CXX
839CXXFLAGS
840CXX
841OBJEXT
842EXEEXT
843ac_ct_CC
844CPPFLAGS
845LDFLAGS
846CFLAGS
847CC
848DEFINE_CROSS_COMPILE_ARCH
849LP64
850OPENJDK_TARGET_OS_API_DIR
851OPENJDK_TARGET_CPU_JLI_CFLAGS
852OPENJDK_TARGET_CPU_OSARCH
853OPENJDK_TARGET_CPU_ISADIR
854OPENJDK_TARGET_CPU_LIBDIR
855OPENJDK_TARGET_CPU_LEGACY_LIB
856OPENJDK_TARGET_CPU_LEGACY
857REQUIRED_OS_VERSION
858REQUIRED_OS_NAME
859COMPILE_TYPE
860OPENJDK_TARGET_CPU_ENDIAN
861OPENJDK_TARGET_CPU_BITS
862OPENJDK_TARGET_CPU_ARCH
863OPENJDK_TARGET_CPU
864OPENJDK_TARGET_OS_API
865OPENJDK_TARGET_OS
866OPENJDK_BUILD_CPU_ENDIAN
867OPENJDK_BUILD_CPU_BITS
868OPENJDK_BUILD_CPU_ARCH
869OPENJDK_BUILD_CPU
870OPENJDK_BUILD_OS_API
871OPENJDK_BUILD_OS
872OPENJDK_BUILD_AUTOCONF_NAME
873OPENJDK_TARGET_AUTOCONF_NAME
874target_os
875target_vendor
876target_cpu
877target
878host_os
879host_vendor
880host_cpu
881host
882build_os
883build_vendor
884build_cpu
885build
886SETFILE
887DF
888READLINK
889CYGPATH
890NAWK
891SED
892FGREP
893EGREP
894GREP
895AWK
896XARGS
897WHICH
898WC
899UNIQ
900UNAME
901TR
902TOUCH
903TEE
904TAR
905TAIL
906SORT
907SH
908RM
909THEPWDCMD
910PRINTF
911MV
912MKTEMP
913MKDIR
914LS
915LN
916HEAD
917FIND
918FILE
919EXPR
920ECHO
921DIRNAME
922DIFF
923DATE
924CUT
925CPIO
926CP
927COMM
928CMP
929CHMOD
930CAT
931BASH
932BASENAME
933DATE_WHEN_CONFIGURED
934CONFIGURE_COMMAND_LINE
935CUSTOM_MAKE_DIR
936target_alias
937host_alias
938build_alias
939LIBS
940ECHO_T
941ECHO_N
942ECHO_C
943DEFS
944mandir
945localedir
946libdir
947psdir
948pdfdir
949dvidir
950htmldir
951infodir
952docdir
953oldincludedir
954includedir
955localstatedir
956sharedstatedir
957sysconfdir
958datadir
959datarootdir
960libexecdir
961sbindir
962bindir
963program_transform_name
964prefix
965exec_prefix
966PACKAGE_URL
967PACKAGE_BUGREPORT
968PACKAGE_STRING
969PACKAGE_VERSION
970PACKAGE_TARNAME
971PACKAGE_NAME
972PATH_SEPARATOR
973SHELL'
974ac_subst_files=''
975ac_user_opts='
976enable_option_checking
977with_custom_make_dir
978with_target_bits
979with_sys_root
980with_tools_dir
981with_devkit
982enable_openjdk_only
983with_jdk_variant
984with_jvm_variants
985enable_debug
986with_debug_level
987with_conf_name
988with_builddeps_conf
989with_builddeps_server
990with_builddeps_dir
991with_builddeps_group
992enable_headful
993enable_hotspot_test_in_build
994with_cacerts_file
995enable_unlimited_crypto
996with_milestone
997with_build_number
998with_user_release_suffix
999with_boot_jdk
1000with_boot_jdk_jvmargs
1001with_add_source_root
1002with_override_source_root
1003with_adds_and_overrides
1004with_override_langtools
1005with_override_corba
1006with_override_jaxp
1007with_override_jaxws
1008with_override_hotspot
1009with_override_jdk
1010with_import_hotspot
1011with_msvcr_dll
1012with_dxsdk
1013with_dxsdk_lib
1014with_dxsdk_include
1015with_extra_cflags
1016with_extra_cxxflags
1017with_extra_ldflags
1018enable_debug_symbols
1019enable_zip_debug_info
1020enable_macosx_runtime_support
1021with_x
1022with_cups
1023with_cups_include
1024with_freetype
1025with_alsa
1026with_alsa_include
1027with_alsa_lib
1028with_giflib
1029with_zlib
1030with_stdc__lib
1031with_num_cores
1032with_memory_size
1033with_jobs
1034with_sjavac_server_java
1035with_sjavac_server_cores
1036enable_sjavac
1037enable_precompiled_headers
1038enable_ccache
1039with_ccache_dir
1040'
1041      ac_precious_vars='build_alias
1042host_alias
1043target_alias
1044CC
1045CFLAGS
1046LDFLAGS
1047LIBS
1048CPPFLAGS
1049CXX
1050CXXFLAGS
1051CCC
1052PKG_CONFIG
1053OBJC
1054OBJCFLAGS
1055CPP
1056CXXCPP
1057XMKMF
1058FREETYPE2_CFLAGS
1059FREETYPE2_LIBS
1060ALSA_CFLAGS
1061ALSA_LIBS
1062LIBFFI_CFLAGS
1063LIBFFI_LIBS'
1064
1065
1066# Initialize some variables set by options.
1067ac_init_help=
1068ac_init_version=false
1069ac_unrecognized_opts=
1070ac_unrecognized_sep=
1071# The variables have the same names as the options, with
1072# dashes changed to underlines.
1073cache_file=/dev/null
1074exec_prefix=NONE
1075no_create=
1076no_recursion=
1077prefix=NONE
1078program_prefix=NONE
1079program_suffix=NONE
1080program_transform_name=s,x,x,
1081silent=
1082site=
1083srcdir=
1084verbose=
1085x_includes=NONE
1086x_libraries=NONE
1087
1088# Installation directory options.
1089# These are left unexpanded so users can "make install exec_prefix=/foo"
1090# and all the variables that are supposed to be based on exec_prefix
1091# by default will actually change.
1092# Use braces instead of parens because sh, perl, etc. also accept them.
1093# (The list follows the same order as the GNU Coding Standards.)
1094bindir='${exec_prefix}/bin'
1095sbindir='${exec_prefix}/sbin'
1096libexecdir='${exec_prefix}/libexec'
1097datarootdir='${prefix}/share'
1098datadir='${datarootdir}'
1099sysconfdir='${prefix}/etc'
1100sharedstatedir='${prefix}/com'
1101localstatedir='${prefix}/var'
1102includedir='${prefix}/include'
1103oldincludedir='/usr/include'
1104docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1105infodir='${datarootdir}/info'
1106htmldir='${docdir}'
1107dvidir='${docdir}'
1108pdfdir='${docdir}'
1109psdir='${docdir}'
1110libdir='${exec_prefix}/lib'
1111localedir='${datarootdir}/locale'
1112mandir='${datarootdir}/man'
1113
1114ac_prev=
1115ac_dashdash=
1116for ac_option
1117do
1118  # If the previous option needs an argument, assign it.
1119  if test -n "$ac_prev"; then
1120    eval $ac_prev=\$ac_option
1121    ac_prev=
1122    continue
1123  fi
1124
1125  case $ac_option in
1126  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1127  *=)   ac_optarg= ;;
1128  *)    ac_optarg=yes ;;
1129  esac
1130
1131  # Accept the important Cygnus configure options, so we can diagnose typos.
1132
1133  case $ac_dashdash$ac_option in
1134  --)
1135    ac_dashdash=yes ;;
1136
1137  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1138    ac_prev=bindir ;;
1139  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1140    bindir=$ac_optarg ;;
1141
1142  -build | --build | --buil | --bui | --bu)
1143    ac_prev=build_alias ;;
1144  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1145    build_alias=$ac_optarg ;;
1146
1147  -cache-file | --cache-file | --cache-fil | --cache-fi \
1148  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1149    ac_prev=cache_file ;;
1150  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1151  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1152    cache_file=$ac_optarg ;;
1153
1154  --config-cache | -C)
1155    cache_file=config.cache ;;
1156
1157  -datadir | --datadir | --datadi | --datad)
1158    ac_prev=datadir ;;
1159  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1160    datadir=$ac_optarg ;;
1161
1162  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1163  | --dataroo | --dataro | --datar)
1164    ac_prev=datarootdir ;;
1165  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1166  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1167    datarootdir=$ac_optarg ;;
1168
1169  -disable-* | --disable-*)
1170    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1171    # Reject names that are not valid shell variable names.
1172    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1173      as_fn_error $? "invalid feature name: $ac_useropt"
1174    ac_useropt_orig=$ac_useropt
1175    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176    case $ac_user_opts in
1177      *"
1178"enable_$ac_useropt"
1179"*) ;;
1180      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1181	 ac_unrecognized_sep=', ';;
1182    esac
1183    eval enable_$ac_useropt=no ;;
1184
1185  -docdir | --docdir | --docdi | --doc | --do)
1186    ac_prev=docdir ;;
1187  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1188    docdir=$ac_optarg ;;
1189
1190  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1191    ac_prev=dvidir ;;
1192  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1193    dvidir=$ac_optarg ;;
1194
1195  -enable-* | --enable-*)
1196    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1197    # Reject names that are not valid shell variable names.
1198    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199      as_fn_error $? "invalid feature name: $ac_useropt"
1200    ac_useropt_orig=$ac_useropt
1201    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202    case $ac_user_opts in
1203      *"
1204"enable_$ac_useropt"
1205"*) ;;
1206      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1207	 ac_unrecognized_sep=', ';;
1208    esac
1209    eval enable_$ac_useropt=\$ac_optarg ;;
1210
1211  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1212  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1213  | --exec | --exe | --ex)
1214    ac_prev=exec_prefix ;;
1215  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1216  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1217  | --exec=* | --exe=* | --ex=*)
1218    exec_prefix=$ac_optarg ;;
1219
1220  -gas | --gas | --ga | --g)
1221    # Obsolete; use --with-gas.
1222    with_gas=yes ;;
1223
1224  -help | --help | --hel | --he | -h)
1225    ac_init_help=long ;;
1226  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1227    ac_init_help=recursive ;;
1228  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1229    ac_init_help=short ;;
1230
1231  -host | --host | --hos | --ho)
1232    ac_prev=host_alias ;;
1233  -host=* | --host=* | --hos=* | --ho=*)
1234    host_alias=$ac_optarg ;;
1235
1236  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1237    ac_prev=htmldir ;;
1238  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1239  | --ht=*)
1240    htmldir=$ac_optarg ;;
1241
1242  -includedir | --includedir | --includedi | --included | --include \
1243  | --includ | --inclu | --incl | --inc)
1244    ac_prev=includedir ;;
1245  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1246  | --includ=* | --inclu=* | --incl=* | --inc=*)
1247    includedir=$ac_optarg ;;
1248
1249  -infodir | --infodir | --infodi | --infod | --info | --inf)
1250    ac_prev=infodir ;;
1251  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1252    infodir=$ac_optarg ;;
1253
1254  -libdir | --libdir | --libdi | --libd)
1255    ac_prev=libdir ;;
1256  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1257    libdir=$ac_optarg ;;
1258
1259  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1260  | --libexe | --libex | --libe)
1261    ac_prev=libexecdir ;;
1262  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1263  | --libexe=* | --libex=* | --libe=*)
1264    libexecdir=$ac_optarg ;;
1265
1266  -localedir | --localedir | --localedi | --localed | --locale)
1267    ac_prev=localedir ;;
1268  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1269    localedir=$ac_optarg ;;
1270
1271  -localstatedir | --localstatedir | --localstatedi | --localstated \
1272  | --localstate | --localstat | --localsta | --localst | --locals)
1273    ac_prev=localstatedir ;;
1274  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1275  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1276    localstatedir=$ac_optarg ;;
1277
1278  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1279    ac_prev=mandir ;;
1280  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1281    mandir=$ac_optarg ;;
1282
1283  -nfp | --nfp | --nf)
1284    # Obsolete; use --without-fp.
1285    with_fp=no ;;
1286
1287  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1288  | --no-cr | --no-c | -n)
1289    no_create=yes ;;
1290
1291  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1292  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1293    no_recursion=yes ;;
1294
1295  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1296  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1297  | --oldin | --oldi | --old | --ol | --o)
1298    ac_prev=oldincludedir ;;
1299  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1300  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1301  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1302    oldincludedir=$ac_optarg ;;
1303
1304  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1305    ac_prev=prefix ;;
1306  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1307    prefix=$ac_optarg ;;
1308
1309  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1310  | --program-pre | --program-pr | --program-p)
1311    ac_prev=program_prefix ;;
1312  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1313  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1314    program_prefix=$ac_optarg ;;
1315
1316  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1317  | --program-suf | --program-su | --program-s)
1318    ac_prev=program_suffix ;;
1319  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1320  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1321    program_suffix=$ac_optarg ;;
1322
1323  -program-transform-name | --program-transform-name \
1324  | --program-transform-nam | --program-transform-na \
1325  | --program-transform-n | --program-transform- \
1326  | --program-transform | --program-transfor \
1327  | --program-transfo | --program-transf \
1328  | --program-trans | --program-tran \
1329  | --progr-tra | --program-tr | --program-t)
1330    ac_prev=program_transform_name ;;
1331  -program-transform-name=* | --program-transform-name=* \
1332  | --program-transform-nam=* | --program-transform-na=* \
1333  | --program-transform-n=* | --program-transform-=* \
1334  | --program-transform=* | --program-transfor=* \
1335  | --program-transfo=* | --program-transf=* \
1336  | --program-trans=* | --program-tran=* \
1337  | --progr-tra=* | --program-tr=* | --program-t=*)
1338    program_transform_name=$ac_optarg ;;
1339
1340  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1341    ac_prev=pdfdir ;;
1342  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1343    pdfdir=$ac_optarg ;;
1344
1345  -psdir | --psdir | --psdi | --psd | --ps)
1346    ac_prev=psdir ;;
1347  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1348    psdir=$ac_optarg ;;
1349
1350  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1351  | -silent | --silent | --silen | --sile | --sil)
1352    silent=yes ;;
1353
1354  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1355    ac_prev=sbindir ;;
1356  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1357  | --sbi=* | --sb=*)
1358    sbindir=$ac_optarg ;;
1359
1360  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1361  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1362  | --sharedst | --shareds | --shared | --share | --shar \
1363  | --sha | --sh)
1364    ac_prev=sharedstatedir ;;
1365  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1366  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1367  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1368  | --sha=* | --sh=*)
1369    sharedstatedir=$ac_optarg ;;
1370
1371  -site | --site | --sit)
1372    ac_prev=site ;;
1373  -site=* | --site=* | --sit=*)
1374    site=$ac_optarg ;;
1375
1376  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1377    ac_prev=srcdir ;;
1378  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1379    srcdir=$ac_optarg ;;
1380
1381  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1382  | --syscon | --sysco | --sysc | --sys | --sy)
1383    ac_prev=sysconfdir ;;
1384  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1385  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1386    sysconfdir=$ac_optarg ;;
1387
1388  -target | --target | --targe | --targ | --tar | --ta | --t)
1389    ac_prev=target_alias ;;
1390  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1391    target_alias=$ac_optarg ;;
1392
1393  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1394    verbose=yes ;;
1395
1396  -version | --version | --versio | --versi | --vers | -V)
1397    ac_init_version=: ;;
1398
1399  -with-* | --with-*)
1400    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1401    # Reject names that are not valid shell variable names.
1402    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1403      as_fn_error $? "invalid package name: $ac_useropt"
1404    ac_useropt_orig=$ac_useropt
1405    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1406    case $ac_user_opts in
1407      *"
1408"with_$ac_useropt"
1409"*) ;;
1410      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1411	 ac_unrecognized_sep=', ';;
1412    esac
1413    eval with_$ac_useropt=\$ac_optarg ;;
1414
1415  -without-* | --without-*)
1416    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1417    # Reject names that are not valid shell variable names.
1418    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1419      as_fn_error $? "invalid package name: $ac_useropt"
1420    ac_useropt_orig=$ac_useropt
1421    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1422    case $ac_user_opts in
1423      *"
1424"with_$ac_useropt"
1425"*) ;;
1426      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1427	 ac_unrecognized_sep=', ';;
1428    esac
1429    eval with_$ac_useropt=no ;;
1430
1431  --x)
1432    # Obsolete; use --with-x.
1433    with_x=yes ;;
1434
1435  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1436  | --x-incl | --x-inc | --x-in | --x-i)
1437    ac_prev=x_includes ;;
1438  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1439  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1440    x_includes=$ac_optarg ;;
1441
1442  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1443  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1444    ac_prev=x_libraries ;;
1445  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1446  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1447    x_libraries=$ac_optarg ;;
1448
1449  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1450Try \`$0 --help' for more information"
1451    ;;
1452
1453  *=*)
1454    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1455    # Reject names that are not valid shell variable names.
1456    case $ac_envvar in #(
1457      '' | [0-9]* | *[!_$as_cr_alnum]* )
1458      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1459    esac
1460    eval $ac_envvar=\$ac_optarg
1461    export $ac_envvar ;;
1462
1463  *)
1464    # FIXME: should be removed in autoconf 3.0.
1465    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1466    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1467      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1468    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1469    ;;
1470
1471  esac
1472done
1473
1474if test -n "$ac_prev"; then
1475  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1476  as_fn_error $? "missing argument to $ac_option"
1477fi
1478
1479if test -n "$ac_unrecognized_opts"; then
1480  case $enable_option_checking in
1481    no) ;;
1482    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1483    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1484  esac
1485fi
1486
1487# Check all directory arguments for consistency.
1488for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1489		datadir sysconfdir sharedstatedir localstatedir includedir \
1490		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1491		libdir localedir mandir
1492do
1493  eval ac_val=\$$ac_var
1494  # Remove trailing slashes.
1495  case $ac_val in
1496    */ )
1497      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1498      eval $ac_var=\$ac_val;;
1499  esac
1500  # Be sure to have absolute directory names.
1501  case $ac_val in
1502    [\\/$]* | ?:[\\/]* )  continue;;
1503    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1504  esac
1505  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1506done
1507
1508# There might be people who depend on the old broken behavior: `$host'
1509# used to hold the argument of --host etc.
1510# FIXME: To remove some day.
1511build=$build_alias
1512host=$host_alias
1513target=$target_alias
1514
1515# FIXME: To remove some day.
1516if test "x$host_alias" != x; then
1517  if test "x$build_alias" = x; then
1518    cross_compiling=maybe
1519    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1520    If a cross compiler is detected then cross compile mode will be used" >&2
1521  elif test "x$build_alias" != "x$host_alias"; then
1522    cross_compiling=yes
1523  fi
1524fi
1525
1526ac_tool_prefix=
1527test -n "$host_alias" && ac_tool_prefix=$host_alias-
1528
1529test "$silent" = yes && exec 6>/dev/null
1530
1531
1532ac_pwd=`pwd` && test -n "$ac_pwd" &&
1533ac_ls_di=`ls -di .` &&
1534ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1535  as_fn_error $? "working directory cannot be determined"
1536test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1537  as_fn_error $? "pwd does not report name of working directory"
1538
1539
1540# Find the source files, if location was not specified.
1541if test -z "$srcdir"; then
1542  ac_srcdir_defaulted=yes
1543  # Try the directory containing this script, then the parent directory.
1544  ac_confdir=`$as_dirname -- "$as_myself" ||
1545$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1546	 X"$as_myself" : 'X\(//\)[^/]' \| \
1547	 X"$as_myself" : 'X\(//\)$' \| \
1548	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1549$as_echo X"$as_myself" |
1550    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1551	    s//\1/
1552	    q
1553	  }
1554	  /^X\(\/\/\)[^/].*/{
1555	    s//\1/
1556	    q
1557	  }
1558	  /^X\(\/\/\)$/{
1559	    s//\1/
1560	    q
1561	  }
1562	  /^X\(\/\).*/{
1563	    s//\1/
1564	    q
1565	  }
1566	  s/.*/./; q'`
1567  srcdir=$ac_confdir
1568  if test ! -r "$srcdir/$ac_unique_file"; then
1569    srcdir=..
1570  fi
1571else
1572  ac_srcdir_defaulted=no
1573fi
1574if test ! -r "$srcdir/$ac_unique_file"; then
1575  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1576  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1577fi
1578ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1579ac_abs_confdir=`(
1580	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1581	pwd)`
1582# When building in place, set srcdir=.
1583if test "$ac_abs_confdir" = "$ac_pwd"; then
1584  srcdir=.
1585fi
1586# Remove unnecessary trailing slashes from srcdir.
1587# Double slashes in file names in object file debugging info
1588# mess up M-x gdb in Emacs.
1589case $srcdir in
1590*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1591esac
1592for ac_var in $ac_precious_vars; do
1593  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1594  eval ac_env_${ac_var}_value=\$${ac_var}
1595  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1596  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1597done
1598
1599#
1600# Report the --help message.
1601#
1602if test "$ac_init_help" = "long"; then
1603  # Omit some internal or obsolete options to make the list less imposing.
1604  # This message is too long to be a string in the A/UX 3.1 sh.
1605  cat <<_ACEOF
1606\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1607
1608Usage: $0 [OPTION]... [VAR=VALUE]...
1609
1610To assign environment variables (e.g., CC, CFLAGS...), specify them as
1611VAR=VALUE.  See below for descriptions of some of the useful variables.
1612
1613Defaults for the options are specified in brackets.
1614
1615Configuration:
1616  -h, --help              display this help and exit
1617      --help=short        display options specific to this package
1618      --help=recursive    display the short help of all the included packages
1619  -V, --version           display version information and exit
1620  -q, --quiet, --silent   do not print \`checking ...' messages
1621      --cache-file=FILE   cache test results in FILE [disabled]
1622  -C, --config-cache      alias for \`--cache-file=config.cache'
1623  -n, --no-create         do not create output files
1624      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1625
1626Installation directories:
1627  --prefix=PREFIX         install architecture-independent files in PREFIX
1628                          [$ac_default_prefix]
1629  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1630                          [PREFIX]
1631
1632By default, \`make install' will install all the files in
1633\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1634an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1635for instance \`--prefix=\$HOME'.
1636
1637For better control, use the options below.
1638
1639Fine tuning of the installation directories:
1640  --bindir=DIR            user executables [EPREFIX/bin]
1641  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1642  --libexecdir=DIR        program executables [EPREFIX/libexec]
1643  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1644  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1645  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1646  --libdir=DIR            object code libraries [EPREFIX/lib]
1647  --includedir=DIR        C header files [PREFIX/include]
1648  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1649  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1650  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1651  --infodir=DIR           info documentation [DATAROOTDIR/info]
1652  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1653  --mandir=DIR            man documentation [DATAROOTDIR/man]
1654  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1655  --htmldir=DIR           html documentation [DOCDIR]
1656  --dvidir=DIR            dvi documentation [DOCDIR]
1657  --pdfdir=DIR            pdf documentation [DOCDIR]
1658  --psdir=DIR             ps documentation [DOCDIR]
1659_ACEOF
1660
1661  cat <<\_ACEOF
1662
1663X features:
1664  --x-includes=DIR    X include files are in DIR
1665  --x-libraries=DIR   X library files are in DIR
1666
1667System types:
1668  --build=BUILD     configure for building on BUILD [guessed]
1669  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1670  --target=TARGET   configure for building compilers for TARGET [HOST]
1671_ACEOF
1672fi
1673
1674if test -n "$ac_init_help"; then
1675  case $ac_init_help in
1676     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1677   esac
1678  cat <<\_ACEOF
1679
1680Optional Features:
1681  --disable-option-checking  ignore unrecognized --enable/--with options
1682  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1683  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1684  --enable-openjdk-only   suppress building custom source even if present
1685                          [disabled]
1686  --enable-debug          set the debug level to fastdebug (shorthand for
1687                          --with-debug-level=fastdebug) [disabled]
1688  --disable-headful       disable building headful support (graphical UI
1689                          support) [enabled]
1690  --enable-hotspot-test-in-build
1691                          run the Queens test after Hotspot build [disabled]
1692  --enable-unlimited-crypto
1693                          Enable unlimited crypto policy [disabled]
1694  --disable-debug-symbols disable generation of debug symbols [enabled]
1695  --disable-zip-debug-info
1696                          disable zipping of debug-info files [enabled]
1697  --disable-macosx-runtime-support
1698                          disable the use of MacOSX Java runtime support
1699                          framework [enabled]
1700  --enable-sjavac         use sjavac to do fast incremental compiles
1701                          [disabled]
1702  --disable-precompiled-headers
1703                          disable using precompiled headers when compiling C++
1704                          [enabled]
1705  --disable-ccache        disable using ccache to speed up recompilations
1706                          [enabled]
1707
1708Optional Packages:
1709  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1710  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1711  --with-custom-make-dir  use this directory for custom build/make files
1712  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1713                          support it), e.g. --with-target-bits=32 [guessed]
1714  --with-sys-root         pass this sys-root to the compilers and tools (for
1715                          cross-compiling)
1716  --with-tools-dir        search this directory for compilers and tools (for
1717                          cross-compiling)
1718  --with-devkit           use this directory as base for tools-dir and
1719                          sys-root (for cross-compiling)
1720  --with-jdk-variant      JDK variant to build (normal) [normal]
1721  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1722                          client, minimal1, kernel, zero, zeroshark) [server]
1723  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1724                          [release]
1725  --with-conf-name        use this as the name of the configuration [generated
1726                          from important configuration options]
1727  --with-builddeps-conf   use this configuration file for the builddeps
1728  --with-builddeps-server download and use build dependencies from this server
1729                          url
1730  --with-builddeps-dir    store downloaded build dependencies here
1731                          [/localhome/builddeps]
1732  --with-builddeps-group  chgrp the downloaded build dependencies to this
1733                          group
1734  --with-cacerts-file     specify alternative cacerts file
1735  --with-milestone        Set milestone value for build [internal]
1736  --with-build-number     Set build number value for build [b00]
1737  --with-user-release-suffix
1738                          Add a custom string to the version string if build
1739                          number isn't set.[username_builddateb00]
1740  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1741  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1742                          invocations of the Boot JDK, overriding the default
1743                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1744                          -enableassertions"
1745  --with-add-source-root  for each and every source directory, look in this
1746                          additional source root for the same directory; if it
1747                          exists and have files in it, include it in the build
1748  --with-override-source-root
1749                          for each and every source directory, look in this
1750                          override source root for the same directory; if it
1751                          exists, use that directory instead and ignore the
1752                          directory in the original source root
1753  --with-adds-and-overrides
1754                          use the subdirs 'adds' and 'overrides' in the
1755                          specified directory as add-source-root and
1756                          override-source-root
1757  --with-override-langtools
1758                          use this langtools dir for the build
1759  --with-override-corba   use this corba dir for the build
1760  --with-override-jaxp    use this jaxp dir for the build
1761  --with-override-jaxws   use this jaxws dir for the build
1762  --with-override-hotspot use this hotspot dir for the build
1763  --with-override-jdk     use this jdk dir for the build
1764  --with-import-hotspot   import hotspot binaries from this jdk image or
1765                          hotspot build dist dir instead of building from
1766                          source
1767  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1768                          only) [probed]
1769  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1770  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1771                          [probed]
1772  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1773                          [probed]
1774  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1775  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1776  --with-extra-ldflags    extra flags to be used when linking jdk
1777  --with-x                use the X Window System
1778  --with-cups             specify prefix directory for the cups package
1779                          (expecting the headers under PATH/include)
1780  --with-cups-include     specify directory for the cups include files
1781  --with-freetype         specify prefix directory for the freetype2 package
1782                          (expecting the libraries under PATH/lib and the
1783                          headers under PATH/include)
1784  --with-alsa             specify prefix directory for the alsa package
1785                          (expecting the libraries under PATH/lib and the
1786                          headers under PATH/include)
1787  --with-alsa-include     specify directory for the alsa include files
1788  --with-alsa-lib         specify directory for the alsa library
1789  --with-giflib           use giflib from build system or OpenJDK source
1790                          (system, bundled) [bundled]
1791  --with-zlib             use zlib from build system or OpenJDK source
1792                          (system, bundled) [bundled]
1793  --with-stdc++lib=<static>,<dynamic>,<default>
1794                          force linking of the C++ runtime on Linux to either
1795                          static or dynamic, default is static with dynamic as
1796                          fallback
1797  --with-num-cores        number of cores in the build system, e.g.
1798                          --with-num-cores=8 [probed]
1799  --with-memory-size      memory (in MB) available in the build system, e.g.
1800                          --with-memory-size=1024 [probed]
1801  --with-jobs             number of parallel jobs to let make run [calculated
1802                          based on cores and memory]
1803  --with-sjavac-server-java
1804                          use this java binary for running the sjavac
1805                          background server [Boot JDK java]
1806  --with-sjavac-server-cores
1807                          use at most this number of concurrent threads on the
1808                          sjavac server [probed]
1809  --with-ccache-dir       where to store ccache files [~/.ccache]
1810
1811Some influential environment variables:
1812  CC          C compiler command
1813  CFLAGS      C compiler flags
1814  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1815              nonstandard directory <lib dir>
1816  LIBS        libraries to pass to the linker, e.g. -l<library>
1817  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1818              you have headers in a nonstandard directory <include dir>
1819  CXX         C++ compiler command
1820  CXXFLAGS    C++ compiler flags
1821  PKG_CONFIG  path to pkg-config utility
1822  OBJC        Objective C compiler command
1823  OBJCFLAGS   Objective C compiler flags
1824  CPP         C preprocessor
1825  CXXCPP      C++ preprocessor
1826  XMKMF       Path to xmkmf, Makefile generator for X Window System
1827  FREETYPE2_CFLAGS
1828              C compiler flags for FREETYPE2, overriding pkg-config
1829  FREETYPE2_LIBS
1830              linker flags for FREETYPE2, overriding pkg-config
1831  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1832  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1833  LIBFFI_CFLAGS
1834              C compiler flags for LIBFFI, overriding pkg-config
1835  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1836
1837Use these variables to override the choices made by `configure' or to help
1838it to find libraries and programs with nonstandard names/locations.
1839
1840Report bugs to <build-dev@openjdk.java.net>.
1841OpenJDK home page: <http://openjdk.java.net>.
1842_ACEOF
1843ac_status=$?
1844fi
1845
1846if test "$ac_init_help" = "recursive"; then
1847  # If there are subdirs, report their specific --help.
1848  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1849    test -d "$ac_dir" ||
1850      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1851      continue
1852    ac_builddir=.
1853
1854case "$ac_dir" in
1855.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1856*)
1857  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1858  # A ".." for each directory in $ac_dir_suffix.
1859  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1860  case $ac_top_builddir_sub in
1861  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1862  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1863  esac ;;
1864esac
1865ac_abs_top_builddir=$ac_pwd
1866ac_abs_builddir=$ac_pwd$ac_dir_suffix
1867# for backward compatibility:
1868ac_top_builddir=$ac_top_build_prefix
1869
1870case $srcdir in
1871  .)  # We are building in place.
1872    ac_srcdir=.
1873    ac_top_srcdir=$ac_top_builddir_sub
1874    ac_abs_top_srcdir=$ac_pwd ;;
1875  [\\/]* | ?:[\\/]* )  # Absolute name.
1876    ac_srcdir=$srcdir$ac_dir_suffix;
1877    ac_top_srcdir=$srcdir
1878    ac_abs_top_srcdir=$srcdir ;;
1879  *) # Relative name.
1880    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1881    ac_top_srcdir=$ac_top_build_prefix$srcdir
1882    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1883esac
1884ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1885
1886    cd "$ac_dir" || { ac_status=$?; continue; }
1887    # Check for guested configure.
1888    if test -f "$ac_srcdir/configure.gnu"; then
1889      echo &&
1890      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1891    elif test -f "$ac_srcdir/configure"; then
1892      echo &&
1893      $SHELL "$ac_srcdir/configure" --help=recursive
1894    else
1895      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1896    fi || ac_status=$?
1897    cd "$ac_pwd" || { ac_status=$?; break; }
1898  done
1899fi
1900
1901test -n "$ac_init_help" && exit $ac_status
1902if $ac_init_version; then
1903  cat <<\_ACEOF
1904OpenJDK configure jdk8
1905generated by GNU Autoconf 2.68
1906
1907Copyright (C) 2010 Free Software Foundation, Inc.
1908This configure script is free software; the Free Software Foundation
1909gives unlimited permission to copy, distribute and modify it.
1910_ACEOF
1911  exit
1912fi
1913
1914## ------------------------ ##
1915## Autoconf initialization. ##
1916## ------------------------ ##
1917
1918# ac_fn_c_try_compile LINENO
1919# --------------------------
1920# Try to compile conftest.$ac_ext, and return whether this succeeded.
1921ac_fn_c_try_compile ()
1922{
1923  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1924  rm -f conftest.$ac_objext
1925  if { { ac_try="$ac_compile"
1926case "(($ac_try" in
1927  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1928  *) ac_try_echo=$ac_try;;
1929esac
1930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1931$as_echo "$ac_try_echo"; } >&5
1932  (eval "$ac_compile") 2>conftest.err
1933  ac_status=$?
1934  if test -s conftest.err; then
1935    grep -v '^ *+' conftest.err >conftest.er1
1936    cat conftest.er1 >&5
1937    mv -f conftest.er1 conftest.err
1938  fi
1939  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1940  test $ac_status = 0; } && {
1941	 test -z "$ac_c_werror_flag" ||
1942	 test ! -s conftest.err
1943       } && test -s conftest.$ac_objext; then :
1944  ac_retval=0
1945else
1946  $as_echo "$as_me: failed program was:" >&5
1947sed 's/^/| /' conftest.$ac_ext >&5
1948
1949	ac_retval=1
1950fi
1951  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1952  as_fn_set_status $ac_retval
1953
1954} # ac_fn_c_try_compile
1955
1956# ac_fn_cxx_try_compile LINENO
1957# ----------------------------
1958# Try to compile conftest.$ac_ext, and return whether this succeeded.
1959ac_fn_cxx_try_compile ()
1960{
1961  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1962  rm -f conftest.$ac_objext
1963  if { { ac_try="$ac_compile"
1964case "(($ac_try" in
1965  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1966  *) ac_try_echo=$ac_try;;
1967esac
1968eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1969$as_echo "$ac_try_echo"; } >&5
1970  (eval "$ac_compile") 2>conftest.err
1971  ac_status=$?
1972  if test -s conftest.err; then
1973    grep -v '^ *+' conftest.err >conftest.er1
1974    cat conftest.er1 >&5
1975    mv -f conftest.er1 conftest.err
1976  fi
1977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1978  test $ac_status = 0; } && {
1979	 test -z "$ac_cxx_werror_flag" ||
1980	 test ! -s conftest.err
1981       } && test -s conftest.$ac_objext; then :
1982  ac_retval=0
1983else
1984  $as_echo "$as_me: failed program was:" >&5
1985sed 's/^/| /' conftest.$ac_ext >&5
1986
1987	ac_retval=1
1988fi
1989  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1990  as_fn_set_status $ac_retval
1991
1992} # ac_fn_cxx_try_compile
1993
1994# ac_fn_objc_try_compile LINENO
1995# -----------------------------
1996# Try to compile conftest.$ac_ext, and return whether this succeeded.
1997ac_fn_objc_try_compile ()
1998{
1999  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000  rm -f conftest.$ac_objext
2001  if { { ac_try="$ac_compile"
2002case "(($ac_try" in
2003  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2004  *) ac_try_echo=$ac_try;;
2005esac
2006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2007$as_echo "$ac_try_echo"; } >&5
2008  (eval "$ac_compile") 2>conftest.err
2009  ac_status=$?
2010  if test -s conftest.err; then
2011    grep -v '^ *+' conftest.err >conftest.er1
2012    cat conftest.er1 >&5
2013    mv -f conftest.er1 conftest.err
2014  fi
2015  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2016  test $ac_status = 0; } && {
2017	 test -z "$ac_objc_werror_flag" ||
2018	 test ! -s conftest.err
2019       } && test -s conftest.$ac_objext; then :
2020  ac_retval=0
2021else
2022  $as_echo "$as_me: failed program was:" >&5
2023sed 's/^/| /' conftest.$ac_ext >&5
2024
2025	ac_retval=1
2026fi
2027  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2028  as_fn_set_status $ac_retval
2029
2030} # ac_fn_objc_try_compile
2031
2032# ac_fn_c_try_cpp LINENO
2033# ----------------------
2034# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2035ac_fn_c_try_cpp ()
2036{
2037  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2038  if { { ac_try="$ac_cpp conftest.$ac_ext"
2039case "(($ac_try" in
2040  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2041  *) ac_try_echo=$ac_try;;
2042esac
2043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2044$as_echo "$ac_try_echo"; } >&5
2045  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2046  ac_status=$?
2047  if test -s conftest.err; then
2048    grep -v '^ *+' conftest.err >conftest.er1
2049    cat conftest.er1 >&5
2050    mv -f conftest.er1 conftest.err
2051  fi
2052  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2053  test $ac_status = 0; } > conftest.i && {
2054	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2055	 test ! -s conftest.err
2056       }; then :
2057  ac_retval=0
2058else
2059  $as_echo "$as_me: failed program was:" >&5
2060sed 's/^/| /' conftest.$ac_ext >&5
2061
2062    ac_retval=1
2063fi
2064  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2065  as_fn_set_status $ac_retval
2066
2067} # ac_fn_c_try_cpp
2068
2069# ac_fn_cxx_try_cpp LINENO
2070# ------------------------
2071# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2072ac_fn_cxx_try_cpp ()
2073{
2074  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2075  if { { ac_try="$ac_cpp conftest.$ac_ext"
2076case "(($ac_try" in
2077  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2078  *) ac_try_echo=$ac_try;;
2079esac
2080eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2081$as_echo "$ac_try_echo"; } >&5
2082  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2083  ac_status=$?
2084  if test -s conftest.err; then
2085    grep -v '^ *+' conftest.err >conftest.er1
2086    cat conftest.er1 >&5
2087    mv -f conftest.er1 conftest.err
2088  fi
2089  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2090  test $ac_status = 0; } > conftest.i && {
2091	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2092	 test ! -s conftest.err
2093       }; then :
2094  ac_retval=0
2095else
2096  $as_echo "$as_me: failed program was:" >&5
2097sed 's/^/| /' conftest.$ac_ext >&5
2098
2099    ac_retval=1
2100fi
2101  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2102  as_fn_set_status $ac_retval
2103
2104} # ac_fn_cxx_try_cpp
2105
2106# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2107# ---------------------------------------------------------
2108# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2109# the include files in INCLUDES and setting the cache variable VAR
2110# accordingly.
2111ac_fn_cxx_check_header_mongrel ()
2112{
2113  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2114  if eval \${$3+:} false; then :
2115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2116$as_echo_n "checking for $2... " >&6; }
2117if eval \${$3+:} false; then :
2118  $as_echo_n "(cached) " >&6
2119fi
2120eval ac_res=\$$3
2121	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2122$as_echo "$ac_res" >&6; }
2123else
2124  # Is the header compilable?
2125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2126$as_echo_n "checking $2 usability... " >&6; }
2127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h.  */
2129$4
2130#include <$2>
2131_ACEOF
2132if ac_fn_cxx_try_compile "$LINENO"; then :
2133  ac_header_compiler=yes
2134else
2135  ac_header_compiler=no
2136fi
2137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2139$as_echo "$ac_header_compiler" >&6; }
2140
2141# Is the header present?
2142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2143$as_echo_n "checking $2 presence... " >&6; }
2144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2145/* end confdefs.h.  */
2146#include <$2>
2147_ACEOF
2148if ac_fn_cxx_try_cpp "$LINENO"; then :
2149  ac_header_preproc=yes
2150else
2151  ac_header_preproc=no
2152fi
2153rm -f conftest.err conftest.i conftest.$ac_ext
2154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2155$as_echo "$ac_header_preproc" >&6; }
2156
2157# So?  What about this header?
2158case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2159  yes:no: )
2160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2161$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2163$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2164    ;;
2165  no:yes:* )
2166    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2167$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2168    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2169$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2170    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2171$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2172    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2173$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2174    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2175$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2176( $as_echo "## ----------------------------------------- ##
2177## Report this to build-dev@openjdk.java.net ##
2178## ----------------------------------------- ##"
2179     ) | sed "s/^/$as_me: WARNING:     /" >&2
2180    ;;
2181esac
2182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2183$as_echo_n "checking for $2... " >&6; }
2184if eval \${$3+:} false; then :
2185  $as_echo_n "(cached) " >&6
2186else
2187  eval "$3=\$ac_header_compiler"
2188fi
2189eval ac_res=\$$3
2190	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2191$as_echo "$ac_res" >&6; }
2192fi
2193  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2194
2195} # ac_fn_cxx_check_header_mongrel
2196
2197# ac_fn_cxx_try_run LINENO
2198# ------------------------
2199# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2200# that executables *can* be run.
2201ac_fn_cxx_try_run ()
2202{
2203  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2204  if { { ac_try="$ac_link"
2205case "(($ac_try" in
2206  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2207  *) ac_try_echo=$ac_try;;
2208esac
2209eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2210$as_echo "$ac_try_echo"; } >&5
2211  (eval "$ac_link") 2>&5
2212  ac_status=$?
2213  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2214  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2215  { { case "(($ac_try" in
2216  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2217  *) ac_try_echo=$ac_try;;
2218esac
2219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2220$as_echo "$ac_try_echo"; } >&5
2221  (eval "$ac_try") 2>&5
2222  ac_status=$?
2223  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2224  test $ac_status = 0; }; }; then :
2225  ac_retval=0
2226else
2227  $as_echo "$as_me: program exited with status $ac_status" >&5
2228       $as_echo "$as_me: failed program was:" >&5
2229sed 's/^/| /' conftest.$ac_ext >&5
2230
2231       ac_retval=$ac_status
2232fi
2233  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2234  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2235  as_fn_set_status $ac_retval
2236
2237} # ac_fn_cxx_try_run
2238
2239# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2240# ---------------------------------------------------------
2241# Tests whether HEADER exists and can be compiled using the include files in
2242# INCLUDES, setting the cache variable VAR accordingly.
2243ac_fn_cxx_check_header_compile ()
2244{
2245  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2247$as_echo_n "checking for $2... " >&6; }
2248if eval \${$3+:} false; then :
2249  $as_echo_n "(cached) " >&6
2250else
2251  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h.  */
2253$4
2254#include <$2>
2255_ACEOF
2256if ac_fn_cxx_try_compile "$LINENO"; then :
2257  eval "$3=yes"
2258else
2259  eval "$3=no"
2260fi
2261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2262fi
2263eval ac_res=\$$3
2264	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2265$as_echo "$ac_res" >&6; }
2266  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2267
2268} # ac_fn_cxx_check_header_compile
2269
2270# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2271# ----------------------------------------------
2272# Tries to find the compile-time value of EXPR in a program that includes
2273# INCLUDES, setting VAR accordingly. Returns whether the value could be
2274# computed
2275ac_fn_cxx_compute_int ()
2276{
2277  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278  if test "$cross_compiling" = yes; then
2279    # Depending upon the size, compute the lo and hi bounds.
2280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281/* end confdefs.h.  */
2282$4
2283int
2284main ()
2285{
2286static int test_array [1 - 2 * !(($2) >= 0)];
2287test_array [0] = 0
2288
2289  ;
2290  return 0;
2291}
2292_ACEOF
2293if ac_fn_cxx_try_compile "$LINENO"; then :
2294  ac_lo=0 ac_mid=0
2295  while :; do
2296    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h.  */
2298$4
2299int
2300main ()
2301{
2302static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2303test_array [0] = 0
2304
2305  ;
2306  return 0;
2307}
2308_ACEOF
2309if ac_fn_cxx_try_compile "$LINENO"; then :
2310  ac_hi=$ac_mid; break
2311else
2312  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2313			if test $ac_lo -le $ac_mid; then
2314			  ac_lo= ac_hi=
2315			  break
2316			fi
2317			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320  done
2321else
2322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h.  */
2324$4
2325int
2326main ()
2327{
2328static int test_array [1 - 2 * !(($2) < 0)];
2329test_array [0] = 0
2330
2331  ;
2332  return 0;
2333}
2334_ACEOF
2335if ac_fn_cxx_try_compile "$LINENO"; then :
2336  ac_hi=-1 ac_mid=-1
2337  while :; do
2338    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2339/* end confdefs.h.  */
2340$4
2341int
2342main ()
2343{
2344static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2345test_array [0] = 0
2346
2347  ;
2348  return 0;
2349}
2350_ACEOF
2351if ac_fn_cxx_try_compile "$LINENO"; then :
2352  ac_lo=$ac_mid; break
2353else
2354  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2355			if test $ac_mid -le $ac_hi; then
2356			  ac_lo= ac_hi=
2357			  break
2358			fi
2359			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2360fi
2361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362  done
2363else
2364  ac_lo= ac_hi=
2365fi
2366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2367fi
2368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2369# Binary search between lo and hi bounds.
2370while test "x$ac_lo" != "x$ac_hi"; do
2371  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h.  */
2374$4
2375int
2376main ()
2377{
2378static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2379test_array [0] = 0
2380
2381  ;
2382  return 0;
2383}
2384_ACEOF
2385if ac_fn_cxx_try_compile "$LINENO"; then :
2386  ac_hi=$ac_mid
2387else
2388  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2389fi
2390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2391done
2392case $ac_lo in #((
2393?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2394'') ac_retval=1 ;;
2395esac
2396  else
2397    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2398/* end confdefs.h.  */
2399$4
2400static long int longval () { return $2; }
2401static unsigned long int ulongval () { return $2; }
2402#include <stdio.h>
2403#include <stdlib.h>
2404int
2405main ()
2406{
2407
2408  FILE *f = fopen ("conftest.val", "w");
2409  if (! f)
2410    return 1;
2411  if (($2) < 0)
2412    {
2413      long int i = longval ();
2414      if (i != ($2))
2415	return 1;
2416      fprintf (f, "%ld", i);
2417    }
2418  else
2419    {
2420      unsigned long int i = ulongval ();
2421      if (i != ($2))
2422	return 1;
2423      fprintf (f, "%lu", i);
2424    }
2425  /* Do not output a trailing newline, as this causes \r\n confusion
2426     on some platforms.  */
2427  return ferror (f) || fclose (f) != 0;
2428
2429  ;
2430  return 0;
2431}
2432_ACEOF
2433if ac_fn_cxx_try_run "$LINENO"; then :
2434  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2435else
2436  ac_retval=1
2437fi
2438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2439  conftest.$ac_objext conftest.beam conftest.$ac_ext
2440rm -f conftest.val
2441
2442  fi
2443  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2444  as_fn_set_status $ac_retval
2445
2446} # ac_fn_cxx_compute_int
2447
2448# ac_fn_cxx_try_link LINENO
2449# -------------------------
2450# Try to link conftest.$ac_ext, and return whether this succeeded.
2451ac_fn_cxx_try_link ()
2452{
2453  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2454  rm -f conftest.$ac_objext conftest$ac_exeext
2455  if { { ac_try="$ac_link"
2456case "(($ac_try" in
2457  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2458  *) ac_try_echo=$ac_try;;
2459esac
2460eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2461$as_echo "$ac_try_echo"; } >&5
2462  (eval "$ac_link") 2>conftest.err
2463  ac_status=$?
2464  if test -s conftest.err; then
2465    grep -v '^ *+' conftest.err >conftest.er1
2466    cat conftest.er1 >&5
2467    mv -f conftest.er1 conftest.err
2468  fi
2469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2470  test $ac_status = 0; } && {
2471	 test -z "$ac_cxx_werror_flag" ||
2472	 test ! -s conftest.err
2473       } && test -s conftest$ac_exeext && {
2474	 test "$cross_compiling" = yes ||
2475	 $as_test_x conftest$ac_exeext
2476       }; then :
2477  ac_retval=0
2478else
2479  $as_echo "$as_me: failed program was:" >&5
2480sed 's/^/| /' conftest.$ac_ext >&5
2481
2482	ac_retval=1
2483fi
2484  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2485  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2486  # interfere with the next link command; also delete a directory that is
2487  # left behind by Apple's compiler.  We do this before executing the actions.
2488  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2489  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2490  as_fn_set_status $ac_retval
2491
2492} # ac_fn_cxx_try_link
2493
2494# ac_fn_cxx_check_func LINENO FUNC VAR
2495# ------------------------------------
2496# Tests whether FUNC exists, setting the cache variable VAR accordingly
2497ac_fn_cxx_check_func ()
2498{
2499  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2501$as_echo_n "checking for $2... " >&6; }
2502if eval \${$3+:} false; then :
2503  $as_echo_n "(cached) " >&6
2504else
2505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2506/* end confdefs.h.  */
2507/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2508   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2509#define $2 innocuous_$2
2510
2511/* System header to define __stub macros and hopefully few prototypes,
2512    which can conflict with char $2 (); below.
2513    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2514    <limits.h> exists even on freestanding compilers.  */
2515
2516#ifdef __STDC__
2517# include <limits.h>
2518#else
2519# include <assert.h>
2520#endif
2521
2522#undef $2
2523
2524/* Override any GCC internal prototype to avoid an error.
2525   Use char because int might match the return type of a GCC
2526   builtin and then its argument prototype would still apply.  */
2527#ifdef __cplusplus
2528extern "C"
2529#endif
2530char $2 ();
2531/* The GNU C library defines this for functions which it implements
2532    to always fail with ENOSYS.  Some functions are actually named
2533    something starting with __ and the normal name is an alias.  */
2534#if defined __stub_$2 || defined __stub___$2
2535choke me
2536#endif
2537
2538int
2539main ()
2540{
2541return $2 ();
2542  ;
2543  return 0;
2544}
2545_ACEOF
2546if ac_fn_cxx_try_link "$LINENO"; then :
2547  eval "$3=yes"
2548else
2549  eval "$3=no"
2550fi
2551rm -f core conftest.err conftest.$ac_objext \
2552    conftest$ac_exeext conftest.$ac_ext
2553fi
2554eval ac_res=\$$3
2555	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2556$as_echo "$ac_res" >&6; }
2557  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2558
2559} # ac_fn_cxx_check_func
2560
2561# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2562# -------------------------------------------------------
2563# Tests whether HEADER exists and can be compiled using the include files in
2564# INCLUDES, setting the cache variable VAR accordingly.
2565ac_fn_c_check_header_compile ()
2566{
2567  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2568  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2569$as_echo_n "checking for $2... " >&6; }
2570if eval \${$3+:} false; then :
2571  $as_echo_n "(cached) " >&6
2572else
2573  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2574/* end confdefs.h.  */
2575$4
2576#include <$2>
2577_ACEOF
2578if ac_fn_c_try_compile "$LINENO"; then :
2579  eval "$3=yes"
2580else
2581  eval "$3=no"
2582fi
2583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2584fi
2585eval ac_res=\$$3
2586	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2587$as_echo "$ac_res" >&6; }
2588  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2589
2590} # ac_fn_c_check_header_compile
2591cat >config.log <<_ACEOF
2592This file contains any messages produced by compilers while
2593running configure, to aid debugging if configure makes a mistake.
2594
2595It was created by OpenJDK $as_me jdk8, which was
2596generated by GNU Autoconf 2.68.  Invocation command line was
2597
2598  $ $0 $@
2599
2600_ACEOF
2601exec 5>>config.log
2602{
2603cat <<_ASUNAME
2604## --------- ##
2605## Platform. ##
2606## --------- ##
2607
2608hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2609uname -m = `(uname -m) 2>/dev/null || echo unknown`
2610uname -r = `(uname -r) 2>/dev/null || echo unknown`
2611uname -s = `(uname -s) 2>/dev/null || echo unknown`
2612uname -v = `(uname -v) 2>/dev/null || echo unknown`
2613
2614/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2615/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2616
2617/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2618/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2619/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2620/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2621/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2622/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2623/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2624
2625_ASUNAME
2626
2627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2628for as_dir in $PATH
2629do
2630  IFS=$as_save_IFS
2631  test -z "$as_dir" && as_dir=.
2632    $as_echo "PATH: $as_dir"
2633  done
2634IFS=$as_save_IFS
2635
2636} >&5
2637
2638cat >&5 <<_ACEOF
2639
2640
2641## ----------- ##
2642## Core tests. ##
2643## ----------- ##
2644
2645_ACEOF
2646
2647
2648# Keep a trace of the command line.
2649# Strip out --no-create and --no-recursion so they do not pile up.
2650# Strip out --silent because we don't want to record it for future runs.
2651# Also quote any args containing shell meta-characters.
2652# Make two passes to allow for proper duplicate-argument suppression.
2653ac_configure_args=
2654ac_configure_args0=
2655ac_configure_args1=
2656ac_must_keep_next=false
2657for ac_pass in 1 2
2658do
2659  for ac_arg
2660  do
2661    case $ac_arg in
2662    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2663    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2664    | -silent | --silent | --silen | --sile | --sil)
2665      continue ;;
2666    *\'*)
2667      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2668    esac
2669    case $ac_pass in
2670    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2671    2)
2672      as_fn_append ac_configure_args1 " '$ac_arg'"
2673      if test $ac_must_keep_next = true; then
2674	ac_must_keep_next=false # Got value, back to normal.
2675      else
2676	case $ac_arg in
2677	  *=* | --config-cache | -C | -disable-* | --disable-* \
2678	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2679	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2680	  | -with-* | --with-* | -without-* | --without-* | --x)
2681	    case "$ac_configure_args0 " in
2682	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2683	    esac
2684	    ;;
2685	  -* ) ac_must_keep_next=true ;;
2686	esac
2687      fi
2688      as_fn_append ac_configure_args " '$ac_arg'"
2689      ;;
2690    esac
2691  done
2692done
2693{ ac_configure_args0=; unset ac_configure_args0;}
2694{ ac_configure_args1=; unset ac_configure_args1;}
2695
2696# When interrupted or exit'd, cleanup temporary files, and complete
2697# config.log.  We remove comments because anyway the quotes in there
2698# would cause problems or look ugly.
2699# WARNING: Use '\'' to represent an apostrophe within the trap.
2700# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2701trap 'exit_status=$?
2702  # Save into config.log some information that might help in debugging.
2703  {
2704    echo
2705
2706    $as_echo "## ---------------- ##
2707## Cache variables. ##
2708## ---------------- ##"
2709    echo
2710    # The following way of writing the cache mishandles newlines in values,
2711(
2712  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2713    eval ac_val=\$$ac_var
2714    case $ac_val in #(
2715    *${as_nl}*)
2716      case $ac_var in #(
2717      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2718$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2719      esac
2720      case $ac_var in #(
2721      _ | IFS | as_nl) ;; #(
2722      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2723      *) { eval $ac_var=; unset $ac_var;} ;;
2724      esac ;;
2725    esac
2726  done
2727  (set) 2>&1 |
2728    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2729    *${as_nl}ac_space=\ *)
2730      sed -n \
2731	"s/'\''/'\''\\\\'\'''\''/g;
2732	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2733      ;; #(
2734    *)
2735      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2736      ;;
2737    esac |
2738    sort
2739)
2740    echo
2741
2742    $as_echo "## ----------------- ##
2743## Output variables. ##
2744## ----------------- ##"
2745    echo
2746    for ac_var in $ac_subst_vars
2747    do
2748      eval ac_val=\$$ac_var
2749      case $ac_val in
2750      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2751      esac
2752      $as_echo "$ac_var='\''$ac_val'\''"
2753    done | sort
2754    echo
2755
2756    if test -n "$ac_subst_files"; then
2757      $as_echo "## ------------------- ##
2758## File substitutions. ##
2759## ------------------- ##"
2760      echo
2761      for ac_var in $ac_subst_files
2762      do
2763	eval ac_val=\$$ac_var
2764	case $ac_val in
2765	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2766	esac
2767	$as_echo "$ac_var='\''$ac_val'\''"
2768      done | sort
2769      echo
2770    fi
2771
2772    if test -s confdefs.h; then
2773      $as_echo "## ----------- ##
2774## confdefs.h. ##
2775## ----------- ##"
2776      echo
2777      cat confdefs.h
2778      echo
2779    fi
2780    test "$ac_signal" != 0 &&
2781      $as_echo "$as_me: caught signal $ac_signal"
2782    $as_echo "$as_me: exit $exit_status"
2783  } >&5
2784  rm -f core *.core core.conftest.* &&
2785    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2786    exit $exit_status
2787' 0
2788for ac_signal in 1 2 13 15; do
2789  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2790done
2791ac_signal=0
2792
2793# confdefs.h avoids OS command line length limits that DEFS can exceed.
2794rm -f -r conftest* confdefs.h
2795
2796$as_echo "/* confdefs.h */" > confdefs.h
2797
2798# Predefined preprocessor variables.
2799
2800cat >>confdefs.h <<_ACEOF
2801#define PACKAGE_NAME "$PACKAGE_NAME"
2802_ACEOF
2803
2804cat >>confdefs.h <<_ACEOF
2805#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2806_ACEOF
2807
2808cat >>confdefs.h <<_ACEOF
2809#define PACKAGE_VERSION "$PACKAGE_VERSION"
2810_ACEOF
2811
2812cat >>confdefs.h <<_ACEOF
2813#define PACKAGE_STRING "$PACKAGE_STRING"
2814_ACEOF
2815
2816cat >>confdefs.h <<_ACEOF
2817#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2818_ACEOF
2819
2820cat >>confdefs.h <<_ACEOF
2821#define PACKAGE_URL "$PACKAGE_URL"
2822_ACEOF
2823
2824
2825# Let the site file select an alternate cache file if it wants to.
2826# Prefer an explicitly selected file to automatically selected ones.
2827ac_site_file1=NONE
2828ac_site_file2=NONE
2829if test -n "$CONFIG_SITE"; then
2830  # We do not want a PATH search for config.site.
2831  case $CONFIG_SITE in #((
2832    -*)  ac_site_file1=./$CONFIG_SITE;;
2833    */*) ac_site_file1=$CONFIG_SITE;;
2834    *)   ac_site_file1=./$CONFIG_SITE;;
2835  esac
2836elif test "x$prefix" != xNONE; then
2837  ac_site_file1=$prefix/share/config.site
2838  ac_site_file2=$prefix/etc/config.site
2839else
2840  ac_site_file1=$ac_default_prefix/share/config.site
2841  ac_site_file2=$ac_default_prefix/etc/config.site
2842fi
2843for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2844do
2845  test "x$ac_site_file" = xNONE && continue
2846  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2847    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2848$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2849    sed 's/^/| /' "$ac_site_file" >&5
2850    . "$ac_site_file" \
2851      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2852$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2853as_fn_error $? "failed to load site script $ac_site_file
2854See \`config.log' for more details" "$LINENO" 5; }
2855  fi
2856done
2857
2858if test -r "$cache_file"; then
2859  # Some versions of bash will fail to source /dev/null (special files
2860  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2861  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2862    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2863$as_echo "$as_me: loading cache $cache_file" >&6;}
2864    case $cache_file in
2865      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2866      *)                      . "./$cache_file";;
2867    esac
2868  fi
2869else
2870  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2871$as_echo "$as_me: creating cache $cache_file" >&6;}
2872  >$cache_file
2873fi
2874
2875# Check that the precious variables saved in the cache have kept the same
2876# value.
2877ac_cache_corrupted=false
2878for ac_var in $ac_precious_vars; do
2879  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2880  eval ac_new_set=\$ac_env_${ac_var}_set
2881  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2882  eval ac_new_val=\$ac_env_${ac_var}_value
2883  case $ac_old_set,$ac_new_set in
2884    set,)
2885      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2886$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2887      ac_cache_corrupted=: ;;
2888    ,set)
2889      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2890$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2891      ac_cache_corrupted=: ;;
2892    ,);;
2893    *)
2894      if test "x$ac_old_val" != "x$ac_new_val"; then
2895	# differences in whitespace do not lead to failure.
2896	ac_old_val_w=`echo x $ac_old_val`
2897	ac_new_val_w=`echo x $ac_new_val`
2898	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2899	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2900$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2901	  ac_cache_corrupted=:
2902	else
2903	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2904$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2905	  eval $ac_var=\$ac_old_val
2906	fi
2907	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2908$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2909	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2910$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2911      fi;;
2912  esac
2913  # Pass precious variables to config.status.
2914  if test "$ac_new_set" = set; then
2915    case $ac_new_val in
2916    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2917    *) ac_arg=$ac_var=$ac_new_val ;;
2918    esac
2919    case " $ac_configure_args " in
2920      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2921      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2922    esac
2923  fi
2924done
2925if $ac_cache_corrupted; then
2926  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2927$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2928  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2929$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2930  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2931fi
2932## -------------------- ##
2933## Main body of script. ##
2934## -------------------- ##
2935
2936ac_ext=c
2937ac_cpp='$CPP $CPPFLAGS'
2938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2940ac_compiler_gnu=$ac_cv_c_compiler_gnu
2941
2942
2943
2944ac_aux_dir=
2945for ac_dir in build-aux "$srcdir"/build-aux; do
2946  if test -f "$ac_dir/install-sh"; then
2947    ac_aux_dir=$ac_dir
2948    ac_install_sh="$ac_aux_dir/install-sh -c"
2949    break
2950  elif test -f "$ac_dir/install.sh"; then
2951    ac_aux_dir=$ac_dir
2952    ac_install_sh="$ac_aux_dir/install.sh -c"
2953    break
2954  elif test -f "$ac_dir/shtool"; then
2955    ac_aux_dir=$ac_dir
2956    ac_install_sh="$ac_aux_dir/shtool install -c"
2957    break
2958  fi
2959done
2960if test -z "$ac_aux_dir"; then
2961  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2962fi
2963
2964# These three variables are undocumented and unsupported,
2965# and are intended to be withdrawn in a future Autoconf release.
2966# They can cause serious problems if a builder's source tree is in a directory
2967# whose full name contains unusual characters.
2968ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2969ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2970ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2971
2972
2973# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2974
2975#
2976# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2977# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2978#
2979# This code is free software; you can redistribute it and/or modify it
2980# under the terms of the GNU General Public License version 2 only, as
2981# published by the Free Software Foundation.  Oracle designates this
2982# particular file as subject to the "Classpath" exception as provided
2983# by Oracle in the LICENSE file that accompanied this code.
2984#
2985# This code is distributed in the hope that it will be useful, but WITHOUT
2986# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2987# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2988# version 2 for more details (a copy is included in the LICENSE file that
2989# accompanied this code).
2990#
2991# You should have received a copy of the GNU General Public License version
2992# 2 along with this work; if not, write to the Free Software Foundation,
2993# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2994#
2995# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2996# or visit www.oracle.com if you need additional information or have any
2997# questions.
2998#
2999
3000#
3001# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3002#
3003# This program is free software; you can redistribute it and/or modify
3004# it under the terms of the GNU General Public License as published by
3005# the Free Software Foundation; either version 2 of the License, or
3006# (at your option) any later version.
3007#
3008# This program is distributed in the hope that it will be useful, but
3009# WITHOUT ANY WARRANTY; without even the implied warranty of
3010# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3011# General Public License for more details.
3012#
3013# You should have received a copy of the GNU General Public License
3014# along with this program; if not, write to the Free Software
3015# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3016#
3017# As a special exception to the GNU General Public License, if you
3018# distribute this file as part of a program that contains a
3019# configuration script generated by Autoconf, you may include it under
3020# the same distribution terms that you use for the rest of that program.
3021
3022# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3023# ----------------------------------
3024# PKG_PROG_PKG_CONFIG
3025
3026# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3027#
3028# Check to see whether a particular set of modules exists.  Similar
3029# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3030#
3031#
3032# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3033# this or PKG_CHECK_MODULES is called, or make sure to call
3034# PKG_CHECK_EXISTS manually
3035# --------------------------------------------------------------
3036
3037
3038
3039# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3040# ---------------------------------------------
3041# _PKG_CONFIG
3042
3043# _PKG_SHORT_ERRORS_SUPPORTED
3044# -----------------------------
3045# _PKG_SHORT_ERRORS_SUPPORTED
3046
3047
3048# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3049# [ACTION-IF-NOT-FOUND])
3050#
3051#
3052# Note that if there is a possibility the first call to
3053# PKG_CHECK_MODULES might not happen, you should be sure to include an
3054# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3055#
3056#
3057# --------------------------------------------------------------
3058# PKG_CHECK_MODULES
3059
3060
3061# Include these first...
3062#
3063# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3064# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3065#
3066# This code is free software; you can redistribute it and/or modify it
3067# under the terms of the GNU General Public License version 2 only, as
3068# published by the Free Software Foundation.  Oracle designates this
3069# particular file as subject to the "Classpath" exception as provided
3070# by Oracle in the LICENSE file that accompanied this code.
3071#
3072# This code is distributed in the hope that it will be useful, but WITHOUT
3073# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3074# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3075# version 2 for more details (a copy is included in the LICENSE file that
3076# accompanied this code).
3077#
3078# You should have received a copy of the GNU General Public License version
3079# 2 along with this work; if not, write to the Free Software Foundation,
3080# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3081#
3082# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3083# or visit www.oracle.com if you need additional information or have any
3084# questions.
3085#
3086
3087
3088
3089# This will make sure the given variable points to a full and proper
3090# path. This means:
3091# 1) There will be no spaces in the path. On posix platforms,
3092#    spaces in the path will result in an error. On Windows,
3093#    the path will be rewritten using short-style to be space-free.
3094# 2) The path will be absolute, and it will be in unix-style (on
3095#     cygwin).
3096# $1: The name of the variable to fix
3097
3098
3099# This will make sure the given variable points to a executable
3100# with a full and proper path. This means:
3101# 1) There will be no spaces in the path. On posix platforms,
3102#    spaces in the path will result in an error. On Windows,
3103#    the path will be rewritten using short-style to be space-free.
3104# 2) The path will be absolute, and it will be in unix-style (on
3105#     cygwin).
3106# Any arguments given to the executable is preserved.
3107# If the input variable does not have a directory specification, then
3108# it need to be in the PATH.
3109# $1: The name of the variable to fix
3110
3111
3112
3113
3114
3115
3116# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3117# $1: variable to check
3118# $2: executable name to print in warning (optional)
3119
3120
3121# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3122# Arguments as AC_PATH_PROG:
3123# $1: variable to set
3124# $2: executable name to look for
3125
3126
3127# Setup the most fundamental tools that relies on not much else to set up,
3128# but is used by much of the early bootstrap code.
3129
3130
3131# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3132
3133
3134
3135
3136
3137
3138
3139#%%% Simple tools %%%
3140
3141# Check if we have found a usable version of make
3142# $1: the path to a potential make binary (or empty)
3143# $2: the description on how we found this
3144
3145
3146# Goes looking for a usable version of GNU make.
3147
3148
3149
3150
3151
3152
3153# Check if build directory is on local disk. If not possible to determine,
3154# we prefer to claim it's local.
3155# Argument 1: directory to test
3156# Argument 2: what to do if it is on local disk
3157# Argument 3: what to do otherwise (remote disk or failure)
3158
3159
3160# Check that source files have basic read permissions set. This might
3161# not be the case in cygwin in certain conditions.
3162
3163
3164
3165
3166#
3167# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3168# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3169#
3170# This code is free software; you can redistribute it and/or modify it
3171# under the terms of the GNU General Public License version 2 only, as
3172# published by the Free Software Foundation.  Oracle designates this
3173# particular file as subject to the "Classpath" exception as provided
3174# by Oracle in the LICENSE file that accompanied this code.
3175#
3176# This code is distributed in the hope that it will be useful, but WITHOUT
3177# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3178# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3179# version 2 for more details (a copy is included in the LICENSE file that
3180# accompanied this code).
3181#
3182# You should have received a copy of the GNU General Public License version
3183# 2 along with this work; if not, write to the Free Software Foundation,
3184# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3185#
3186# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3187# or visit www.oracle.com if you need additional information or have any
3188# questions.
3189#
3190
3191
3192
3193
3194
3195# Helper function which possibly converts a path using DOS-style short mode.
3196# If so, the updated path is stored in $new_path.
3197# $1: The path to check
3198
3199
3200# Helper function which possibly converts a path using DOS-style short mode.
3201# If so, the updated path is stored in $new_path.
3202# $1: The path to check
3203
3204
3205# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3206# and could probably be heavily simplified. However, all changes in this
3207# area tend to need lot of testing in different scenarios, and in lack of
3208# proper unit testing, cleaning this up has not been deemed worth the effort
3209# at the moment.
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3220
3221
3222
3223
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
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259# ... then the rest
3260#
3261# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3262# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3263#
3264# This code is free software; you can redistribute it and/or modify it
3265# under the terms of the GNU General Public License version 2 only, as
3266# published by the Free Software Foundation.  Oracle designates this
3267# particular file as subject to the "Classpath" exception as provided
3268# by Oracle in the LICENSE file that accompanied this code.
3269#
3270# This code is distributed in the hope that it will be useful, but WITHOUT
3271# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3272# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3273# version 2 for more details (a copy is included in the LICENSE file that
3274# accompanied this code).
3275#
3276# You should have received a copy of the GNU General Public License version
3277# 2 along with this work; if not, write to the Free Software Foundation,
3278# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3279#
3280# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3281# or visit www.oracle.com if you need additional information or have any
3282# questions.
3283#
3284
3285# Execute the check given as argument, and verify the result
3286# If the Boot JDK was previously found, do nothing
3287# $1 A command line (typically autoconf macro) to execute
3288
3289
3290# Test: Is bootjdk explicitely set by command line arguments?
3291
3292
3293# Test: Is bootjdk available from builddeps?
3294
3295
3296# Test: Is $JAVA_HOME set?
3297
3298
3299# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3300
3301
3302# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3303
3304
3305# Look for a jdk in the given path. If there are multiple, try to select the newest.
3306# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3307# $1 = Path to directory containing jdk installations.
3308# $2 = String to append to the found JDK directory to get the proper JDK home
3309
3310
3311# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3312# environmental variable as base for where to look.
3313# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3314
3315
3316# Test: Is there a JDK installed in default, well-known locations?
3317
3318
3319# Check that a command-line tool in the Boot JDK is correct
3320# $1 = name of variable to assign
3321# $2 = name of binary
3322
3323
3324###############################################################################
3325#
3326# We need a Boot JDK to bootstrap the build.
3327#
3328
3329
3330
3331
3332
3333#
3334# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3335# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3336#
3337# This code is free software; you can redistribute it and/or modify it
3338# under the terms of the GNU General Public License version 2 only, as
3339# published by the Free Software Foundation.  Oracle designates this
3340# particular file as subject to the "Classpath" exception as provided
3341# by Oracle in the LICENSE file that accompanied this code.
3342#
3343# This code is distributed in the hope that it will be useful, but WITHOUT
3344# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3345# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3346# version 2 for more details (a copy is included in the LICENSE file that
3347# accompanied this code).
3348#
3349# You should have received a copy of the GNU General Public License version
3350# 2 along with this work; if not, write to the Free Software Foundation,
3351# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3352#
3353# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3354# or visit www.oracle.com if you need additional information or have any
3355# questions.
3356#
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377#
3378# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3379# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3380#
3381# This code is free software; you can redistribute it and/or modify it
3382# under the terms of the GNU General Public License version 2 only, as
3383# published by the Free Software Foundation.  Oracle designates this
3384# particular file as subject to the "Classpath" exception as provided
3385# by Oracle in the LICENSE file that accompanied this code.
3386#
3387# This code is distributed in the hope that it will be useful, but WITHOUT
3388# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3389# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3390# version 2 for more details (a copy is included in the LICENSE file that
3391# accompanied this code).
3392#
3393# You should have received a copy of the GNU General Public License version
3394# 2 along with this work; if not, write to the Free Software Foundation,
3395# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3396#
3397# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3398# or visit www.oracle.com if you need additional information or have any
3399# questions.
3400#
3401
3402
3403
3404
3405
3406cygwin_help() {
3407    case $1 in
3408    unzip)
3409        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3410    zip)
3411        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3412    make)
3413        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3414    * )
3415       break ;;
3416    esac
3417}
3418
3419apt_help() {
3420    case $1 in
3421    devkit)
3422        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3423    openjdk)
3424        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3425    alsa)
3426        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3427    cups)
3428        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3429    freetype2)
3430        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3431    pulse)
3432        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3433    x11)
3434        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3435    ccache)
3436        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3437    * )
3438       break ;;
3439    esac
3440}
3441
3442yum_help() {
3443    case $1 in
3444    devkit)
3445        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3446    openjdk)
3447        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3448    alsa)
3449        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3450    cups)
3451        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3452    freetype2)
3453        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3454    pulse)
3455        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3456    x11)
3457        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3458    ccache)
3459        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3460    * )
3461       break ;;
3462    esac
3463}
3464
3465port_help() {
3466    PKGHANDLER_COMMAND=""
3467}
3468
3469pkgutil_help() {
3470    PKGHANDLER_COMMAND=""
3471}
3472
3473pkgadd_help() {
3474    PKGHANDLER_COMMAND=""
3475}
3476
3477
3478
3479#
3480# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3481# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3482#
3483# This code is free software; you can redistribute it and/or modify it
3484# under the terms of the GNU General Public License version 2 only, as
3485# published by the Free Software Foundation.  Oracle designates this
3486# particular file as subject to the "Classpath" exception as provided
3487# by Oracle in the LICENSE file that accompanied this code.
3488#
3489# This code is distributed in the hope that it will be useful, but WITHOUT
3490# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3491# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3492# version 2 for more details (a copy is included in the LICENSE file that
3493# accompanied this code).
3494#
3495# You should have received a copy of the GNU General Public License version
3496# 2 along with this work; if not, write to the Free Software Foundation,
3497# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3498#
3499# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3500# or visit www.oracle.com if you need additional information or have any
3501# questions.
3502#
3503
3504
3505
3506
3507
3508
3509
3510
3511###############################################################################
3512#
3513# Should we build only OpenJDK even if closed sources are present?
3514#
3515
3516
3517
3518
3519###############################################################################
3520#
3521# Setup version numbers
3522#
3523
3524
3525
3526
3527
3528
3529# Support for customization of the build process. Some build files
3530# will include counterparts from this location, if they exist. This allows
3531# for a degree of customization of the build targets and the rules/recipes
3532# to create them
3533
3534# Check whether --with-custom-make-dir was given.
3535if test "${with_custom_make_dir+set}" = set; then :
3536  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3537fi
3538
3539
3540
3541#
3542# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3543# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3544#
3545# This code is free software; you can redistribute it and/or modify it
3546# under the terms of the GNU General Public License version 2 only, as
3547# published by the Free Software Foundation.  Oracle designates this
3548# particular file as subject to the "Classpath" exception as provided
3549# by Oracle in the LICENSE file that accompanied this code.
3550#
3551# This code is distributed in the hope that it will be useful, but WITHOUT
3552# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3553# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3554# version 2 for more details (a copy is included in the LICENSE file that
3555# accompanied this code).
3556#
3557# You should have received a copy of the GNU General Public License version
3558# 2 along with this work; if not, write to the Free Software Foundation,
3559# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3560#
3561# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3562# or visit www.oracle.com if you need additional information or have any
3563# questions.
3564#
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580#
3581# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3582# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3583#
3584# This code is free software; you can redistribute it and/or modify it
3585# under the terms of the GNU General Public License version 2 only, as
3586# published by the Free Software Foundation.  Oracle designates this
3587# particular file as subject to the "Classpath" exception as provided
3588# by Oracle in the LICENSE file that accompanied this code.
3589#
3590# This code is distributed in the hope that it will be useful, but WITHOUT
3591# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3592# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3593# version 2 for more details (a copy is included in the LICENSE file that
3594# accompanied this code).
3595#
3596# You should have received a copy of the GNU General Public License version
3597# 2 along with this work; if not, write to the Free Software Foundation,
3598# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3599#
3600# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3601# or visit www.oracle.com if you need additional information or have any
3602# questions.
3603#
3604
3605# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3606# Converts autoconf style CPU name to OpenJDK style, into
3607# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3608
3609
3610# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3611# Converts autoconf style OS name to OpenJDK style, into
3612# VAR_OS and VAR_OS_API.
3613
3614
3615# Expects $host_os $host_cpu $build_os and $build_cpu
3616# and $with_target_bits to have been setup!
3617#
3618# Translate the standard triplet(quadruplet) definition
3619# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3620# OPENJDK_BUILD_OS, etc.
3621
3622
3623# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3624# accordingly. Must be done after setting up build and target system, but before
3625# doing anything else with these values.
3626
3627
3628    # Setup the legacy variables, for controlling the old makefiles.
3629    #
3630
3631
3632
3633
3634#%%% Build and target systems %%%
3635
3636
3637
3638
3639# PLATFORM_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3640#                                   [RUN-IF-FALSE])
3641# ------------------------------------------------------------
3642# Check that the c and c++ compilers support an argument
3643
3644
3645# Check that the compiler supports -mX flags
3646# Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
3647
3648
3649# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3650# Add -mX to various FLAGS variables.
3651
3652
3653
3654
3655
3656
3657#
3658# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3659# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3660#
3661# This code is free software; you can redistribute it and/or modify it
3662# under the terms of the GNU General Public License version 2 only, as
3663# published by the Free Software Foundation.  Oracle designates this
3664# particular file as subject to the "Classpath" exception as provided
3665# by Oracle in the LICENSE file that accompanied this code.
3666#
3667# This code is distributed in the hope that it will be useful, but WITHOUT
3668# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3669# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3670# version 2 for more details (a copy is included in the LICENSE file that
3671# accompanied this code).
3672#
3673# You should have received a copy of the GNU General Public License version
3674# 2 along with this work; if not, write to the Free Software Foundation,
3675# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3676#
3677# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3678# or visit www.oracle.com if you need additional information or have any
3679# questions.
3680#
3681
3682
3683
3684
3685
3686
3687
3688
3689#
3690# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3691# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3692#
3693# This code is free software; you can redistribute it and/or modify it
3694# under the terms of the GNU General Public License version 2 only, as
3695# published by the Free Software Foundation.  Oracle designates this
3696# particular file as subject to the "Classpath" exception as provided
3697# by Oracle in the LICENSE file that accompanied this code.
3698#
3699# This code is distributed in the hope that it will be useful, but WITHOUT
3700# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3701# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3702# version 2 for more details (a copy is included in the LICENSE file that
3703# accompanied this code).
3704#
3705# You should have received a copy of the GNU General Public License version
3706# 2 along with this work; if not, write to the Free Software Foundation,
3707# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3708#
3709# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3710# or visit www.oracle.com if you need additional information or have any
3711# questions.
3712#
3713
3714# $1 = compiler to test (CC or CXX)
3715# $2 = human readable name of compiler (C or C++)
3716
3717
3718
3719
3720
3721# $1 = compiler to test (CC or CXX)
3722# $2 = human readable name of compiler (C or C++)
3723# $3 = list of compiler names to search for
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736#
3737# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3738# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3739#
3740# This code is free software; you can redistribute it and/or modify it
3741# under the terms of the GNU General Public License version 2 only, as
3742# published by the Free Software Foundation.  Oracle designates this
3743# particular file as subject to the "Classpath" exception as provided
3744# by Oracle in the LICENSE file that accompanied this code.
3745#
3746# This code is distributed in the hope that it will be useful, but WITHOUT
3747# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3748# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3749# version 2 for more details (a copy is included in the LICENSE file that
3750# accompanied this code).
3751#
3752# You should have received a copy of the GNU General Public License version
3753# 2 along with this work; if not, write to the Free Software Foundation,
3754# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3755#
3756# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3757# or visit www.oracle.com if you need additional information or have any
3758# questions.
3759#
3760
3761
3762
3763
3764
3765
3766
3767# Check if the VS env variables were setup prior to running configure.
3768# If not, then find vcvarsall.bat and run it automatically, and integrate
3769# the set env variables into the spec file.
3770
3771
3772
3773# Setup the DXSDK paths
3774
3775
3776
3777
3778
3779
3780# This line needs to be here, verbatim, after all includes and the dummy hook
3781# definitions. It is replaced with custom functionality when building
3782# custom sources.
3783#CUSTOM_AUTOCONF_INCLUDE
3784
3785# Do not change or remove the following line, it is needed for consistency checks:
3786DATE_WHEN_GENERATED=1366642537
3787
3788###############################################################################
3789#
3790# Initialization / Boot-strapping
3791#
3792# The bootstrapping process needs to solve the "chicken or the egg" problem,
3793# thus it jumps back and forth, each time gaining something needed later on.
3794#
3795###############################################################################
3796
3797# Basic initialization that must happen first of all
3798
3799# Save the original command line. This is passed to us by the wrapper configure script.
3800
3801DATE_WHEN_CONFIGURED=`LANG=C date`
3802
3803{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3804$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3805{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3806$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3807
3808
3809
3810# Start with tools that do not need have cross compilation support
3811# and can be expected to be found in the default PATH. These tools are
3812# used by configure. Nor are these tools expected to be found in the
3813# devkit from the builddeps server either, since they are
3814# needed to download the devkit.
3815
3816# First are all the simple required tools.
3817
3818    for ac_prog in basename
3819do
3820  # Extract the first word of "$ac_prog", so it can be a program name with args.
3821set dummy $ac_prog; ac_word=$2
3822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3823$as_echo_n "checking for $ac_word... " >&6; }
3824if ${ac_cv_path_BASENAME+:} false; then :
3825  $as_echo_n "(cached) " >&6
3826else
3827  case $BASENAME in
3828  [\\/]* | ?:[\\/]*)
3829  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3830  ;;
3831  *)
3832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3833for as_dir in $PATH
3834do
3835  IFS=$as_save_IFS
3836  test -z "$as_dir" && as_dir=.
3837    for ac_exec_ext in '' $ac_executable_extensions; do
3838  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3839    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3841    break 2
3842  fi
3843done
3844  done
3845IFS=$as_save_IFS
3846
3847  ;;
3848esac
3849fi
3850BASENAME=$ac_cv_path_BASENAME
3851if test -n "$BASENAME"; then
3852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3853$as_echo "$BASENAME" >&6; }
3854else
3855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3856$as_echo "no" >&6; }
3857fi
3858
3859
3860  test -n "$BASENAME" && break
3861done
3862
3863
3864    if test "x$BASENAME" = x; then
3865        if test "xbasename" = x; then
3866          PROG_NAME=basename
3867        else
3868          PROG_NAME=basename
3869        fi
3870        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3871$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3872        as_fn_error $? "Cannot continue" "$LINENO" 5
3873    fi
3874
3875
3876
3877    for ac_prog in bash
3878do
3879  # Extract the first word of "$ac_prog", so it can be a program name with args.
3880set dummy $ac_prog; ac_word=$2
3881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3882$as_echo_n "checking for $ac_word... " >&6; }
3883if ${ac_cv_path_BASH+:} false; then :
3884  $as_echo_n "(cached) " >&6
3885else
3886  case $BASH in
3887  [\\/]* | ?:[\\/]*)
3888  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3889  ;;
3890  *)
3891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3892for as_dir in $PATH
3893do
3894  IFS=$as_save_IFS
3895  test -z "$as_dir" && as_dir=.
3896    for ac_exec_ext in '' $ac_executable_extensions; do
3897  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3898    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3900    break 2
3901  fi
3902done
3903  done
3904IFS=$as_save_IFS
3905
3906  ;;
3907esac
3908fi
3909BASH=$ac_cv_path_BASH
3910if test -n "$BASH"; then
3911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3912$as_echo "$BASH" >&6; }
3913else
3914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3915$as_echo "no" >&6; }
3916fi
3917
3918
3919  test -n "$BASH" && break
3920done
3921
3922
3923    if test "x$BASH" = x; then
3924        if test "xbash" = x; then
3925          PROG_NAME=bash
3926        else
3927          PROG_NAME=bash
3928        fi
3929        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3930$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3931        as_fn_error $? "Cannot continue" "$LINENO" 5
3932    fi
3933
3934
3935
3936    for ac_prog in cat
3937do
3938  # Extract the first word of "$ac_prog", so it can be a program name with args.
3939set dummy $ac_prog; ac_word=$2
3940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3941$as_echo_n "checking for $ac_word... " >&6; }
3942if ${ac_cv_path_CAT+:} false; then :
3943  $as_echo_n "(cached) " >&6
3944else
3945  case $CAT in
3946  [\\/]* | ?:[\\/]*)
3947  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3948  ;;
3949  *)
3950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3951for as_dir in $PATH
3952do
3953  IFS=$as_save_IFS
3954  test -z "$as_dir" && as_dir=.
3955    for ac_exec_ext in '' $ac_executable_extensions; do
3956  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3957    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3959    break 2
3960  fi
3961done
3962  done
3963IFS=$as_save_IFS
3964
3965  ;;
3966esac
3967fi
3968CAT=$ac_cv_path_CAT
3969if test -n "$CAT"; then
3970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3971$as_echo "$CAT" >&6; }
3972else
3973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3974$as_echo "no" >&6; }
3975fi
3976
3977
3978  test -n "$CAT" && break
3979done
3980
3981
3982    if test "x$CAT" = x; then
3983        if test "xcat" = x; then
3984          PROG_NAME=cat
3985        else
3986          PROG_NAME=cat
3987        fi
3988        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3989$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3990        as_fn_error $? "Cannot continue" "$LINENO" 5
3991    fi
3992
3993
3994
3995    for ac_prog in chmod
3996do
3997  # Extract the first word of "$ac_prog", so it can be a program name with args.
3998set dummy $ac_prog; ac_word=$2
3999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4000$as_echo_n "checking for $ac_word... " >&6; }
4001if ${ac_cv_path_CHMOD+:} false; then :
4002  $as_echo_n "(cached) " >&6
4003else
4004  case $CHMOD in
4005  [\\/]* | ?:[\\/]*)
4006  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4007  ;;
4008  *)
4009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4010for as_dir in $PATH
4011do
4012  IFS=$as_save_IFS
4013  test -z "$as_dir" && as_dir=.
4014    for ac_exec_ext in '' $ac_executable_extensions; do
4015  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4016    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4018    break 2
4019  fi
4020done
4021  done
4022IFS=$as_save_IFS
4023
4024  ;;
4025esac
4026fi
4027CHMOD=$ac_cv_path_CHMOD
4028if test -n "$CHMOD"; then
4029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4030$as_echo "$CHMOD" >&6; }
4031else
4032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033$as_echo "no" >&6; }
4034fi
4035
4036
4037  test -n "$CHMOD" && break
4038done
4039
4040
4041    if test "x$CHMOD" = x; then
4042        if test "xchmod" = x; then
4043          PROG_NAME=chmod
4044        else
4045          PROG_NAME=chmod
4046        fi
4047        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4048$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4049        as_fn_error $? "Cannot continue" "$LINENO" 5
4050    fi
4051
4052
4053
4054    for ac_prog in cmp
4055do
4056  # Extract the first word of "$ac_prog", so it can be a program name with args.
4057set dummy $ac_prog; ac_word=$2
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4059$as_echo_n "checking for $ac_word... " >&6; }
4060if ${ac_cv_path_CMP+:} false; then :
4061  $as_echo_n "(cached) " >&6
4062else
4063  case $CMP in
4064  [\\/]* | ?:[\\/]*)
4065  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4066  ;;
4067  *)
4068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in $PATH
4070do
4071  IFS=$as_save_IFS
4072  test -z "$as_dir" && as_dir=.
4073    for ac_exec_ext in '' $ac_executable_extensions; do
4074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4075    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4077    break 2
4078  fi
4079done
4080  done
4081IFS=$as_save_IFS
4082
4083  ;;
4084esac
4085fi
4086CMP=$ac_cv_path_CMP
4087if test -n "$CMP"; then
4088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4089$as_echo "$CMP" >&6; }
4090else
4091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4092$as_echo "no" >&6; }
4093fi
4094
4095
4096  test -n "$CMP" && break
4097done
4098
4099
4100    if test "x$CMP" = x; then
4101        if test "xcmp" = x; then
4102          PROG_NAME=cmp
4103        else
4104          PROG_NAME=cmp
4105        fi
4106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4107$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4108        as_fn_error $? "Cannot continue" "$LINENO" 5
4109    fi
4110
4111
4112
4113    for ac_prog in comm
4114do
4115  # Extract the first word of "$ac_prog", so it can be a program name with args.
4116set dummy $ac_prog; ac_word=$2
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4118$as_echo_n "checking for $ac_word... " >&6; }
4119if ${ac_cv_path_COMM+:} false; then :
4120  $as_echo_n "(cached) " >&6
4121else
4122  case $COMM in
4123  [\\/]* | ?:[\\/]*)
4124  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4125  ;;
4126  *)
4127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4128for as_dir in $PATH
4129do
4130  IFS=$as_save_IFS
4131  test -z "$as_dir" && as_dir=.
4132    for ac_exec_ext in '' $ac_executable_extensions; do
4133  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4134    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4136    break 2
4137  fi
4138done
4139  done
4140IFS=$as_save_IFS
4141
4142  ;;
4143esac
4144fi
4145COMM=$ac_cv_path_COMM
4146if test -n "$COMM"; then
4147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4148$as_echo "$COMM" >&6; }
4149else
4150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4151$as_echo "no" >&6; }
4152fi
4153
4154
4155  test -n "$COMM" && break
4156done
4157
4158
4159    if test "x$COMM" = x; then
4160        if test "xcomm" = x; then
4161          PROG_NAME=comm
4162        else
4163          PROG_NAME=comm
4164        fi
4165        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4166$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4167        as_fn_error $? "Cannot continue" "$LINENO" 5
4168    fi
4169
4170
4171
4172    for ac_prog in cp
4173do
4174  # Extract the first word of "$ac_prog", so it can be a program name with args.
4175set dummy $ac_prog; ac_word=$2
4176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4177$as_echo_n "checking for $ac_word... " >&6; }
4178if ${ac_cv_path_CP+:} false; then :
4179  $as_echo_n "(cached) " >&6
4180else
4181  case $CP in
4182  [\\/]* | ?:[\\/]*)
4183  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4184  ;;
4185  *)
4186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in $PATH
4188do
4189  IFS=$as_save_IFS
4190  test -z "$as_dir" && as_dir=.
4191    for ac_exec_ext in '' $ac_executable_extensions; do
4192  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4193    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4195    break 2
4196  fi
4197done
4198  done
4199IFS=$as_save_IFS
4200
4201  ;;
4202esac
4203fi
4204CP=$ac_cv_path_CP
4205if test -n "$CP"; then
4206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4207$as_echo "$CP" >&6; }
4208else
4209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4210$as_echo "no" >&6; }
4211fi
4212
4213
4214  test -n "$CP" && break
4215done
4216
4217
4218    if test "x$CP" = x; then
4219        if test "xcp" = x; then
4220          PROG_NAME=cp
4221        else
4222          PROG_NAME=cp
4223        fi
4224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4226        as_fn_error $? "Cannot continue" "$LINENO" 5
4227    fi
4228
4229
4230
4231    for ac_prog in cpio
4232do
4233  # Extract the first word of "$ac_prog", so it can be a program name with args.
4234set dummy $ac_prog; ac_word=$2
4235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4236$as_echo_n "checking for $ac_word... " >&6; }
4237if ${ac_cv_path_CPIO+:} false; then :
4238  $as_echo_n "(cached) " >&6
4239else
4240  case $CPIO in
4241  [\\/]* | ?:[\\/]*)
4242  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4243  ;;
4244  *)
4245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4246for as_dir in $PATH
4247do
4248  IFS=$as_save_IFS
4249  test -z "$as_dir" && as_dir=.
4250    for ac_exec_ext in '' $ac_executable_extensions; do
4251  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4252    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4254    break 2
4255  fi
4256done
4257  done
4258IFS=$as_save_IFS
4259
4260  ;;
4261esac
4262fi
4263CPIO=$ac_cv_path_CPIO
4264if test -n "$CPIO"; then
4265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4266$as_echo "$CPIO" >&6; }
4267else
4268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4269$as_echo "no" >&6; }
4270fi
4271
4272
4273  test -n "$CPIO" && break
4274done
4275
4276
4277    if test "x$CPIO" = x; then
4278        if test "xcpio" = x; then
4279          PROG_NAME=cpio
4280        else
4281          PROG_NAME=cpio
4282        fi
4283        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4284$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4285        as_fn_error $? "Cannot continue" "$LINENO" 5
4286    fi
4287
4288
4289
4290    for ac_prog in cut
4291do
4292  # Extract the first word of "$ac_prog", so it can be a program name with args.
4293set dummy $ac_prog; ac_word=$2
4294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4295$as_echo_n "checking for $ac_word... " >&6; }
4296if ${ac_cv_path_CUT+:} false; then :
4297  $as_echo_n "(cached) " >&6
4298else
4299  case $CUT in
4300  [\\/]* | ?:[\\/]*)
4301  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4302  ;;
4303  *)
4304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305for as_dir in $PATH
4306do
4307  IFS=$as_save_IFS
4308  test -z "$as_dir" && as_dir=.
4309    for ac_exec_ext in '' $ac_executable_extensions; do
4310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4311    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4313    break 2
4314  fi
4315done
4316  done
4317IFS=$as_save_IFS
4318
4319  ;;
4320esac
4321fi
4322CUT=$ac_cv_path_CUT
4323if test -n "$CUT"; then
4324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4325$as_echo "$CUT" >&6; }
4326else
4327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4328$as_echo "no" >&6; }
4329fi
4330
4331
4332  test -n "$CUT" && break
4333done
4334
4335
4336    if test "x$CUT" = x; then
4337        if test "xcut" = x; then
4338          PROG_NAME=cut
4339        else
4340          PROG_NAME=cut
4341        fi
4342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4344        as_fn_error $? "Cannot continue" "$LINENO" 5
4345    fi
4346
4347
4348
4349    for ac_prog in date
4350do
4351  # Extract the first word of "$ac_prog", so it can be a program name with args.
4352set dummy $ac_prog; ac_word=$2
4353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4354$as_echo_n "checking for $ac_word... " >&6; }
4355if ${ac_cv_path_DATE+:} false; then :
4356  $as_echo_n "(cached) " >&6
4357else
4358  case $DATE in
4359  [\\/]* | ?:[\\/]*)
4360  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4361  ;;
4362  *)
4363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364for as_dir in $PATH
4365do
4366  IFS=$as_save_IFS
4367  test -z "$as_dir" && as_dir=.
4368    for ac_exec_ext in '' $ac_executable_extensions; do
4369  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4370    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4372    break 2
4373  fi
4374done
4375  done
4376IFS=$as_save_IFS
4377
4378  ;;
4379esac
4380fi
4381DATE=$ac_cv_path_DATE
4382if test -n "$DATE"; then
4383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4384$as_echo "$DATE" >&6; }
4385else
4386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4387$as_echo "no" >&6; }
4388fi
4389
4390
4391  test -n "$DATE" && break
4392done
4393
4394
4395    if test "x$DATE" = x; then
4396        if test "xdate" = x; then
4397          PROG_NAME=date
4398        else
4399          PROG_NAME=date
4400        fi
4401        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4402$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4403        as_fn_error $? "Cannot continue" "$LINENO" 5
4404    fi
4405
4406
4407
4408    for ac_prog in gdiff diff
4409do
4410  # Extract the first word of "$ac_prog", so it can be a program name with args.
4411set dummy $ac_prog; ac_word=$2
4412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4413$as_echo_n "checking for $ac_word... " >&6; }
4414if ${ac_cv_path_DIFF+:} false; then :
4415  $as_echo_n "(cached) " >&6
4416else
4417  case $DIFF in
4418  [\\/]* | ?:[\\/]*)
4419  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4420  ;;
4421  *)
4422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4423for as_dir in $PATH
4424do
4425  IFS=$as_save_IFS
4426  test -z "$as_dir" && as_dir=.
4427    for ac_exec_ext in '' $ac_executable_extensions; do
4428  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4429    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4431    break 2
4432  fi
4433done
4434  done
4435IFS=$as_save_IFS
4436
4437  ;;
4438esac
4439fi
4440DIFF=$ac_cv_path_DIFF
4441if test -n "$DIFF"; then
4442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4443$as_echo "$DIFF" >&6; }
4444else
4445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4446$as_echo "no" >&6; }
4447fi
4448
4449
4450  test -n "$DIFF" && break
4451done
4452
4453
4454    if test "x$DIFF" = x; then
4455        if test "xgdiff diff" = x; then
4456          PROG_NAME=diff
4457        else
4458          PROG_NAME=gdiff diff
4459        fi
4460        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4461$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4462        as_fn_error $? "Cannot continue" "$LINENO" 5
4463    fi
4464
4465
4466
4467    for ac_prog in dirname
4468do
4469  # Extract the first word of "$ac_prog", so it can be a program name with args.
4470set dummy $ac_prog; ac_word=$2
4471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4472$as_echo_n "checking for $ac_word... " >&6; }
4473if ${ac_cv_path_DIRNAME+:} false; then :
4474  $as_echo_n "(cached) " >&6
4475else
4476  case $DIRNAME in
4477  [\\/]* | ?:[\\/]*)
4478  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4479  ;;
4480  *)
4481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4482for as_dir in $PATH
4483do
4484  IFS=$as_save_IFS
4485  test -z "$as_dir" && as_dir=.
4486    for ac_exec_ext in '' $ac_executable_extensions; do
4487  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4488    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4490    break 2
4491  fi
4492done
4493  done
4494IFS=$as_save_IFS
4495
4496  ;;
4497esac
4498fi
4499DIRNAME=$ac_cv_path_DIRNAME
4500if test -n "$DIRNAME"; then
4501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4502$as_echo "$DIRNAME" >&6; }
4503else
4504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4505$as_echo "no" >&6; }
4506fi
4507
4508
4509  test -n "$DIRNAME" && break
4510done
4511
4512
4513    if test "x$DIRNAME" = x; then
4514        if test "xdirname" = x; then
4515          PROG_NAME=dirname
4516        else
4517          PROG_NAME=dirname
4518        fi
4519        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4520$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4521        as_fn_error $? "Cannot continue" "$LINENO" 5
4522    fi
4523
4524
4525
4526    for ac_prog in echo
4527do
4528  # Extract the first word of "$ac_prog", so it can be a program name with args.
4529set dummy $ac_prog; ac_word=$2
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4531$as_echo_n "checking for $ac_word... " >&6; }
4532if ${ac_cv_path_ECHO+:} false; then :
4533  $as_echo_n "(cached) " >&6
4534else
4535  case $ECHO in
4536  [\\/]* | ?:[\\/]*)
4537  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4538  ;;
4539  *)
4540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4541for as_dir in $PATH
4542do
4543  IFS=$as_save_IFS
4544  test -z "$as_dir" && as_dir=.
4545    for ac_exec_ext in '' $ac_executable_extensions; do
4546  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4547    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4549    break 2
4550  fi
4551done
4552  done
4553IFS=$as_save_IFS
4554
4555  ;;
4556esac
4557fi
4558ECHO=$ac_cv_path_ECHO
4559if test -n "$ECHO"; then
4560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4561$as_echo "$ECHO" >&6; }
4562else
4563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4564$as_echo "no" >&6; }
4565fi
4566
4567
4568  test -n "$ECHO" && break
4569done
4570
4571
4572    if test "x$ECHO" = x; then
4573        if test "xecho" = x; then
4574          PROG_NAME=echo
4575        else
4576          PROG_NAME=echo
4577        fi
4578        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4579$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4580        as_fn_error $? "Cannot continue" "$LINENO" 5
4581    fi
4582
4583
4584
4585    for ac_prog in expr
4586do
4587  # Extract the first word of "$ac_prog", so it can be a program name with args.
4588set dummy $ac_prog; ac_word=$2
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4590$as_echo_n "checking for $ac_word... " >&6; }
4591if ${ac_cv_path_EXPR+:} false; then :
4592  $as_echo_n "(cached) " >&6
4593else
4594  case $EXPR in
4595  [\\/]* | ?:[\\/]*)
4596  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4597  ;;
4598  *)
4599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600for as_dir in $PATH
4601do
4602  IFS=$as_save_IFS
4603  test -z "$as_dir" && as_dir=.
4604    for ac_exec_ext in '' $ac_executable_extensions; do
4605  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4606    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4608    break 2
4609  fi
4610done
4611  done
4612IFS=$as_save_IFS
4613
4614  ;;
4615esac
4616fi
4617EXPR=$ac_cv_path_EXPR
4618if test -n "$EXPR"; then
4619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4620$as_echo "$EXPR" >&6; }
4621else
4622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4623$as_echo "no" >&6; }
4624fi
4625
4626
4627  test -n "$EXPR" && break
4628done
4629
4630
4631    if test "x$EXPR" = x; then
4632        if test "xexpr" = x; then
4633          PROG_NAME=expr
4634        else
4635          PROG_NAME=expr
4636        fi
4637        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4638$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4639        as_fn_error $? "Cannot continue" "$LINENO" 5
4640    fi
4641
4642
4643
4644    for ac_prog in file
4645do
4646  # Extract the first word of "$ac_prog", so it can be a program name with args.
4647set dummy $ac_prog; ac_word=$2
4648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4649$as_echo_n "checking for $ac_word... " >&6; }
4650if ${ac_cv_path_FILE+:} false; then :
4651  $as_echo_n "(cached) " >&6
4652else
4653  case $FILE in
4654  [\\/]* | ?:[\\/]*)
4655  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4656  ;;
4657  *)
4658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4659for as_dir in $PATH
4660do
4661  IFS=$as_save_IFS
4662  test -z "$as_dir" && as_dir=.
4663    for ac_exec_ext in '' $ac_executable_extensions; do
4664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4665    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4667    break 2
4668  fi
4669done
4670  done
4671IFS=$as_save_IFS
4672
4673  ;;
4674esac
4675fi
4676FILE=$ac_cv_path_FILE
4677if test -n "$FILE"; then
4678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4679$as_echo "$FILE" >&6; }
4680else
4681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4682$as_echo "no" >&6; }
4683fi
4684
4685
4686  test -n "$FILE" && break
4687done
4688
4689
4690    if test "x$FILE" = x; then
4691        if test "xfile" = x; then
4692          PROG_NAME=file
4693        else
4694          PROG_NAME=file
4695        fi
4696        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4697$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4698        as_fn_error $? "Cannot continue" "$LINENO" 5
4699    fi
4700
4701
4702
4703    for ac_prog in find
4704do
4705  # Extract the first word of "$ac_prog", so it can be a program name with args.
4706set dummy $ac_prog; ac_word=$2
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4708$as_echo_n "checking for $ac_word... " >&6; }
4709if ${ac_cv_path_FIND+:} false; then :
4710  $as_echo_n "(cached) " >&6
4711else
4712  case $FIND in
4713  [\\/]* | ?:[\\/]*)
4714  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4715  ;;
4716  *)
4717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4718for as_dir in $PATH
4719do
4720  IFS=$as_save_IFS
4721  test -z "$as_dir" && as_dir=.
4722    for ac_exec_ext in '' $ac_executable_extensions; do
4723  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4724    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4726    break 2
4727  fi
4728done
4729  done
4730IFS=$as_save_IFS
4731
4732  ;;
4733esac
4734fi
4735FIND=$ac_cv_path_FIND
4736if test -n "$FIND"; then
4737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4738$as_echo "$FIND" >&6; }
4739else
4740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4741$as_echo "no" >&6; }
4742fi
4743
4744
4745  test -n "$FIND" && break
4746done
4747
4748
4749    if test "x$FIND" = x; then
4750        if test "xfind" = x; then
4751          PROG_NAME=find
4752        else
4753          PROG_NAME=find
4754        fi
4755        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4756$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4757        as_fn_error $? "Cannot continue" "$LINENO" 5
4758    fi
4759
4760
4761
4762    for ac_prog in head
4763do
4764  # Extract the first word of "$ac_prog", so it can be a program name with args.
4765set dummy $ac_prog; ac_word=$2
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4767$as_echo_n "checking for $ac_word... " >&6; }
4768if ${ac_cv_path_HEAD+:} false; then :
4769  $as_echo_n "(cached) " >&6
4770else
4771  case $HEAD in
4772  [\\/]* | ?:[\\/]*)
4773  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4774  ;;
4775  *)
4776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4777for as_dir in $PATH
4778do
4779  IFS=$as_save_IFS
4780  test -z "$as_dir" && as_dir=.
4781    for ac_exec_ext in '' $ac_executable_extensions; do
4782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4783    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4785    break 2
4786  fi
4787done
4788  done
4789IFS=$as_save_IFS
4790
4791  ;;
4792esac
4793fi
4794HEAD=$ac_cv_path_HEAD
4795if test -n "$HEAD"; then
4796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4797$as_echo "$HEAD" >&6; }
4798else
4799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4800$as_echo "no" >&6; }
4801fi
4802
4803
4804  test -n "$HEAD" && break
4805done
4806
4807
4808    if test "x$HEAD" = x; then
4809        if test "xhead" = x; then
4810          PROG_NAME=head
4811        else
4812          PROG_NAME=head
4813        fi
4814        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4815$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4816        as_fn_error $? "Cannot continue" "$LINENO" 5
4817    fi
4818
4819
4820
4821    for ac_prog in ln
4822do
4823  # Extract the first word of "$ac_prog", so it can be a program name with args.
4824set dummy $ac_prog; ac_word=$2
4825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826$as_echo_n "checking for $ac_word... " >&6; }
4827if ${ac_cv_path_LN+:} false; then :
4828  $as_echo_n "(cached) " >&6
4829else
4830  case $LN in
4831  [\\/]* | ?:[\\/]*)
4832  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4833  ;;
4834  *)
4835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4836for as_dir in $PATH
4837do
4838  IFS=$as_save_IFS
4839  test -z "$as_dir" && as_dir=.
4840    for ac_exec_ext in '' $ac_executable_extensions; do
4841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4842    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4844    break 2
4845  fi
4846done
4847  done
4848IFS=$as_save_IFS
4849
4850  ;;
4851esac
4852fi
4853LN=$ac_cv_path_LN
4854if test -n "$LN"; then
4855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4856$as_echo "$LN" >&6; }
4857else
4858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859$as_echo "no" >&6; }
4860fi
4861
4862
4863  test -n "$LN" && break
4864done
4865
4866
4867    if test "x$LN" = x; then
4868        if test "xln" = x; then
4869          PROG_NAME=ln
4870        else
4871          PROG_NAME=ln
4872        fi
4873        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4874$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4875        as_fn_error $? "Cannot continue" "$LINENO" 5
4876    fi
4877
4878
4879
4880    for ac_prog in ls
4881do
4882  # Extract the first word of "$ac_prog", so it can be a program name with args.
4883set dummy $ac_prog; ac_word=$2
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4885$as_echo_n "checking for $ac_word... " >&6; }
4886if ${ac_cv_path_LS+:} false; then :
4887  $as_echo_n "(cached) " >&6
4888else
4889  case $LS in
4890  [\\/]* | ?:[\\/]*)
4891  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4892  ;;
4893  *)
4894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4895for as_dir in $PATH
4896do
4897  IFS=$as_save_IFS
4898  test -z "$as_dir" && as_dir=.
4899    for ac_exec_ext in '' $ac_executable_extensions; do
4900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4901    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4903    break 2
4904  fi
4905done
4906  done
4907IFS=$as_save_IFS
4908
4909  ;;
4910esac
4911fi
4912LS=$ac_cv_path_LS
4913if test -n "$LS"; then
4914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4915$as_echo "$LS" >&6; }
4916else
4917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4918$as_echo "no" >&6; }
4919fi
4920
4921
4922  test -n "$LS" && break
4923done
4924
4925
4926    if test "x$LS" = x; then
4927        if test "xls" = x; then
4928          PROG_NAME=ls
4929        else
4930          PROG_NAME=ls
4931        fi
4932        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4933$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4934        as_fn_error $? "Cannot continue" "$LINENO" 5
4935    fi
4936
4937
4938
4939    for ac_prog in mkdir
4940do
4941  # Extract the first word of "$ac_prog", so it can be a program name with args.
4942set dummy $ac_prog; ac_word=$2
4943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944$as_echo_n "checking for $ac_word... " >&6; }
4945if ${ac_cv_path_MKDIR+:} false; then :
4946  $as_echo_n "(cached) " >&6
4947else
4948  case $MKDIR in
4949  [\\/]* | ?:[\\/]*)
4950  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4951  ;;
4952  *)
4953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954for as_dir in $PATH
4955do
4956  IFS=$as_save_IFS
4957  test -z "$as_dir" && as_dir=.
4958    for ac_exec_ext in '' $ac_executable_extensions; do
4959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4960    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962    break 2
4963  fi
4964done
4965  done
4966IFS=$as_save_IFS
4967
4968  ;;
4969esac
4970fi
4971MKDIR=$ac_cv_path_MKDIR
4972if test -n "$MKDIR"; then
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4974$as_echo "$MKDIR" >&6; }
4975else
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
4980
4981  test -n "$MKDIR" && break
4982done
4983
4984
4985    if test "x$MKDIR" = x; then
4986        if test "xmkdir" = x; then
4987          PROG_NAME=mkdir
4988        else
4989          PROG_NAME=mkdir
4990        fi
4991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4993        as_fn_error $? "Cannot continue" "$LINENO" 5
4994    fi
4995
4996
4997
4998    for ac_prog in mktemp
4999do
5000  # Extract the first word of "$ac_prog", so it can be a program name with args.
5001set dummy $ac_prog; ac_word=$2
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003$as_echo_n "checking for $ac_word... " >&6; }
5004if ${ac_cv_path_MKTEMP+:} false; then :
5005  $as_echo_n "(cached) " >&6
5006else
5007  case $MKTEMP in
5008  [\\/]* | ?:[\\/]*)
5009  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5010  ;;
5011  *)
5012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015  IFS=$as_save_IFS
5016  test -z "$as_dir" && as_dir=.
5017    for ac_exec_ext in '' $ac_executable_extensions; do
5018  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5019    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021    break 2
5022  fi
5023done
5024  done
5025IFS=$as_save_IFS
5026
5027  ;;
5028esac
5029fi
5030MKTEMP=$ac_cv_path_MKTEMP
5031if test -n "$MKTEMP"; then
5032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5033$as_echo "$MKTEMP" >&6; }
5034else
5035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036$as_echo "no" >&6; }
5037fi
5038
5039
5040  test -n "$MKTEMP" && break
5041done
5042
5043
5044    if test "x$MKTEMP" = x; then
5045        if test "xmktemp" = x; then
5046          PROG_NAME=mktemp
5047        else
5048          PROG_NAME=mktemp
5049        fi
5050        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5051$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5052        as_fn_error $? "Cannot continue" "$LINENO" 5
5053    fi
5054
5055
5056
5057    for ac_prog in mv
5058do
5059  # Extract the first word of "$ac_prog", so it can be a program name with args.
5060set dummy $ac_prog; ac_word=$2
5061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062$as_echo_n "checking for $ac_word... " >&6; }
5063if ${ac_cv_path_MV+:} false; then :
5064  $as_echo_n "(cached) " >&6
5065else
5066  case $MV in
5067  [\\/]* | ?:[\\/]*)
5068  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5069  ;;
5070  *)
5071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5072for as_dir in $PATH
5073do
5074  IFS=$as_save_IFS
5075  test -z "$as_dir" && as_dir=.
5076    for ac_exec_ext in '' $ac_executable_extensions; do
5077  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5078    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5080    break 2
5081  fi
5082done
5083  done
5084IFS=$as_save_IFS
5085
5086  ;;
5087esac
5088fi
5089MV=$ac_cv_path_MV
5090if test -n "$MV"; then
5091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5092$as_echo "$MV" >&6; }
5093else
5094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095$as_echo "no" >&6; }
5096fi
5097
5098
5099  test -n "$MV" && break
5100done
5101
5102
5103    if test "x$MV" = x; then
5104        if test "xmv" = x; then
5105          PROG_NAME=mv
5106        else
5107          PROG_NAME=mv
5108        fi
5109        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5110$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5111        as_fn_error $? "Cannot continue" "$LINENO" 5
5112    fi
5113
5114
5115
5116    for ac_prog in printf
5117do
5118  # Extract the first word of "$ac_prog", so it can be a program name with args.
5119set dummy $ac_prog; ac_word=$2
5120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5121$as_echo_n "checking for $ac_word... " >&6; }
5122if ${ac_cv_path_PRINTF+:} false; then :
5123  $as_echo_n "(cached) " >&6
5124else
5125  case $PRINTF in
5126  [\\/]* | ?:[\\/]*)
5127  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5128  ;;
5129  *)
5130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133  IFS=$as_save_IFS
5134  test -z "$as_dir" && as_dir=.
5135    for ac_exec_ext in '' $ac_executable_extensions; do
5136  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5137    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5139    break 2
5140  fi
5141done
5142  done
5143IFS=$as_save_IFS
5144
5145  ;;
5146esac
5147fi
5148PRINTF=$ac_cv_path_PRINTF
5149if test -n "$PRINTF"; then
5150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5151$as_echo "$PRINTF" >&6; }
5152else
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5154$as_echo "no" >&6; }
5155fi
5156
5157
5158  test -n "$PRINTF" && break
5159done
5160
5161
5162    if test "x$PRINTF" = x; then
5163        if test "xprintf" = x; then
5164          PROG_NAME=printf
5165        else
5166          PROG_NAME=printf
5167        fi
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5169$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5170        as_fn_error $? "Cannot continue" "$LINENO" 5
5171    fi
5172
5173
5174
5175    for ac_prog in pwd
5176do
5177  # Extract the first word of "$ac_prog", so it can be a program name with args.
5178set dummy $ac_prog; ac_word=$2
5179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5180$as_echo_n "checking for $ac_word... " >&6; }
5181if ${ac_cv_path_THEPWDCMD+:} false; then :
5182  $as_echo_n "(cached) " >&6
5183else
5184  case $THEPWDCMD in
5185  [\\/]* | ?:[\\/]*)
5186  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5187  ;;
5188  *)
5189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5190for as_dir in $PATH
5191do
5192  IFS=$as_save_IFS
5193  test -z "$as_dir" && as_dir=.
5194    for ac_exec_ext in '' $ac_executable_extensions; do
5195  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5196    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5198    break 2
5199  fi
5200done
5201  done
5202IFS=$as_save_IFS
5203
5204  ;;
5205esac
5206fi
5207THEPWDCMD=$ac_cv_path_THEPWDCMD
5208if test -n "$THEPWDCMD"; then
5209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5210$as_echo "$THEPWDCMD" >&6; }
5211else
5212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213$as_echo "no" >&6; }
5214fi
5215
5216
5217  test -n "$THEPWDCMD" && break
5218done
5219
5220
5221    if test "x$THEPWDCMD" = x; then
5222        if test "xpwd" = x; then
5223          PROG_NAME=thepwdcmd
5224        else
5225          PROG_NAME=pwd
5226        fi
5227        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5228$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5229        as_fn_error $? "Cannot continue" "$LINENO" 5
5230    fi
5231
5232
5233
5234    for ac_prog in rm
5235do
5236  # Extract the first word of "$ac_prog", so it can be a program name with args.
5237set dummy $ac_prog; ac_word=$2
5238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5239$as_echo_n "checking for $ac_word... " >&6; }
5240if ${ac_cv_path_RM+:} false; then :
5241  $as_echo_n "(cached) " >&6
5242else
5243  case $RM in
5244  [\\/]* | ?:[\\/]*)
5245  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5246  ;;
5247  *)
5248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5249for as_dir in $PATH
5250do
5251  IFS=$as_save_IFS
5252  test -z "$as_dir" && as_dir=.
5253    for ac_exec_ext in '' $ac_executable_extensions; do
5254  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5255    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5257    break 2
5258  fi
5259done
5260  done
5261IFS=$as_save_IFS
5262
5263  ;;
5264esac
5265fi
5266RM=$ac_cv_path_RM
5267if test -n "$RM"; then
5268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5269$as_echo "$RM" >&6; }
5270else
5271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5272$as_echo "no" >&6; }
5273fi
5274
5275
5276  test -n "$RM" && break
5277done
5278
5279
5280    if test "x$RM" = x; then
5281        if test "xrm" = x; then
5282          PROG_NAME=rm
5283        else
5284          PROG_NAME=rm
5285        fi
5286        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5287$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5288        as_fn_error $? "Cannot continue" "$LINENO" 5
5289    fi
5290
5291
5292
5293    for ac_prog in sh
5294do
5295  # Extract the first word of "$ac_prog", so it can be a program name with args.
5296set dummy $ac_prog; ac_word=$2
5297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5298$as_echo_n "checking for $ac_word... " >&6; }
5299if ${ac_cv_path_SH+:} false; then :
5300  $as_echo_n "(cached) " >&6
5301else
5302  case $SH in
5303  [\\/]* | ?:[\\/]*)
5304  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5305  ;;
5306  *)
5307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5308for as_dir in $PATH
5309do
5310  IFS=$as_save_IFS
5311  test -z "$as_dir" && as_dir=.
5312    for ac_exec_ext in '' $ac_executable_extensions; do
5313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5314    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5316    break 2
5317  fi
5318done
5319  done
5320IFS=$as_save_IFS
5321
5322  ;;
5323esac
5324fi
5325SH=$ac_cv_path_SH
5326if test -n "$SH"; then
5327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5328$as_echo "$SH" >&6; }
5329else
5330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
5332fi
5333
5334
5335  test -n "$SH" && break
5336done
5337
5338
5339    if test "x$SH" = x; then
5340        if test "xsh" = x; then
5341          PROG_NAME=sh
5342        else
5343          PROG_NAME=sh
5344        fi
5345        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5346$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5347        as_fn_error $? "Cannot continue" "$LINENO" 5
5348    fi
5349
5350
5351
5352    for ac_prog in sort
5353do
5354  # Extract the first word of "$ac_prog", so it can be a program name with args.
5355set dummy $ac_prog; ac_word=$2
5356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5357$as_echo_n "checking for $ac_word... " >&6; }
5358if ${ac_cv_path_SORT+:} false; then :
5359  $as_echo_n "(cached) " >&6
5360else
5361  case $SORT in
5362  [\\/]* | ?:[\\/]*)
5363  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5364  ;;
5365  *)
5366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5367for as_dir in $PATH
5368do
5369  IFS=$as_save_IFS
5370  test -z "$as_dir" && as_dir=.
5371    for ac_exec_ext in '' $ac_executable_extensions; do
5372  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5373    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5375    break 2
5376  fi
5377done
5378  done
5379IFS=$as_save_IFS
5380
5381  ;;
5382esac
5383fi
5384SORT=$ac_cv_path_SORT
5385if test -n "$SORT"; then
5386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5387$as_echo "$SORT" >&6; }
5388else
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
5391fi
5392
5393
5394  test -n "$SORT" && break
5395done
5396
5397
5398    if test "x$SORT" = x; then
5399        if test "xsort" = x; then
5400          PROG_NAME=sort
5401        else
5402          PROG_NAME=sort
5403        fi
5404        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5405$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5406        as_fn_error $? "Cannot continue" "$LINENO" 5
5407    fi
5408
5409
5410
5411    for ac_prog in tail
5412do
5413  # Extract the first word of "$ac_prog", so it can be a program name with args.
5414set dummy $ac_prog; ac_word=$2
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416$as_echo_n "checking for $ac_word... " >&6; }
5417if ${ac_cv_path_TAIL+:} false; then :
5418  $as_echo_n "(cached) " >&6
5419else
5420  case $TAIL in
5421  [\\/]* | ?:[\\/]*)
5422  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5423  ;;
5424  *)
5425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428  IFS=$as_save_IFS
5429  test -z "$as_dir" && as_dir=.
5430    for ac_exec_ext in '' $ac_executable_extensions; do
5431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5432    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434    break 2
5435  fi
5436done
5437  done
5438IFS=$as_save_IFS
5439
5440  ;;
5441esac
5442fi
5443TAIL=$ac_cv_path_TAIL
5444if test -n "$TAIL"; then
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5446$as_echo "$TAIL" >&6; }
5447else
5448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449$as_echo "no" >&6; }
5450fi
5451
5452
5453  test -n "$TAIL" && break
5454done
5455
5456
5457    if test "x$TAIL" = x; then
5458        if test "xtail" = x; then
5459          PROG_NAME=tail
5460        else
5461          PROG_NAME=tail
5462        fi
5463        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5464$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5465        as_fn_error $? "Cannot continue" "$LINENO" 5
5466    fi
5467
5468
5469
5470    for ac_prog in tar
5471do
5472  # Extract the first word of "$ac_prog", so it can be a program name with args.
5473set dummy $ac_prog; ac_word=$2
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
5476if ${ac_cv_path_TAR+:} false; then :
5477  $as_echo_n "(cached) " >&6
5478else
5479  case $TAR in
5480  [\\/]* | ?:[\\/]*)
5481  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5482  ;;
5483  *)
5484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485for as_dir in $PATH
5486do
5487  IFS=$as_save_IFS
5488  test -z "$as_dir" && as_dir=.
5489    for ac_exec_ext in '' $ac_executable_extensions; do
5490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5491    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5493    break 2
5494  fi
5495done
5496  done
5497IFS=$as_save_IFS
5498
5499  ;;
5500esac
5501fi
5502TAR=$ac_cv_path_TAR
5503if test -n "$TAR"; then
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5505$as_echo "$TAR" >&6; }
5506else
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508$as_echo "no" >&6; }
5509fi
5510
5511
5512  test -n "$TAR" && break
5513done
5514
5515
5516    if test "x$TAR" = x; then
5517        if test "xtar" = x; then
5518          PROG_NAME=tar
5519        else
5520          PROG_NAME=tar
5521        fi
5522        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5523$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5524        as_fn_error $? "Cannot continue" "$LINENO" 5
5525    fi
5526
5527
5528
5529    for ac_prog in tee
5530do
5531  # Extract the first word of "$ac_prog", so it can be a program name with args.
5532set dummy $ac_prog; ac_word=$2
5533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5534$as_echo_n "checking for $ac_word... " >&6; }
5535if ${ac_cv_path_TEE+:} false; then :
5536  $as_echo_n "(cached) " >&6
5537else
5538  case $TEE in
5539  [\\/]* | ?:[\\/]*)
5540  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5541  ;;
5542  *)
5543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5544for as_dir in $PATH
5545do
5546  IFS=$as_save_IFS
5547  test -z "$as_dir" && as_dir=.
5548    for ac_exec_ext in '' $ac_executable_extensions; do
5549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5550    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5552    break 2
5553  fi
5554done
5555  done
5556IFS=$as_save_IFS
5557
5558  ;;
5559esac
5560fi
5561TEE=$ac_cv_path_TEE
5562if test -n "$TEE"; then
5563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5564$as_echo "$TEE" >&6; }
5565else
5566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5567$as_echo "no" >&6; }
5568fi
5569
5570
5571  test -n "$TEE" && break
5572done
5573
5574
5575    if test "x$TEE" = x; then
5576        if test "xtee" = x; then
5577          PROG_NAME=tee
5578        else
5579          PROG_NAME=tee
5580        fi
5581        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5582$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5583        as_fn_error $? "Cannot continue" "$LINENO" 5
5584    fi
5585
5586
5587
5588    for ac_prog in touch
5589do
5590  # Extract the first word of "$ac_prog", so it can be a program name with args.
5591set dummy $ac_prog; ac_word=$2
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5593$as_echo_n "checking for $ac_word... " >&6; }
5594if ${ac_cv_path_TOUCH+:} false; then :
5595  $as_echo_n "(cached) " >&6
5596else
5597  case $TOUCH in
5598  [\\/]* | ?:[\\/]*)
5599  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5600  ;;
5601  *)
5602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5603for as_dir in $PATH
5604do
5605  IFS=$as_save_IFS
5606  test -z "$as_dir" && as_dir=.
5607    for ac_exec_ext in '' $ac_executable_extensions; do
5608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5609    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5611    break 2
5612  fi
5613done
5614  done
5615IFS=$as_save_IFS
5616
5617  ;;
5618esac
5619fi
5620TOUCH=$ac_cv_path_TOUCH
5621if test -n "$TOUCH"; then
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5623$as_echo "$TOUCH" >&6; }
5624else
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5626$as_echo "no" >&6; }
5627fi
5628
5629
5630  test -n "$TOUCH" && break
5631done
5632
5633
5634    if test "x$TOUCH" = x; then
5635        if test "xtouch" = x; then
5636          PROG_NAME=touch
5637        else
5638          PROG_NAME=touch
5639        fi
5640        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5641$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5642        as_fn_error $? "Cannot continue" "$LINENO" 5
5643    fi
5644
5645
5646
5647    for ac_prog in tr
5648do
5649  # Extract the first word of "$ac_prog", so it can be a program name with args.
5650set dummy $ac_prog; ac_word=$2
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
5653if ${ac_cv_path_TR+:} false; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  case $TR in
5657  [\\/]* | ?:[\\/]*)
5658  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5659  ;;
5660  *)
5661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664  IFS=$as_save_IFS
5665  test -z "$as_dir" && as_dir=.
5666    for ac_exec_ext in '' $ac_executable_extensions; do
5667  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5668    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5670    break 2
5671  fi
5672done
5673  done
5674IFS=$as_save_IFS
5675
5676  ;;
5677esac
5678fi
5679TR=$ac_cv_path_TR
5680if test -n "$TR"; then
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5682$as_echo "$TR" >&6; }
5683else
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
5686fi
5687
5688
5689  test -n "$TR" && break
5690done
5691
5692
5693    if test "x$TR" = x; then
5694        if test "xtr" = x; then
5695          PROG_NAME=tr
5696        else
5697          PROG_NAME=tr
5698        fi
5699        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5700$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5701        as_fn_error $? "Cannot continue" "$LINENO" 5
5702    fi
5703
5704
5705
5706    for ac_prog in uname
5707do
5708  # Extract the first word of "$ac_prog", so it can be a program name with args.
5709set dummy $ac_prog; ac_word=$2
5710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5711$as_echo_n "checking for $ac_word... " >&6; }
5712if ${ac_cv_path_UNAME+:} false; then :
5713  $as_echo_n "(cached) " >&6
5714else
5715  case $UNAME in
5716  [\\/]* | ?:[\\/]*)
5717  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5718  ;;
5719  *)
5720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5721for as_dir in $PATH
5722do
5723  IFS=$as_save_IFS
5724  test -z "$as_dir" && as_dir=.
5725    for ac_exec_ext in '' $ac_executable_extensions; do
5726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5727    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5729    break 2
5730  fi
5731done
5732  done
5733IFS=$as_save_IFS
5734
5735  ;;
5736esac
5737fi
5738UNAME=$ac_cv_path_UNAME
5739if test -n "$UNAME"; then
5740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5741$as_echo "$UNAME" >&6; }
5742else
5743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5744$as_echo "no" >&6; }
5745fi
5746
5747
5748  test -n "$UNAME" && break
5749done
5750
5751
5752    if test "x$UNAME" = x; then
5753        if test "xuname" = x; then
5754          PROG_NAME=uname
5755        else
5756          PROG_NAME=uname
5757        fi
5758        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5759$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5760        as_fn_error $? "Cannot continue" "$LINENO" 5
5761    fi
5762
5763
5764
5765    for ac_prog in uniq
5766do
5767  # Extract the first word of "$ac_prog", so it can be a program name with args.
5768set dummy $ac_prog; ac_word=$2
5769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5770$as_echo_n "checking for $ac_word... " >&6; }
5771if ${ac_cv_path_UNIQ+:} false; then :
5772  $as_echo_n "(cached) " >&6
5773else
5774  case $UNIQ in
5775  [\\/]* | ?:[\\/]*)
5776  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5777  ;;
5778  *)
5779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5780for as_dir in $PATH
5781do
5782  IFS=$as_save_IFS
5783  test -z "$as_dir" && as_dir=.
5784    for ac_exec_ext in '' $ac_executable_extensions; do
5785  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5786    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5788    break 2
5789  fi
5790done
5791  done
5792IFS=$as_save_IFS
5793
5794  ;;
5795esac
5796fi
5797UNIQ=$ac_cv_path_UNIQ
5798if test -n "$UNIQ"; then
5799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5800$as_echo "$UNIQ" >&6; }
5801else
5802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5803$as_echo "no" >&6; }
5804fi
5805
5806
5807  test -n "$UNIQ" && break
5808done
5809
5810
5811    if test "x$UNIQ" = x; then
5812        if test "xuniq" = x; then
5813          PROG_NAME=uniq
5814        else
5815          PROG_NAME=uniq
5816        fi
5817        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5818$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5819        as_fn_error $? "Cannot continue" "$LINENO" 5
5820    fi
5821
5822
5823
5824    for ac_prog in wc
5825do
5826  # Extract the first word of "$ac_prog", so it can be a program name with args.
5827set dummy $ac_prog; ac_word=$2
5828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5829$as_echo_n "checking for $ac_word... " >&6; }
5830if ${ac_cv_path_WC+:} false; then :
5831  $as_echo_n "(cached) " >&6
5832else
5833  case $WC in
5834  [\\/]* | ?:[\\/]*)
5835  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5836  ;;
5837  *)
5838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5839for as_dir in $PATH
5840do
5841  IFS=$as_save_IFS
5842  test -z "$as_dir" && as_dir=.
5843    for ac_exec_ext in '' $ac_executable_extensions; do
5844  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5845    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5847    break 2
5848  fi
5849done
5850  done
5851IFS=$as_save_IFS
5852
5853  ;;
5854esac
5855fi
5856WC=$ac_cv_path_WC
5857if test -n "$WC"; then
5858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5859$as_echo "$WC" >&6; }
5860else
5861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5862$as_echo "no" >&6; }
5863fi
5864
5865
5866  test -n "$WC" && break
5867done
5868
5869
5870    if test "x$WC" = x; then
5871        if test "xwc" = x; then
5872          PROG_NAME=wc
5873        else
5874          PROG_NAME=wc
5875        fi
5876        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5877$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5878        as_fn_error $? "Cannot continue" "$LINENO" 5
5879    fi
5880
5881
5882
5883    for ac_prog in which
5884do
5885  # Extract the first word of "$ac_prog", so it can be a program name with args.
5886set dummy $ac_prog; ac_word=$2
5887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5888$as_echo_n "checking for $ac_word... " >&6; }
5889if ${ac_cv_path_WHICH+:} false; then :
5890  $as_echo_n "(cached) " >&6
5891else
5892  case $WHICH in
5893  [\\/]* | ?:[\\/]*)
5894  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5895  ;;
5896  *)
5897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5898for as_dir in $PATH
5899do
5900  IFS=$as_save_IFS
5901  test -z "$as_dir" && as_dir=.
5902    for ac_exec_ext in '' $ac_executable_extensions; do
5903  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5904    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5906    break 2
5907  fi
5908done
5909  done
5910IFS=$as_save_IFS
5911
5912  ;;
5913esac
5914fi
5915WHICH=$ac_cv_path_WHICH
5916if test -n "$WHICH"; then
5917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5918$as_echo "$WHICH" >&6; }
5919else
5920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5921$as_echo "no" >&6; }
5922fi
5923
5924
5925  test -n "$WHICH" && break
5926done
5927
5928
5929    if test "x$WHICH" = x; then
5930        if test "xwhich" = x; then
5931          PROG_NAME=which
5932        else
5933          PROG_NAME=which
5934        fi
5935        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5936$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5937        as_fn_error $? "Cannot continue" "$LINENO" 5
5938    fi
5939
5940
5941
5942    for ac_prog in xargs
5943do
5944  # Extract the first word of "$ac_prog", so it can be a program name with args.
5945set dummy $ac_prog; ac_word=$2
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947$as_echo_n "checking for $ac_word... " >&6; }
5948if ${ac_cv_path_XARGS+:} false; then :
5949  $as_echo_n "(cached) " >&6
5950else
5951  case $XARGS in
5952  [\\/]* | ?:[\\/]*)
5953  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5954  ;;
5955  *)
5956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5957for as_dir in $PATH
5958do
5959  IFS=$as_save_IFS
5960  test -z "$as_dir" && as_dir=.
5961    for ac_exec_ext in '' $ac_executable_extensions; do
5962  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5963    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5965    break 2
5966  fi
5967done
5968  done
5969IFS=$as_save_IFS
5970
5971  ;;
5972esac
5973fi
5974XARGS=$ac_cv_path_XARGS
5975if test -n "$XARGS"; then
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5977$as_echo "$XARGS" >&6; }
5978else
5979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5980$as_echo "no" >&6; }
5981fi
5982
5983
5984  test -n "$XARGS" && break
5985done
5986
5987
5988    if test "x$XARGS" = x; then
5989        if test "xxargs" = x; then
5990          PROG_NAME=xargs
5991        else
5992          PROG_NAME=xargs
5993        fi
5994        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5995$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5996        as_fn_error $? "Cannot continue" "$LINENO" 5
5997    fi
5998
5999
6000
6001# Then required tools that require some special treatment.
6002for ac_prog in gawk mawk nawk awk
6003do
6004  # Extract the first word of "$ac_prog", so it can be a program name with args.
6005set dummy $ac_prog; ac_word=$2
6006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6007$as_echo_n "checking for $ac_word... " >&6; }
6008if ${ac_cv_prog_AWK+:} false; then :
6009  $as_echo_n "(cached) " >&6
6010else
6011  if test -n "$AWK"; then
6012  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6013else
6014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6015for as_dir in $PATH
6016do
6017  IFS=$as_save_IFS
6018  test -z "$as_dir" && as_dir=.
6019    for ac_exec_ext in '' $ac_executable_extensions; do
6020  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6021    ac_cv_prog_AWK="$ac_prog"
6022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6023    break 2
6024  fi
6025done
6026  done
6027IFS=$as_save_IFS
6028
6029fi
6030fi
6031AWK=$ac_cv_prog_AWK
6032if test -n "$AWK"; then
6033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6034$as_echo "$AWK" >&6; }
6035else
6036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037$as_echo "no" >&6; }
6038fi
6039
6040
6041  test -n "$AWK" && break
6042done
6043
6044
6045    if test "x$AWK" = x; then
6046        if test "x" = x; then
6047          PROG_NAME=awk
6048        else
6049          PROG_NAME=
6050        fi
6051        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6052$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6053        as_fn_error $? "Cannot continue" "$LINENO" 5
6054    fi
6055
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6057$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6058if ${ac_cv_path_GREP+:} false; then :
6059  $as_echo_n "(cached) " >&6
6060else
6061  if test -z "$GREP"; then
6062  ac_path_GREP_found=false
6063  # Loop through the user's path and test for each of PROGNAME-LIST
6064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6065for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6066do
6067  IFS=$as_save_IFS
6068  test -z "$as_dir" && as_dir=.
6069    for ac_prog in grep ggrep; do
6070    for ac_exec_ext in '' $ac_executable_extensions; do
6071      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6072      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6073# Check for GNU ac_path_GREP and select it if it is found.
6074  # Check for GNU $ac_path_GREP
6075case `"$ac_path_GREP" --version 2>&1` in
6076*GNU*)
6077  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6078*)
6079  ac_count=0
6080  $as_echo_n 0123456789 >"conftest.in"
6081  while :
6082  do
6083    cat "conftest.in" "conftest.in" >"conftest.tmp"
6084    mv "conftest.tmp" "conftest.in"
6085    cp "conftest.in" "conftest.nl"
6086    $as_echo 'GREP' >> "conftest.nl"
6087    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6088    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6089    as_fn_arith $ac_count + 1 && ac_count=$as_val
6090    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6091      # Best one so far, save it but keep looking for a better one
6092      ac_cv_path_GREP="$ac_path_GREP"
6093      ac_path_GREP_max=$ac_count
6094    fi
6095    # 10*(2^10) chars as input seems more than enough
6096    test $ac_count -gt 10 && break
6097  done
6098  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6099esac
6100
6101      $ac_path_GREP_found && break 3
6102    done
6103  done
6104  done
6105IFS=$as_save_IFS
6106  if test -z "$ac_cv_path_GREP"; then
6107    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6108  fi
6109else
6110  ac_cv_path_GREP=$GREP
6111fi
6112
6113fi
6114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6115$as_echo "$ac_cv_path_GREP" >&6; }
6116 GREP="$ac_cv_path_GREP"
6117
6118
6119
6120    if test "x$GREP" = x; then
6121        if test "x" = x; then
6122          PROG_NAME=grep
6123        else
6124          PROG_NAME=
6125        fi
6126        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6127$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6128        as_fn_error $? "Cannot continue" "$LINENO" 5
6129    fi
6130
6131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6132$as_echo_n "checking for egrep... " >&6; }
6133if ${ac_cv_path_EGREP+:} false; then :
6134  $as_echo_n "(cached) " >&6
6135else
6136  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6137   then ac_cv_path_EGREP="$GREP -E"
6138   else
6139     if test -z "$EGREP"; then
6140  ac_path_EGREP_found=false
6141  # Loop through the user's path and test for each of PROGNAME-LIST
6142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6143for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6144do
6145  IFS=$as_save_IFS
6146  test -z "$as_dir" && as_dir=.
6147    for ac_prog in egrep; do
6148    for ac_exec_ext in '' $ac_executable_extensions; do
6149      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6150      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6151# Check for GNU ac_path_EGREP and select it if it is found.
6152  # Check for GNU $ac_path_EGREP
6153case `"$ac_path_EGREP" --version 2>&1` in
6154*GNU*)
6155  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6156*)
6157  ac_count=0
6158  $as_echo_n 0123456789 >"conftest.in"
6159  while :
6160  do
6161    cat "conftest.in" "conftest.in" >"conftest.tmp"
6162    mv "conftest.tmp" "conftest.in"
6163    cp "conftest.in" "conftest.nl"
6164    $as_echo 'EGREP' >> "conftest.nl"
6165    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6166    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6167    as_fn_arith $ac_count + 1 && ac_count=$as_val
6168    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6169      # Best one so far, save it but keep looking for a better one
6170      ac_cv_path_EGREP="$ac_path_EGREP"
6171      ac_path_EGREP_max=$ac_count
6172    fi
6173    # 10*(2^10) chars as input seems more than enough
6174    test $ac_count -gt 10 && break
6175  done
6176  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6177esac
6178
6179      $ac_path_EGREP_found && break 3
6180    done
6181  done
6182  done
6183IFS=$as_save_IFS
6184  if test -z "$ac_cv_path_EGREP"; then
6185    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6186  fi
6187else
6188  ac_cv_path_EGREP=$EGREP
6189fi
6190
6191   fi
6192fi
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6194$as_echo "$ac_cv_path_EGREP" >&6; }
6195 EGREP="$ac_cv_path_EGREP"
6196
6197
6198
6199    if test "x$EGREP" = x; then
6200        if test "x" = x; then
6201          PROG_NAME=egrep
6202        else
6203          PROG_NAME=
6204        fi
6205        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6206$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6207        as_fn_error $? "Cannot continue" "$LINENO" 5
6208    fi
6209
6210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6211$as_echo_n "checking for fgrep... " >&6; }
6212if ${ac_cv_path_FGREP+:} false; then :
6213  $as_echo_n "(cached) " >&6
6214else
6215  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6216   then ac_cv_path_FGREP="$GREP -F"
6217   else
6218     if test -z "$FGREP"; then
6219  ac_path_FGREP_found=false
6220  # Loop through the user's path and test for each of PROGNAME-LIST
6221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6222for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6223do
6224  IFS=$as_save_IFS
6225  test -z "$as_dir" && as_dir=.
6226    for ac_prog in fgrep; do
6227    for ac_exec_ext in '' $ac_executable_extensions; do
6228      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6229      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6230# Check for GNU ac_path_FGREP and select it if it is found.
6231  # Check for GNU $ac_path_FGREP
6232case `"$ac_path_FGREP" --version 2>&1` in
6233*GNU*)
6234  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6235*)
6236  ac_count=0
6237  $as_echo_n 0123456789 >"conftest.in"
6238  while :
6239  do
6240    cat "conftest.in" "conftest.in" >"conftest.tmp"
6241    mv "conftest.tmp" "conftest.in"
6242    cp "conftest.in" "conftest.nl"
6243    $as_echo 'FGREP' >> "conftest.nl"
6244    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6245    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6246    as_fn_arith $ac_count + 1 && ac_count=$as_val
6247    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6248      # Best one so far, save it but keep looking for a better one
6249      ac_cv_path_FGREP="$ac_path_FGREP"
6250      ac_path_FGREP_max=$ac_count
6251    fi
6252    # 10*(2^10) chars as input seems more than enough
6253    test $ac_count -gt 10 && break
6254  done
6255  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6256esac
6257
6258      $ac_path_FGREP_found && break 3
6259    done
6260  done
6261  done
6262IFS=$as_save_IFS
6263  if test -z "$ac_cv_path_FGREP"; then
6264    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6265  fi
6266else
6267  ac_cv_path_FGREP=$FGREP
6268fi
6269
6270   fi
6271fi
6272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6273$as_echo "$ac_cv_path_FGREP" >&6; }
6274 FGREP="$ac_cv_path_FGREP"
6275
6276
6277
6278    if test "x$FGREP" = x; then
6279        if test "x" = x; then
6280          PROG_NAME=fgrep
6281        else
6282          PROG_NAME=
6283        fi
6284        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6285$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6286        as_fn_error $? "Cannot continue" "$LINENO" 5
6287    fi
6288
6289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6290$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6291if ${ac_cv_path_SED+:} false; then :
6292  $as_echo_n "(cached) " >&6
6293else
6294            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6295     for ac_i in 1 2 3 4 5 6 7; do
6296       ac_script="$ac_script$as_nl$ac_script"
6297     done
6298     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6299     { ac_script=; unset ac_script;}
6300     if test -z "$SED"; then
6301  ac_path_SED_found=false
6302  # Loop through the user's path and test for each of PROGNAME-LIST
6303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6304for as_dir in $PATH
6305do
6306  IFS=$as_save_IFS
6307  test -z "$as_dir" && as_dir=.
6308    for ac_prog in sed gsed; do
6309    for ac_exec_ext in '' $ac_executable_extensions; do
6310      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6311      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6312# Check for GNU ac_path_SED and select it if it is found.
6313  # Check for GNU $ac_path_SED
6314case `"$ac_path_SED" --version 2>&1` in
6315*GNU*)
6316  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6317*)
6318  ac_count=0
6319  $as_echo_n 0123456789 >"conftest.in"
6320  while :
6321  do
6322    cat "conftest.in" "conftest.in" >"conftest.tmp"
6323    mv "conftest.tmp" "conftest.in"
6324    cp "conftest.in" "conftest.nl"
6325    $as_echo '' >> "conftest.nl"
6326    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6327    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6328    as_fn_arith $ac_count + 1 && ac_count=$as_val
6329    if test $ac_count -gt ${ac_path_SED_max-0}; then
6330      # Best one so far, save it but keep looking for a better one
6331      ac_cv_path_SED="$ac_path_SED"
6332      ac_path_SED_max=$ac_count
6333    fi
6334    # 10*(2^10) chars as input seems more than enough
6335    test $ac_count -gt 10 && break
6336  done
6337  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6338esac
6339
6340      $ac_path_SED_found && break 3
6341    done
6342  done
6343  done
6344IFS=$as_save_IFS
6345  if test -z "$ac_cv_path_SED"; then
6346    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6347  fi
6348else
6349  ac_cv_path_SED=$SED
6350fi
6351
6352fi
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6354$as_echo "$ac_cv_path_SED" >&6; }
6355 SED="$ac_cv_path_SED"
6356  rm -f conftest.sed
6357
6358
6359    if test "x$SED" = x; then
6360        if test "x" = x; then
6361          PROG_NAME=sed
6362        else
6363          PROG_NAME=
6364        fi
6365        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6366$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6367        as_fn_error $? "Cannot continue" "$LINENO" 5
6368    fi
6369
6370
6371for ac_prog in nawk gawk awk
6372do
6373  # Extract the first word of "$ac_prog", so it can be a program name with args.
6374set dummy $ac_prog; ac_word=$2
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6376$as_echo_n "checking for $ac_word... " >&6; }
6377if ${ac_cv_path_NAWK+:} false; then :
6378  $as_echo_n "(cached) " >&6
6379else
6380  case $NAWK in
6381  [\\/]* | ?:[\\/]*)
6382  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6383  ;;
6384  *)
6385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6386for as_dir in $PATH
6387do
6388  IFS=$as_save_IFS
6389  test -z "$as_dir" && as_dir=.
6390    for ac_exec_ext in '' $ac_executable_extensions; do
6391  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6392    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6394    break 2
6395  fi
6396done
6397  done
6398IFS=$as_save_IFS
6399
6400  ;;
6401esac
6402fi
6403NAWK=$ac_cv_path_NAWK
6404if test -n "$NAWK"; then
6405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6406$as_echo "$NAWK" >&6; }
6407else
6408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409$as_echo "no" >&6; }
6410fi
6411
6412
6413  test -n "$NAWK" && break
6414done
6415
6416
6417    if test "x$NAWK" = x; then
6418        if test "x" = x; then
6419          PROG_NAME=nawk
6420        else
6421          PROG_NAME=
6422        fi
6423        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6424$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6425        as_fn_error $? "Cannot continue" "$LINENO" 5
6426    fi
6427
6428
6429# Always force rm.
6430RM="$RM -f"
6431
6432# These are not required on all platforms
6433# Extract the first word of "cygpath", so it can be a program name with args.
6434set dummy cygpath; ac_word=$2
6435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6436$as_echo_n "checking for $ac_word... " >&6; }
6437if ${ac_cv_path_CYGPATH+:} false; then :
6438  $as_echo_n "(cached) " >&6
6439else
6440  case $CYGPATH in
6441  [\\/]* | ?:[\\/]*)
6442  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6443  ;;
6444  *)
6445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6446for as_dir in $PATH
6447do
6448  IFS=$as_save_IFS
6449  test -z "$as_dir" && as_dir=.
6450    for ac_exec_ext in '' $ac_executable_extensions; do
6451  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6452    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6454    break 2
6455  fi
6456done
6457  done
6458IFS=$as_save_IFS
6459
6460  ;;
6461esac
6462fi
6463CYGPATH=$ac_cv_path_CYGPATH
6464if test -n "$CYGPATH"; then
6465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6466$as_echo "$CYGPATH" >&6; }
6467else
6468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6469$as_echo "no" >&6; }
6470fi
6471
6472
6473# Extract the first word of "readlink", so it can be a program name with args.
6474set dummy readlink; ac_word=$2
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6476$as_echo_n "checking for $ac_word... " >&6; }
6477if ${ac_cv_path_READLINK+:} false; then :
6478  $as_echo_n "(cached) " >&6
6479else
6480  case $READLINK in
6481  [\\/]* | ?:[\\/]*)
6482  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6483  ;;
6484  *)
6485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6486for as_dir in $PATH
6487do
6488  IFS=$as_save_IFS
6489  test -z "$as_dir" && as_dir=.
6490    for ac_exec_ext in '' $ac_executable_extensions; do
6491  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6492    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6494    break 2
6495  fi
6496done
6497  done
6498IFS=$as_save_IFS
6499
6500  ;;
6501esac
6502fi
6503READLINK=$ac_cv_path_READLINK
6504if test -n "$READLINK"; then
6505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6506$as_echo "$READLINK" >&6; }
6507else
6508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509$as_echo "no" >&6; }
6510fi
6511
6512
6513# Extract the first word of "df", so it can be a program name with args.
6514set dummy df; ac_word=$2
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516$as_echo_n "checking for $ac_word... " >&6; }
6517if ${ac_cv_path_DF+:} false; then :
6518  $as_echo_n "(cached) " >&6
6519else
6520  case $DF in
6521  [\\/]* | ?:[\\/]*)
6522  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6523  ;;
6524  *)
6525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526for as_dir in $PATH
6527do
6528  IFS=$as_save_IFS
6529  test -z "$as_dir" && as_dir=.
6530    for ac_exec_ext in '' $ac_executable_extensions; do
6531  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6532    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534    break 2
6535  fi
6536done
6537  done
6538IFS=$as_save_IFS
6539
6540  ;;
6541esac
6542fi
6543DF=$ac_cv_path_DF
6544if test -n "$DF"; then
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6546$as_echo "$DF" >&6; }
6547else
6548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549$as_echo "no" >&6; }
6550fi
6551
6552
6553# Extract the first word of "SetFile", so it can be a program name with args.
6554set dummy SetFile; ac_word=$2
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6556$as_echo_n "checking for $ac_word... " >&6; }
6557if ${ac_cv_path_SETFILE+:} false; then :
6558  $as_echo_n "(cached) " >&6
6559else
6560  case $SETFILE in
6561  [\\/]* | ?:[\\/]*)
6562  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6563  ;;
6564  *)
6565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6566for as_dir in $PATH
6567do
6568  IFS=$as_save_IFS
6569  test -z "$as_dir" && as_dir=.
6570    for ac_exec_ext in '' $ac_executable_extensions; do
6571  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6572    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6574    break 2
6575  fi
6576done
6577  done
6578IFS=$as_save_IFS
6579
6580  ;;
6581esac
6582fi
6583SETFILE=$ac_cv_path_SETFILE
6584if test -n "$SETFILE"; then
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6586$as_echo "$SETFILE" >&6; }
6587else
6588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6589$as_echo "no" >&6; }
6590fi
6591
6592
6593
6594
6595# Now we can determine OpenJDK build and target platforms. This is required to
6596# have early on.
6597# Make sure we can run config.sub.
6598$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6599  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6600
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6602$as_echo_n "checking build system type... " >&6; }
6603if ${ac_cv_build+:} false; then :
6604  $as_echo_n "(cached) " >&6
6605else
6606  ac_build_alias=$build_alias
6607test "x$ac_build_alias" = x &&
6608  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6609test "x$ac_build_alias" = x &&
6610  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6611ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6612  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6613
6614fi
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6616$as_echo "$ac_cv_build" >&6; }
6617case $ac_cv_build in
6618*-*-*) ;;
6619*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6620esac
6621build=$ac_cv_build
6622ac_save_IFS=$IFS; IFS='-'
6623set x $ac_cv_build
6624shift
6625build_cpu=$1
6626build_vendor=$2
6627shift; shift
6628# Remember, the first character of IFS is used to create $*,
6629# except with old shells:
6630build_os=$*
6631IFS=$ac_save_IFS
6632case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6633
6634
6635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6636$as_echo_n "checking host system type... " >&6; }
6637if ${ac_cv_host+:} false; then :
6638  $as_echo_n "(cached) " >&6
6639else
6640  if test "x$host_alias" = x; then
6641  ac_cv_host=$ac_cv_build
6642else
6643  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6644    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6645fi
6646
6647fi
6648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6649$as_echo "$ac_cv_host" >&6; }
6650case $ac_cv_host in
6651*-*-*) ;;
6652*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6653esac
6654host=$ac_cv_host
6655ac_save_IFS=$IFS; IFS='-'
6656set x $ac_cv_host
6657shift
6658host_cpu=$1
6659host_vendor=$2
6660shift; shift
6661# Remember, the first character of IFS is used to create $*,
6662# except with old shells:
6663host_os=$*
6664IFS=$ac_save_IFS
6665case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6666
6667
6668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6669$as_echo_n "checking target system type... " >&6; }
6670if ${ac_cv_target+:} false; then :
6671  $as_echo_n "(cached) " >&6
6672else
6673  if test "x$target_alias" = x; then
6674  ac_cv_target=$ac_cv_host
6675else
6676  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6677    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6678fi
6679
6680fi
6681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6682$as_echo "$ac_cv_target" >&6; }
6683case $ac_cv_target in
6684*-*-*) ;;
6685*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6686esac
6687target=$ac_cv_target
6688ac_save_IFS=$IFS; IFS='-'
6689set x $ac_cv_target
6690shift
6691target_cpu=$1
6692target_vendor=$2
6693shift; shift
6694# Remember, the first character of IFS is used to create $*,
6695# except with old shells:
6696target_os=$*
6697IFS=$ac_save_IFS
6698case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6699
6700
6701# The aliases save the names the user supplied, while $host etc.
6702# will get canonicalized.
6703test -n "$target_alias" &&
6704  test "$program_prefix$program_suffix$program_transform_name" = \
6705    NONENONEs,x,x, &&
6706  program_prefix=${target_alias}-
6707ac_ext=c
6708ac_cpp='$CPP $CPPFLAGS'
6709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6711ac_compiler_gnu=$ac_cv_c_compiler_gnu
6712if test -n "$ac_tool_prefix"; then
6713  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
6714set dummy ${ac_tool_prefix}gcc; ac_word=$2
6715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6716$as_echo_n "checking for $ac_word... " >&6; }
6717if ${ac_cv_prog_CC+:} false; then :
6718  $as_echo_n "(cached) " >&6
6719else
6720  if test -n "$CC"; then
6721  ac_cv_prog_CC="$CC" # Let the user override the test.
6722else
6723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6724for as_dir in $PATH
6725do
6726  IFS=$as_save_IFS
6727  test -z "$as_dir" && as_dir=.
6728    for ac_exec_ext in '' $ac_executable_extensions; do
6729  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6730    ac_cv_prog_CC="${ac_tool_prefix}gcc"
6731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6732    break 2
6733  fi
6734done
6735  done
6736IFS=$as_save_IFS
6737
6738fi
6739fi
6740CC=$ac_cv_prog_CC
6741if test -n "$CC"; then
6742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6743$as_echo "$CC" >&6; }
6744else
6745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6746$as_echo "no" >&6; }
6747fi
6748
6749
6750fi
6751if test -z "$ac_cv_prog_CC"; then
6752  ac_ct_CC=$CC
6753  # Extract the first word of "gcc", so it can be a program name with args.
6754set dummy gcc; ac_word=$2
6755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6756$as_echo_n "checking for $ac_word... " >&6; }
6757if ${ac_cv_prog_ac_ct_CC+:} false; then :
6758  $as_echo_n "(cached) " >&6
6759else
6760  if test -n "$ac_ct_CC"; then
6761  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6762else
6763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6764for as_dir in $PATH
6765do
6766  IFS=$as_save_IFS
6767  test -z "$as_dir" && as_dir=.
6768    for ac_exec_ext in '' $ac_executable_extensions; do
6769  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6770    ac_cv_prog_ac_ct_CC="gcc"
6771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6772    break 2
6773  fi
6774done
6775  done
6776IFS=$as_save_IFS
6777
6778fi
6779fi
6780ac_ct_CC=$ac_cv_prog_ac_ct_CC
6781if test -n "$ac_ct_CC"; then
6782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6783$as_echo "$ac_ct_CC" >&6; }
6784else
6785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6786$as_echo "no" >&6; }
6787fi
6788
6789  if test "x$ac_ct_CC" = x; then
6790    CC=""
6791  else
6792    case $cross_compiling:$ac_tool_warned in
6793yes:)
6794{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6795$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6796ac_tool_warned=yes ;;
6797esac
6798    CC=$ac_ct_CC
6799  fi
6800else
6801  CC="$ac_cv_prog_CC"
6802fi
6803
6804if test -z "$CC"; then
6805          if test -n "$ac_tool_prefix"; then
6806    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6807set dummy ${ac_tool_prefix}cc; ac_word=$2
6808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6809$as_echo_n "checking for $ac_word... " >&6; }
6810if ${ac_cv_prog_CC+:} false; then :
6811  $as_echo_n "(cached) " >&6
6812else
6813  if test -n "$CC"; then
6814  ac_cv_prog_CC="$CC" # Let the user override the test.
6815else
6816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6817for as_dir in $PATH
6818do
6819  IFS=$as_save_IFS
6820  test -z "$as_dir" && as_dir=.
6821    for ac_exec_ext in '' $ac_executable_extensions; do
6822  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6823    ac_cv_prog_CC="${ac_tool_prefix}cc"
6824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6825    break 2
6826  fi
6827done
6828  done
6829IFS=$as_save_IFS
6830
6831fi
6832fi
6833CC=$ac_cv_prog_CC
6834if test -n "$CC"; then
6835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6836$as_echo "$CC" >&6; }
6837else
6838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6839$as_echo "no" >&6; }
6840fi
6841
6842
6843  fi
6844fi
6845if test -z "$CC"; then
6846  # Extract the first word of "cc", so it can be a program name with args.
6847set dummy cc; ac_word=$2
6848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6849$as_echo_n "checking for $ac_word... " >&6; }
6850if ${ac_cv_prog_CC+:} false; then :
6851  $as_echo_n "(cached) " >&6
6852else
6853  if test -n "$CC"; then
6854  ac_cv_prog_CC="$CC" # Let the user override the test.
6855else
6856  ac_prog_rejected=no
6857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6858for as_dir in $PATH
6859do
6860  IFS=$as_save_IFS
6861  test -z "$as_dir" && as_dir=.
6862    for ac_exec_ext in '' $ac_executable_extensions; do
6863  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6864    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6865       ac_prog_rejected=yes
6866       continue
6867     fi
6868    ac_cv_prog_CC="cc"
6869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6870    break 2
6871  fi
6872done
6873  done
6874IFS=$as_save_IFS
6875
6876if test $ac_prog_rejected = yes; then
6877  # We found a bogon in the path, so make sure we never use it.
6878  set dummy $ac_cv_prog_CC
6879  shift
6880  if test $# != 0; then
6881    # We chose a different compiler from the bogus one.
6882    # However, it has the same basename, so the bogon will be chosen
6883    # first if we set CC to just the basename; use the full file name.
6884    shift
6885    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6886  fi
6887fi
6888fi
6889fi
6890CC=$ac_cv_prog_CC
6891if test -n "$CC"; then
6892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6893$as_echo "$CC" >&6; }
6894else
6895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6896$as_echo "no" >&6; }
6897fi
6898
6899
6900fi
6901if test -z "$CC"; then
6902  if test -n "$ac_tool_prefix"; then
6903  for ac_prog in cl.exe
6904  do
6905    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6906set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6908$as_echo_n "checking for $ac_word... " >&6; }
6909if ${ac_cv_prog_CC+:} false; then :
6910  $as_echo_n "(cached) " >&6
6911else
6912  if test -n "$CC"; then
6913  ac_cv_prog_CC="$CC" # Let the user override the test.
6914else
6915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6916for as_dir in $PATH
6917do
6918  IFS=$as_save_IFS
6919  test -z "$as_dir" && as_dir=.
6920    for ac_exec_ext in '' $ac_executable_extensions; do
6921  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6922    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6924    break 2
6925  fi
6926done
6927  done
6928IFS=$as_save_IFS
6929
6930fi
6931fi
6932CC=$ac_cv_prog_CC
6933if test -n "$CC"; then
6934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6935$as_echo "$CC" >&6; }
6936else
6937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6938$as_echo "no" >&6; }
6939fi
6940
6941
6942    test -n "$CC" && break
6943  done
6944fi
6945if test -z "$CC"; then
6946  ac_ct_CC=$CC
6947  for ac_prog in cl.exe
6948do
6949  # Extract the first word of "$ac_prog", so it can be a program name with args.
6950set dummy $ac_prog; ac_word=$2
6951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6952$as_echo_n "checking for $ac_word... " >&6; }
6953if ${ac_cv_prog_ac_ct_CC+:} false; then :
6954  $as_echo_n "(cached) " >&6
6955else
6956  if test -n "$ac_ct_CC"; then
6957  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6958else
6959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6960for as_dir in $PATH
6961do
6962  IFS=$as_save_IFS
6963  test -z "$as_dir" && as_dir=.
6964    for ac_exec_ext in '' $ac_executable_extensions; do
6965  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6966    ac_cv_prog_ac_ct_CC="$ac_prog"
6967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6968    break 2
6969  fi
6970done
6971  done
6972IFS=$as_save_IFS
6973
6974fi
6975fi
6976ac_ct_CC=$ac_cv_prog_ac_ct_CC
6977if test -n "$ac_ct_CC"; then
6978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6979$as_echo "$ac_ct_CC" >&6; }
6980else
6981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6982$as_echo "no" >&6; }
6983fi
6984
6985
6986  test -n "$ac_ct_CC" && break
6987done
6988
6989  if test "x$ac_ct_CC" = x; then
6990    CC=""
6991  else
6992    case $cross_compiling:$ac_tool_warned in
6993yes:)
6994{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6995$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6996ac_tool_warned=yes ;;
6997esac
6998    CC=$ac_ct_CC
6999  fi
7000fi
7001
7002fi
7003
7004
7005test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7007as_fn_error $? "no acceptable C compiler found in \$PATH
7008See \`config.log' for more details" "$LINENO" 5; }
7009
7010# Provide some information about the compiler.
7011$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
7012set X $ac_compile
7013ac_compiler=$2
7014for ac_option in --version -v -V -qversion; do
7015  { { ac_try="$ac_compiler $ac_option >&5"
7016case "(($ac_try" in
7017  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7018  *) ac_try_echo=$ac_try;;
7019esac
7020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7021$as_echo "$ac_try_echo"; } >&5
7022  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
7023  ac_status=$?
7024  if test -s conftest.err; then
7025    sed '10a\
7026... rest of stderr output deleted ...
7027         10q' conftest.err >conftest.er1
7028    cat conftest.er1 >&5
7029  fi
7030  rm -f conftest.er1 conftest.err
7031  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7032  test $ac_status = 0; }
7033done
7034
7035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7036/* end confdefs.h.  */
7037
7038int
7039main ()
7040{
7041
7042  ;
7043  return 0;
7044}
7045_ACEOF
7046ac_clean_files_save=$ac_clean_files
7047ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
7048# Try to create an executable without -o first, disregard a.out.
7049# It will help us diagnose broken compilers, and finding out an intuition
7050# of exeext.
7051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
7052$as_echo_n "checking whether the C compiler works... " >&6; }
7053ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
7054
7055# The possible output files:
7056ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
7057
7058ac_rmfiles=
7059for ac_file in $ac_files
7060do
7061  case $ac_file in
7062    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
7063    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
7064  esac
7065done
7066rm -f $ac_rmfiles
7067
7068if { { ac_try="$ac_link_default"
7069case "(($ac_try" in
7070  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7071  *) ac_try_echo=$ac_try;;
7072esac
7073eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7074$as_echo "$ac_try_echo"; } >&5
7075  (eval "$ac_link_default") 2>&5
7076  ac_status=$?
7077  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7078  test $ac_status = 0; }; then :
7079  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
7080# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
7081# in a Makefile.  We should not override ac_cv_exeext if it was cached,
7082# so that the user can short-circuit this test for compilers unknown to
7083# Autoconf.
7084for ac_file in $ac_files ''
7085do
7086  test -f "$ac_file" || continue
7087  case $ac_file in
7088    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
7089	;;
7090    [ab].out )
7091	# We found the default executable, but exeext='' is most
7092	# certainly right.
7093	break;;
7094    *.* )
7095	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
7096	then :; else
7097	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
7098	fi
7099	# We set ac_cv_exeext here because the later test for it is not
7100	# safe: cross compilers may not add the suffix if given an `-o'
7101	# argument, so we may need to know it at that point already.
7102	# Even if this section looks crufty: it has the advantage of
7103	# actually working.
7104	break;;
7105    * )
7106	break;;
7107  esac
7108done
7109test "$ac_cv_exeext" = no && ac_cv_exeext=
7110
7111else
7112  ac_file=''
7113fi
7114if test -z "$ac_file"; then :
7115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7116$as_echo "no" >&6; }
7117$as_echo "$as_me: failed program was:" >&5
7118sed 's/^/| /' conftest.$ac_ext >&5
7119
7120{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7121$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7122as_fn_error 77 "C compiler cannot create executables
7123See \`config.log' for more details" "$LINENO" 5; }
7124else
7125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7126$as_echo "yes" >&6; }
7127fi
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
7129$as_echo_n "checking for C compiler default output file name... " >&6; }
7130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
7131$as_echo "$ac_file" >&6; }
7132ac_exeext=$ac_cv_exeext
7133
7134rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
7135ac_clean_files=$ac_clean_files_save
7136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
7137$as_echo_n "checking for suffix of executables... " >&6; }
7138if { { ac_try="$ac_link"
7139case "(($ac_try" in
7140  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7141  *) ac_try_echo=$ac_try;;
7142esac
7143eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7144$as_echo "$ac_try_echo"; } >&5
7145  (eval "$ac_link") 2>&5
7146  ac_status=$?
7147  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7148  test $ac_status = 0; }; then :
7149  # If both `conftest.exe' and `conftest' are `present' (well, observable)
7150# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
7151# work properly (i.e., refer to `conftest.exe'), while it won't with
7152# `rm'.
7153for ac_file in conftest.exe conftest conftest.*; do
7154  test -f "$ac_file" || continue
7155  case $ac_file in
7156    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
7157    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
7158	  break;;
7159    * ) break;;
7160  esac
7161done
7162else
7163  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7164$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7165as_fn_error $? "cannot compute suffix of executables: cannot compile and link
7166See \`config.log' for more details" "$LINENO" 5; }
7167fi
7168rm -f conftest conftest$ac_cv_exeext
7169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
7170$as_echo "$ac_cv_exeext" >&6; }
7171
7172rm -f conftest.$ac_ext
7173EXEEXT=$ac_cv_exeext
7174ac_exeext=$EXEEXT
7175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7176/* end confdefs.h.  */
7177#include <stdio.h>
7178int
7179main ()
7180{
7181FILE *f = fopen ("conftest.out", "w");
7182 return ferror (f) || fclose (f) != 0;
7183
7184  ;
7185  return 0;
7186}
7187_ACEOF
7188ac_clean_files="$ac_clean_files conftest.out"
7189# Check that the compiler produces executables we can run.  If not, either
7190# the compiler is broken, or we cross compile.
7191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
7192$as_echo_n "checking whether we are cross compiling... " >&6; }
7193if test "$cross_compiling" != yes; then
7194  { { ac_try="$ac_link"
7195case "(($ac_try" in
7196  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7197  *) ac_try_echo=$ac_try;;
7198esac
7199eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7200$as_echo "$ac_try_echo"; } >&5
7201  (eval "$ac_link") 2>&5
7202  ac_status=$?
7203  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7204  test $ac_status = 0; }
7205  if { ac_try='./conftest$ac_cv_exeext'
7206  { { case "(($ac_try" in
7207  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7208  *) ac_try_echo=$ac_try;;
7209esac
7210eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7211$as_echo "$ac_try_echo"; } >&5
7212  (eval "$ac_try") 2>&5
7213  ac_status=$?
7214  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7215  test $ac_status = 0; }; }; then
7216    cross_compiling=no
7217  else
7218    if test "$cross_compiling" = maybe; then
7219	cross_compiling=yes
7220    else
7221	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7222$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7223as_fn_error $? "cannot run C compiled programs.
7224If you meant to cross compile, use \`--host'.
7225See \`config.log' for more details" "$LINENO" 5; }
7226    fi
7227  fi
7228fi
7229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
7230$as_echo "$cross_compiling" >&6; }
7231
7232rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
7233ac_clean_files=$ac_clean_files_save
7234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
7235$as_echo_n "checking for suffix of object files... " >&6; }
7236if ${ac_cv_objext+:} false; then :
7237  $as_echo_n "(cached) " >&6
7238else
7239  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7240/* end confdefs.h.  */
7241
7242int
7243main ()
7244{
7245
7246  ;
7247  return 0;
7248}
7249_ACEOF
7250rm -f conftest.o conftest.obj
7251if { { ac_try="$ac_compile"
7252case "(($ac_try" in
7253  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7254  *) ac_try_echo=$ac_try;;
7255esac
7256eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7257$as_echo "$ac_try_echo"; } >&5
7258  (eval "$ac_compile") 2>&5
7259  ac_status=$?
7260  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7261  test $ac_status = 0; }; then :
7262  for ac_file in conftest.o conftest.obj conftest.*; do
7263  test -f "$ac_file" || continue;
7264  case $ac_file in
7265    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
7266    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
7267       break;;
7268  esac
7269done
7270else
7271  $as_echo "$as_me: failed program was:" >&5
7272sed 's/^/| /' conftest.$ac_ext >&5
7273
7274{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7276as_fn_error $? "cannot compute suffix of object files: cannot compile
7277See \`config.log' for more details" "$LINENO" 5; }
7278fi
7279rm -f conftest.$ac_cv_objext conftest.$ac_ext
7280fi
7281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
7282$as_echo "$ac_cv_objext" >&6; }
7283OBJEXT=$ac_cv_objext
7284ac_objext=$OBJEXT
7285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
7286$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
7287if ${ac_cv_c_compiler_gnu+:} false; then :
7288  $as_echo_n "(cached) " >&6
7289else
7290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7291/* end confdefs.h.  */
7292
7293int
7294main ()
7295{
7296#ifndef __GNUC__
7297       choke me
7298#endif
7299
7300  ;
7301  return 0;
7302}
7303_ACEOF
7304if ac_fn_c_try_compile "$LINENO"; then :
7305  ac_compiler_gnu=yes
7306else
7307  ac_compiler_gnu=no
7308fi
7309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7310ac_cv_c_compiler_gnu=$ac_compiler_gnu
7311
7312fi
7313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
7314$as_echo "$ac_cv_c_compiler_gnu" >&6; }
7315if test $ac_compiler_gnu = yes; then
7316  GCC=yes
7317else
7318  GCC=
7319fi
7320ac_test_CFLAGS=${CFLAGS+set}
7321ac_save_CFLAGS=$CFLAGS
7322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
7323$as_echo_n "checking whether $CC accepts -g... " >&6; }
7324if ${ac_cv_prog_cc_g+:} false; then :
7325  $as_echo_n "(cached) " >&6
7326else
7327  ac_save_c_werror_flag=$ac_c_werror_flag
7328   ac_c_werror_flag=yes
7329   ac_cv_prog_cc_g=no
7330   CFLAGS="-g"
7331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7332/* end confdefs.h.  */
7333
7334int
7335main ()
7336{
7337
7338  ;
7339  return 0;
7340}
7341_ACEOF
7342if ac_fn_c_try_compile "$LINENO"; then :
7343  ac_cv_prog_cc_g=yes
7344else
7345  CFLAGS=""
7346      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7347/* end confdefs.h.  */
7348
7349int
7350main ()
7351{
7352
7353  ;
7354  return 0;
7355}
7356_ACEOF
7357if ac_fn_c_try_compile "$LINENO"; then :
7358
7359else
7360  ac_c_werror_flag=$ac_save_c_werror_flag
7361	 CFLAGS="-g"
7362	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7363/* end confdefs.h.  */
7364
7365int
7366main ()
7367{
7368
7369  ;
7370  return 0;
7371}
7372_ACEOF
7373if ac_fn_c_try_compile "$LINENO"; then :
7374  ac_cv_prog_cc_g=yes
7375fi
7376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7377fi
7378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7379fi
7380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7381   ac_c_werror_flag=$ac_save_c_werror_flag
7382fi
7383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
7384$as_echo "$ac_cv_prog_cc_g" >&6; }
7385if test "$ac_test_CFLAGS" = set; then
7386  CFLAGS=$ac_save_CFLAGS
7387elif test $ac_cv_prog_cc_g = yes; then
7388  if test "$GCC" = yes; then
7389    CFLAGS="-g -O2"
7390  else
7391    CFLAGS="-g"
7392  fi
7393else
7394  if test "$GCC" = yes; then
7395    CFLAGS="-O2"
7396  else
7397    CFLAGS=
7398  fi
7399fi
7400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7401$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
7402if ${ac_cv_prog_cc_c89+:} false; then :
7403  $as_echo_n "(cached) " >&6
7404else
7405  ac_cv_prog_cc_c89=no
7406ac_save_CC=$CC
7407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7408/* end confdefs.h.  */
7409#include <stdarg.h>
7410#include <stdio.h>
7411#include <sys/types.h>
7412#include <sys/stat.h>
7413/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7414struct buf { int x; };
7415FILE * (*rcsopen) (struct buf *, struct stat *, int);
7416static char *e (p, i)
7417     char **p;
7418     int i;
7419{
7420  return p[i];
7421}
7422static char *f (char * (*g) (char **, int), char **p, ...)
7423{
7424  char *s;
7425  va_list v;
7426  va_start (v,p);
7427  s = g (p, va_arg (v,int));
7428  va_end (v);
7429  return s;
7430}
7431
7432/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
7433   function prototypes and stuff, but not '\xHH' hex character constants.
7434   These don't provoke an error unfortunately, instead are silently treated
7435   as 'x'.  The following induces an error, until -std is added to get
7436   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
7437   array size at least.  It's necessary to write '\x00'==0 to get something
7438   that's true only with -std.  */
7439int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7440
7441/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7442   inside strings and character constants.  */
7443#define FOO(x) 'x'
7444int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7445
7446int test (int i, double x);
7447struct s1 {int (*f) (int a);};
7448struct s2 {int (*f) (double a);};
7449int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7450int argc;
7451char **argv;
7452int
7453main ()
7454{
7455return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
7456  ;
7457  return 0;
7458}
7459_ACEOF
7460for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7461	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7462do
7463  CC="$ac_save_CC $ac_arg"
7464  if ac_fn_c_try_compile "$LINENO"; then :
7465  ac_cv_prog_cc_c89=$ac_arg
7466fi
7467rm -f core conftest.err conftest.$ac_objext
7468  test "x$ac_cv_prog_cc_c89" != "xno" && break
7469done
7470rm -f conftest.$ac_ext
7471CC=$ac_save_CC
7472
7473fi
7474# AC_CACHE_VAL
7475case "x$ac_cv_prog_cc_c89" in
7476  x)
7477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7478$as_echo "none needed" >&6; } ;;
7479  xno)
7480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7481$as_echo "unsupported" >&6; } ;;
7482  *)
7483    CC="$CC $ac_cv_prog_cc_c89"
7484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7485$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7486esac
7487if test "x$ac_cv_prog_cc_c89" != xno; then :
7488
7489fi
7490
7491ac_ext=c
7492ac_cpp='$CPP $CPPFLAGS'
7493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7495ac_compiler_gnu=$ac_cv_c_compiler_gnu
7496
7497
7498ac_ext=cpp
7499ac_cpp='$CXXCPP $CPPFLAGS'
7500ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7501ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7502ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7503if test -z "$CXX"; then
7504  if test -n "$CCC"; then
7505    CXX=$CCC
7506  else
7507    if test -n "$ac_tool_prefix"; then
7508  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
7509  do
7510    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7511set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7513$as_echo_n "checking for $ac_word... " >&6; }
7514if ${ac_cv_prog_CXX+:} false; then :
7515  $as_echo_n "(cached) " >&6
7516else
7517  if test -n "$CXX"; then
7518  ac_cv_prog_CXX="$CXX" # Let the user override the test.
7519else
7520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7521for as_dir in $PATH
7522do
7523  IFS=$as_save_IFS
7524  test -z "$as_dir" && as_dir=.
7525    for ac_exec_ext in '' $ac_executable_extensions; do
7526  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7527    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
7528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7529    break 2
7530  fi
7531done
7532  done
7533IFS=$as_save_IFS
7534
7535fi
7536fi
7537CXX=$ac_cv_prog_CXX
7538if test -n "$CXX"; then
7539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
7540$as_echo "$CXX" >&6; }
7541else
7542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7543$as_echo "no" >&6; }
7544fi
7545
7546
7547    test -n "$CXX" && break
7548  done
7549fi
7550if test -z "$CXX"; then
7551  ac_ct_CXX=$CXX
7552  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
7553do
7554  # Extract the first word of "$ac_prog", so it can be a program name with args.
7555set dummy $ac_prog; ac_word=$2
7556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7557$as_echo_n "checking for $ac_word... " >&6; }
7558if ${ac_cv_prog_ac_ct_CXX+:} false; then :
7559  $as_echo_n "(cached) " >&6
7560else
7561  if test -n "$ac_ct_CXX"; then
7562  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
7563else
7564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7565for as_dir in $PATH
7566do
7567  IFS=$as_save_IFS
7568  test -z "$as_dir" && as_dir=.
7569    for ac_exec_ext in '' $ac_executable_extensions; do
7570  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7571    ac_cv_prog_ac_ct_CXX="$ac_prog"
7572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7573    break 2
7574  fi
7575done
7576  done
7577IFS=$as_save_IFS
7578
7579fi
7580fi
7581ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
7582if test -n "$ac_ct_CXX"; then
7583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
7584$as_echo "$ac_ct_CXX" >&6; }
7585else
7586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7587$as_echo "no" >&6; }
7588fi
7589
7590
7591  test -n "$ac_ct_CXX" && break
7592done
7593
7594  if test "x$ac_ct_CXX" = x; then
7595    CXX="g++"
7596  else
7597    case $cross_compiling:$ac_tool_warned in
7598yes:)
7599{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7600$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7601ac_tool_warned=yes ;;
7602esac
7603    CXX=$ac_ct_CXX
7604  fi
7605fi
7606
7607  fi
7608fi
7609# Provide some information about the compiler.
7610$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
7611set X $ac_compile
7612ac_compiler=$2
7613for ac_option in --version -v -V -qversion; do
7614  { { ac_try="$ac_compiler $ac_option >&5"
7615case "(($ac_try" in
7616  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7617  *) ac_try_echo=$ac_try;;
7618esac
7619eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7620$as_echo "$ac_try_echo"; } >&5
7621  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
7622  ac_status=$?
7623  if test -s conftest.err; then
7624    sed '10a\
7625... rest of stderr output deleted ...
7626         10q' conftest.err >conftest.er1
7627    cat conftest.er1 >&5
7628  fi
7629  rm -f conftest.er1 conftest.err
7630  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7631  test $ac_status = 0; }
7632done
7633
7634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
7635$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
7636if ${ac_cv_cxx_compiler_gnu+:} false; then :
7637  $as_echo_n "(cached) " >&6
7638else
7639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7640/* end confdefs.h.  */
7641
7642int
7643main ()
7644{
7645#ifndef __GNUC__
7646       choke me
7647#endif
7648
7649  ;
7650  return 0;
7651}
7652_ACEOF
7653if ac_fn_cxx_try_compile "$LINENO"; then :
7654  ac_compiler_gnu=yes
7655else
7656  ac_compiler_gnu=no
7657fi
7658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7659ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
7660
7661fi
7662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
7663$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
7664if test $ac_compiler_gnu = yes; then
7665  GXX=yes
7666else
7667  GXX=
7668fi
7669ac_test_CXXFLAGS=${CXXFLAGS+set}
7670ac_save_CXXFLAGS=$CXXFLAGS
7671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
7672$as_echo_n "checking whether $CXX accepts -g... " >&6; }
7673if ${ac_cv_prog_cxx_g+:} false; then :
7674  $as_echo_n "(cached) " >&6
7675else
7676  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7677   ac_cxx_werror_flag=yes
7678   ac_cv_prog_cxx_g=no
7679   CXXFLAGS="-g"
7680   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7681/* end confdefs.h.  */
7682
7683int
7684main ()
7685{
7686
7687  ;
7688  return 0;
7689}
7690_ACEOF
7691if ac_fn_cxx_try_compile "$LINENO"; then :
7692  ac_cv_prog_cxx_g=yes
7693else
7694  CXXFLAGS=""
7695      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7696/* end confdefs.h.  */
7697
7698int
7699main ()
7700{
7701
7702  ;
7703  return 0;
7704}
7705_ACEOF
7706if ac_fn_cxx_try_compile "$LINENO"; then :
7707
7708else
7709  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7710	 CXXFLAGS="-g"
7711	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7712/* end confdefs.h.  */
7713
7714int
7715main ()
7716{
7717
7718  ;
7719  return 0;
7720}
7721_ACEOF
7722if ac_fn_cxx_try_compile "$LINENO"; then :
7723  ac_cv_prog_cxx_g=yes
7724fi
7725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7726fi
7727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7728fi
7729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7730   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7731fi
7732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
7733$as_echo "$ac_cv_prog_cxx_g" >&6; }
7734if test "$ac_test_CXXFLAGS" = set; then
7735  CXXFLAGS=$ac_save_CXXFLAGS
7736elif test $ac_cv_prog_cxx_g = yes; then
7737  if test "$GXX" = yes; then
7738    CXXFLAGS="-g -O2"
7739  else
7740    CXXFLAGS="-g"
7741  fi
7742else
7743  if test "$GXX" = yes; then
7744    CXXFLAGS="-O2"
7745  else
7746    CXXFLAGS=
7747  fi
7748fi
7749ac_ext=cpp
7750ac_cpp='$CXXCPP $CPPFLAGS'
7751ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7752ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7753ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7754
7755
7756
7757# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
7758# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
7759# product you're building. The target of this build is called "host". Since this is confusing to most people, we
7760# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
7761# to use the configure naming style.
7762
7763
7764
7765
7766
7767    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
7768    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
7769    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
7770    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
7771    OPENJDK_TARGET_AUTOCONF_NAME="$host"
7772    OPENJDK_BUILD_AUTOCONF_NAME="$build"
7773
7774
7775
7776    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
7777
7778  case "$build_os" in
7779    *linux*)
7780      VAR_OS=linux
7781      VAR_OS_API=posix
7782      VAR_OS_ENV=linux
7783      ;;
7784    *solaris*)
7785      VAR_OS=solaris
7786      VAR_OS_API=posix
7787      VAR_OS_ENV=solaris
7788      ;;
7789    *darwin*)
7790      VAR_OS=macosx
7791      VAR_OS_API=posix
7792      VAR_OS_ENV=macosx
7793      ;;
7794    *bsd*)
7795      VAR_OS=bsd
7796      VAR_OS_API=posix
7797      VAR_OS_ENV=bsd
7798      ;;
7799    *cygwin*)
7800      VAR_OS=windows
7801      VAR_OS_API=winapi
7802      VAR_OS_ENV=windows.cygwin
7803      ;;
7804    *mingw*)
7805      VAR_OS=windows
7806      VAR_OS_API=winapi
7807      VAR_OS_ENV=windows.msys
7808      ;;
7809    *)
7810      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
7811      ;;
7812  esac
7813
7814
7815  # First argument is the cpu name from the trip/quad
7816  case "$build_cpu" in
7817    x86_64)
7818      VAR_CPU=x86_64
7819      VAR_CPU_ARCH=x86
7820      VAR_CPU_BITS=64
7821      VAR_CPU_ENDIAN=little
7822      ;;
7823    i?86)
7824      VAR_CPU=x86
7825      VAR_CPU_ARCH=x86
7826      VAR_CPU_BITS=32
7827      VAR_CPU_ENDIAN=little
7828      ;;
7829    arm*)
7830      VAR_CPU=arm
7831      VAR_CPU_ARCH=arm
7832      VAR_CPU_BITS=32
7833      VAR_CPU_ENDIAN=little
7834      ;;
7835    powerpc)
7836      VAR_CPU=ppc
7837      VAR_CPU_ARCH=ppc
7838      VAR_CPU_BITS=32
7839      VAR_CPU_ENDIAN=big
7840       ;;
7841    powerpc64)
7842      VAR_CPU=ppc64
7843      VAR_CPU_ARCH=ppc
7844      VAR_CPU_BITS=64
7845      VAR_CPU_ENDIAN=big
7846       ;;
7847    sparc)
7848      VAR_CPU=sparc
7849      VAR_CPU_ARCH=sparc
7850      VAR_CPU_BITS=32
7851      VAR_CPU_ENDIAN=big
7852       ;;
7853    sparcv9)
7854      VAR_CPU=sparcv9
7855      VAR_CPU_ARCH=sparc
7856      VAR_CPU_BITS=64
7857      VAR_CPU_ENDIAN=big
7858       ;;
7859    *)
7860      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
7861      ;;
7862  esac
7863
7864    # ..and setup our own variables. (Do this explicitely to facilitate searching)
7865    OPENJDK_BUILD_OS="$VAR_OS"
7866    OPENJDK_BUILD_OS_API="$VAR_OS_API"
7867    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
7868    OPENJDK_BUILD_CPU="$VAR_CPU"
7869    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
7870    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
7871    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
7872
7873
7874
7875
7876
7877
7878
7879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
7880$as_echo_n "checking openjdk-build os-cpu... " >&6; }
7881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
7882$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
7883
7884    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
7885
7886  case "$host_os" in
7887    *linux*)
7888      VAR_OS=linux
7889      VAR_OS_API=posix
7890      VAR_OS_ENV=linux
7891      ;;
7892    *solaris*)
7893      VAR_OS=solaris
7894      VAR_OS_API=posix
7895      VAR_OS_ENV=solaris
7896      ;;
7897    *darwin*)
7898      VAR_OS=macosx
7899      VAR_OS_API=posix
7900      VAR_OS_ENV=macosx
7901      ;;
7902    *bsd*)
7903      VAR_OS=bsd
7904      VAR_OS_API=posix
7905      VAR_OS_ENV=bsd
7906      ;;
7907    *cygwin*)
7908      VAR_OS=windows
7909      VAR_OS_API=winapi
7910      VAR_OS_ENV=windows.cygwin
7911      ;;
7912    *mingw*)
7913      VAR_OS=windows
7914      VAR_OS_API=winapi
7915      VAR_OS_ENV=windows.msys
7916      ;;
7917    *)
7918      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
7919      ;;
7920  esac
7921
7922
7923  # First argument is the cpu name from the trip/quad
7924  case "$host_cpu" in
7925    x86_64)
7926      VAR_CPU=x86_64
7927      VAR_CPU_ARCH=x86
7928      VAR_CPU_BITS=64
7929      VAR_CPU_ENDIAN=little
7930      ;;
7931    i?86)
7932      VAR_CPU=x86
7933      VAR_CPU_ARCH=x86
7934      VAR_CPU_BITS=32
7935      VAR_CPU_ENDIAN=little
7936      ;;
7937    arm*)
7938      VAR_CPU=arm
7939      VAR_CPU_ARCH=arm
7940      VAR_CPU_BITS=32
7941      VAR_CPU_ENDIAN=little
7942      ;;
7943    powerpc)
7944      VAR_CPU=ppc
7945      VAR_CPU_ARCH=ppc
7946      VAR_CPU_BITS=32
7947      VAR_CPU_ENDIAN=big
7948       ;;
7949    powerpc64)
7950      VAR_CPU=ppc64
7951      VAR_CPU_ARCH=ppc
7952      VAR_CPU_BITS=64
7953      VAR_CPU_ENDIAN=big
7954       ;;
7955    sparc)
7956      VAR_CPU=sparc
7957      VAR_CPU_ARCH=sparc
7958      VAR_CPU_BITS=32
7959      VAR_CPU_ENDIAN=big
7960       ;;
7961    sparcv9)
7962      VAR_CPU=sparcv9
7963      VAR_CPU_ARCH=sparc
7964      VAR_CPU_BITS=64
7965      VAR_CPU_ENDIAN=big
7966       ;;
7967    *)
7968      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
7969      ;;
7970  esac
7971
7972    # ... and setup our own variables. (Do this explicitely to facilitate searching)
7973    OPENJDK_TARGET_OS="$VAR_OS"
7974    OPENJDK_TARGET_OS_API="$VAR_OS_API"
7975    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
7976    OPENJDK_TARGET_CPU="$VAR_CPU"
7977    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
7978    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
7979    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
7980
7981
7982
7983
7984
7985
7986
7987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
7988$as_echo_n "checking openjdk-target os-cpu... " >&6; }
7989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
7990$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
7991
7992
7993
7994# Check whether --with-target-bits was given.
7995if test "${with_target_bits+set}" = set; then :
7996  withval=$with_target_bits;
7997fi
7998
7999
8000  # We have three types of compiles:
8001  # native  == normal compilation, target system == build system
8002  # cross   == traditional cross compilation, target system != build system; special toolchain needed
8003  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
8004  #
8005  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
8006    # We're doing a proper cross-compilation
8007    COMPILE_TYPE="cross"
8008  else
8009    COMPILE_TYPE="native"
8010  fi
8011
8012  if test "x$with_target_bits" != x; then
8013    if test "x$COMPILE_TYPE" = "xcross"; then
8014      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
8015    fi
8016
8017    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
8018      # A reduced build is requested
8019      COMPILE_TYPE="reduced"
8020      OPENJDK_TARGET_CPU_BITS=32
8021      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
8022        OPENJDK_TARGET_CPU=x86
8023      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
8024        OPENJDK_TARGET_CPU=sparc
8025      else
8026        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
8027      fi
8028    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
8029      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
8030    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
8031      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
8032$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
8033    else
8034      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
8035    fi
8036  fi
8037
8038
8039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
8040$as_echo_n "checking compilation type... " >&6; }
8041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
8042$as_echo "$COMPILE_TYPE" >&6; }
8043
8044
8045    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
8046       REQUIRED_OS_NAME=SunOS
8047       REQUIRED_OS_VERSION=5.10
8048    fi
8049    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
8050       REQUIRED_OS_NAME=Linux
8051       REQUIRED_OS_VERSION=2.6
8052    fi
8053    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
8054        REQUIRED_OS_NAME=Windows
8055        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
8056            REQUIRED_OS_VERSION=5.2
8057        else
8058            REQUIRED_OS_VERSION=5.1
8059        fi
8060    fi
8061    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
8062        REQUIRED_OS_NAME=Darwin
8063        REQUIRED_OS_VERSION=11.2
8064    fi
8065
8066
8067
8068
8069
8070    # Also store the legacy naming of the cpu.
8071    # Ie i586 and amd64 instead of x86 and x86_64
8072    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
8073    if test "x$OPENJDK_TARGET_CPU" = xx86; then
8074      OPENJDK_TARGET_CPU_LEGACY="i586"
8075    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
8076      # On all platforms except MacOSX replace x86_64 with amd64.
8077      OPENJDK_TARGET_CPU_LEGACY="amd64"
8078    fi
8079
8080
8081    # And the second legacy naming of the cpu.
8082    # Ie i386 and amd64 instead of x86 and x86_64.
8083    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
8084    if test "x$OPENJDK_TARGET_CPU" = xx86; then
8085      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
8086    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
8087      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
8088    fi
8089
8090
8091    # This is the name of the cpu (but using i386 and amd64 instead of
8092    # x86 and x86_64, respectively), preceeded by a /, to be used when
8093    # locating libraries. On macosx, it's empty, though.
8094    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
8095    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
8096        OPENJDK_TARGET_CPU_LIBDIR=""
8097    fi
8098
8099
8100    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
8101    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
8102    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
8103    OPENJDK_TARGET_CPU_ISADIR=""
8104    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
8105      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
8106          OPENJDK_TARGET_CPU_ISADIR="/amd64"
8107      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
8108          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
8109      fi
8110    fi
8111
8112
8113    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
8114    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
8115    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
8116      # On linux only, we replace x86 with i386.
8117      OPENJDK_TARGET_CPU_OSARCH="i386"
8118    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
8119      # On all platforms except macosx, we replace x86_64 with amd64.
8120      OPENJDK_TARGET_CPU_OSARCH="amd64"
8121    fi
8122
8123
8124    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
8125    if test "x$OPENJDK_TARGET_CPU" = xx86; then
8126      OPENJDK_TARGET_CPU_JLI="i386"
8127    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
8128      # On all platforms except macosx, we replace x86_64 with amd64.
8129      OPENJDK_TARGET_CPU_JLI="amd64"
8130    fi
8131    # Now setup the -D flags for building libjli.
8132    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
8133    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
8134      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
8135        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
8136      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
8137        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
8138      fi
8139    fi
8140
8141
8142    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
8143    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
8144        OPENJDK_TARGET_OS_API_DIR="solaris"
8145    fi
8146    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
8147        OPENJDK_TARGET_OS_API_DIR="windows"
8148    fi
8149
8150
8151    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
8152        A_LP64="LP64:="
8153        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
8154        # unpack200.exe
8155        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
8156            ADD_LP64="-D_LP64=1"
8157        fi
8158    fi
8159    LP64=$A_LP64
8160
8161
8162    if test "x$COMPILE_TYPE" = "xcross"; then
8163      # FIXME: ... or should this include reduced builds..?
8164      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
8165    else
8166      DEFINE_CROSS_COMPILE_ARCH=""
8167    fi
8168
8169
8170    # Some Zero and Shark settings.
8171    # ZERO_ARCHFLAG tells the compiler which mode to build for
8172    case "${OPENJDK_TARGET_CPU}" in
8173      s390)
8174        ZERO_ARCHFLAG="-m31"
8175        ;;
8176      *)
8177        ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
8178    esac
8179
8180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
8181$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
8182  supports=yes
8183
8184  saved_cflags="$CFLAGS"
8185  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
8186  ac_ext=c
8187ac_cpp='$CPP $CPPFLAGS'
8188ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8189ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8190ac_compiler_gnu=$ac_cv_c_compiler_gnu
8191
8192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8193/* end confdefs.h.  */
8194
8195    int i;
8196
8197_ACEOF
8198if ac_fn_c_try_compile "$LINENO"; then :
8199
8200else
8201  supports=no
8202fi
8203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8204  ac_ext=c
8205ac_cpp='$CPP $CPPFLAGS'
8206ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8207ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8208ac_compiler_gnu=$ac_cv_c_compiler_gnu
8209
8210  CFLAGS="$saved_cflags"
8211
8212  saved_cxxflags="$CXXFLAGS"
8213  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
8214  ac_ext=cpp
8215ac_cpp='$CXXCPP $CPPFLAGS'
8216ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8217ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8218ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8219
8220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8221/* end confdefs.h.  */
8222
8223    int i;
8224
8225_ACEOF
8226if ac_fn_cxx_try_compile "$LINENO"; then :
8227
8228else
8229  supports=no
8230fi
8231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8232  ac_ext=c
8233ac_cpp='$CPP $CPPFLAGS'
8234ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8235ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8236ac_compiler_gnu=$ac_cv_c_compiler_gnu
8237
8238  CXXFLAGS="$saved_cxxflags"
8239
8240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
8241$as_echo "$supports" >&6; }
8242  if test "x$supports" = "xyes" ; then
8243    :
8244  else
8245    ZERO_ARCHFLAG=""
8246  fi
8247
8248
8249
8250    # ZERO_ARCHDEF is used to enable architecture-specific code
8251    case "${OPENJDK_TARGET_CPU}" in
8252      ppc*)    ZERO_ARCHDEF=PPC   ;;
8253      s390*)   ZERO_ARCHDEF=S390  ;;
8254      sparc*)  ZERO_ARCHDEF=SPARC ;;
8255      x86_64*) ZERO_ARCHDEF=AMD64 ;;
8256      x86)     ZERO_ARCHDEF=IA32  ;;
8257      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
8258    esac
8259
8260
8261
8262
8263
8264# Continue setting up basic stuff. Most remaining code require fundamental tools.
8265
8266# Locate the directory of this script.
8267SCRIPT="$0"
8268
8269    if test "x$OPENJDK_BUILD_OS" != xwindows; then
8270        # Follow a chain of symbolic links. Use readlink
8271        # where it exists, else fall back to horribly
8272        # complicated shell code.
8273        if test "x$READLINK_TESTED" != yes; then
8274            # On MacOSX there is a readlink tool with a different
8275            # purpose than the GNU readlink tool. Check the found readlink.
8276            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
8277            if test "x$ISGNU" = x; then
8278                 # A readlink that we do not know how to use.
8279                 # Are there other non-GNU readlinks out there?
8280                 READLINK_TESTED=yes
8281                 READLINK=
8282            fi
8283        fi
8284
8285        if test "x$READLINK" != x; then
8286            SCRIPT=`$READLINK -f $SCRIPT`
8287        else
8288            # Save the current directory for restoring afterwards
8289            STARTDIR=$PWD
8290            COUNTER=0
8291            sym_link_dir=`$DIRNAME $SCRIPT`
8292            sym_link_file=`$BASENAME $SCRIPT`
8293            # Use the system pwd and not the shell builtin to resolve directory symlinks
8294            cd $sym_link_dir
8295            cd `$THEPWDCMD`
8296            sym_link_dir=`$THEPWDCMD`
8297            # Resolve file symlinks
8298            while test $COUNTER -lt 20; do
8299                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
8300                if test "x$ISLINK" == x; then
8301                    # This is not a symbolic link! We are done!
8302                    break
8303                fi
8304                # Again resolve directory symlinks since the target of the just found
8305                # link could be in a different directory
8306                cd `$DIRNAME $ISLINK`
8307                sym_link_dir=`$THEPWDCMD`
8308                sym_link_file=`$BASENAME $ISLINK`
8309                let COUNTER=COUNTER+1
8310            done
8311            cd $STARTDIR
8312            SCRIPT=$sym_link_dir/$sym_link_file
8313        fi
8314    fi
8315
8316AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
8317
8318# Where is the source? It is located two levels above the configure script.
8319CURDIR="$PWD"
8320cd "$AUTOCONF_DIR/../.."
8321SRC_ROOT="`$THEPWDCMD`"
8322
8323if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
8324  PATH_SEP=";"
8325
8326  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
8327  if test $SRC_ROOT_LENGTH -gt 100; then
8328      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
8329  fi
8330
8331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
8333$as_echo_n "checking cygwin release... " >&6; }
8334    CYGWIN_VERSION=`$UNAME -r`
8335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
8336$as_echo "$CYGWIN_VERSION" >&6; }
8337    WINDOWS_ENV_VENDOR='cygwin'
8338    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
8339
8340    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
8341    if test "x$CYGWIN_VERSION_OK" = x; then
8342      { $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
8343$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;}
8344      as_fn_error $? "Cannot continue" "$LINENO" 5
8345    fi
8346    if test "x$CYGPATH" = x; then
8347        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
8348    fi
8349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
8350$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
8351    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
8352    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
8353    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
8354    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
8355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
8356$as_echo "$CYGWIN_ROOT_PATH" >&6; }
8357    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
8358    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
8359    if test "x$test_cygdrive_prefix" = x; then
8360        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
8361    fi
8362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
8364$as_echo_n "checking msys release... " >&6; }
8365    MSYS_VERSION=`$UNAME -r`
8366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
8367$as_echo "$MSYS_VERSION" >&6; }
8368
8369    WINDOWS_ENV_VENDOR='msys'
8370    WINDOWS_ENV_VERSION="$MSYS_VERSION"
8371
8372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
8373$as_echo_n "checking msys root directory as unix-style path... " >&6; }
8374    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
8375    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
8376
8377  windows_path="$MSYS_ROOT_PATH"
8378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8379    unix_path=`$CYGPATH -u "$windows_path"`
8380    MSYS_ROOT_PATH="$unix_path"
8381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8383    MSYS_ROOT_PATH="$unix_path"
8384  fi
8385
8386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
8387$as_echo "$MSYS_ROOT_PATH" >&6; }
8388    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
8389  else
8390    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
8391  fi
8392
8393  # Test if windows or unix (cygwin/msys) find is first in path.
8394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
8395$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
8396  FIND_BINARY_OUTPUT=`find --version 2>&1`
8397  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
8398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
8399$as_echo "unix style" >&6; }
8400  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
8401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
8402$as_echo "Windows" >&6; }
8403    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
8404$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
8405    { $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
8406$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
8407    as_fn_error $? "Cannot continue" "$LINENO" 5
8408  else
8409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
8410$as_echo "unknown" >&6; }
8411    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
8412$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
8413  fi
8414
8415else
8416  PATH_SEP=":"
8417fi
8418
8419
8420
8421cd "$CURDIR"
8422
8423
8424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8425
8426  # Input might be given as Windows format, start by converting to
8427  # unix format.
8428  path="$SRC_ROOT"
8429  new_path=`$CYGPATH -u "$path"`
8430
8431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8434  # "foo.exe" is OK but "foo" is an error.
8435  #
8436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8437  # It is also a way to make sure we got the proper file name for the real test later on.
8438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8439  if test "x$test_shortpath" = x; then
8440    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
8441$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
8442    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
8443  fi
8444
8445  # Call helper function which possibly converts this using DOS-style short mode.
8446  # If so, the updated path is stored in $new_path.
8447
8448  input_path="$new_path"
8449  # Check if we need to convert this using DOS-style short mode. If the path
8450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8451  # take no chances and rewrite it.
8452  # Note: m4 eats our [], so we need to use [ and ] instead.
8453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8454  if test "x$has_forbidden_chars" != x; then
8455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8459      # Going to short mode and back again did indeed matter. Since short mode is
8460      # case insensitive, let's make it lowercase to improve readability.
8461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8462      # Now convert it back to Unix-stile (cygpath)
8463      input_path=`$CYGPATH -u "$shortmode_path"`
8464      new_path="$input_path"
8465    fi
8466  fi
8467
8468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8469  if test "x$test_cygdrive_prefix" = x; then
8470    # As a simple fix, exclude /usr/bin since it's not a real path.
8471    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8473      # a path prefixed by /cygdrive for fixpath to work.
8474      new_path="$CYGWIN_ROOT_PATH$input_path"
8475    fi
8476  fi
8477
8478
8479  if test "x$path" != "x$new_path"; then
8480    SRC_ROOT="$new_path"
8481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
8482$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
8483  fi
8484
8485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8486
8487  path="$SRC_ROOT"
8488  has_colon=`$ECHO $path | $GREP ^.:`
8489  new_path="$path"
8490  if test "x$has_colon" = x; then
8491    # Not in mixed or Windows style, start by that.
8492    new_path=`cmd //c echo $path`
8493  fi
8494
8495
8496  input_path="$new_path"
8497  # Check if we need to convert this using DOS-style short mode. If the path
8498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8499  # take no chances and rewrite it.
8500  # Note: m4 eats our [], so we need to use [ and ] instead.
8501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8502  if test "x$has_forbidden_chars" != x; then
8503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8505  fi
8506
8507
8508  windows_path="$new_path"
8509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8510    unix_path=`$CYGPATH -u "$windows_path"`
8511    new_path="$unix_path"
8512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8514    new_path="$unix_path"
8515  fi
8516
8517  if test "x$path" != "x$new_path"; then
8518    SRC_ROOT="$new_path"
8519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
8520$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
8521  fi
8522
8523  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8524  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8525
8526  else
8527    # We're on a posix platform. Hooray! :)
8528    path="$SRC_ROOT"
8529
8530    if test ! -f "$path" && test ! -d "$path"; then
8531      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8532    fi
8533
8534    has_space=`$ECHO "$path" | $GREP " "`
8535    if test "x$has_space" != x; then
8536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
8537$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
8538      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8539    fi
8540  fi
8541
8542
8543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8544
8545  # Input might be given as Windows format, start by converting to
8546  # unix format.
8547  path="$CURDIR"
8548  new_path=`$CYGPATH -u "$path"`
8549
8550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8553  # "foo.exe" is OK but "foo" is an error.
8554  #
8555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8556  # It is also a way to make sure we got the proper file name for the real test later on.
8557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8558  if test "x$test_shortpath" = x; then
8559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
8560$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
8561    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
8562  fi
8563
8564  # Call helper function which possibly converts this using DOS-style short mode.
8565  # If so, the updated path is stored in $new_path.
8566
8567  input_path="$new_path"
8568  # Check if we need to convert this using DOS-style short mode. If the path
8569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8570  # take no chances and rewrite it.
8571  # Note: m4 eats our [], so we need to use [ and ] instead.
8572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8573  if test "x$has_forbidden_chars" != x; then
8574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8578      # Going to short mode and back again did indeed matter. Since short mode is
8579      # case insensitive, let's make it lowercase to improve readability.
8580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8581      # Now convert it back to Unix-stile (cygpath)
8582      input_path=`$CYGPATH -u "$shortmode_path"`
8583      new_path="$input_path"
8584    fi
8585  fi
8586
8587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8588  if test "x$test_cygdrive_prefix" = x; then
8589    # As a simple fix, exclude /usr/bin since it's not a real path.
8590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8592      # a path prefixed by /cygdrive for fixpath to work.
8593      new_path="$CYGWIN_ROOT_PATH$input_path"
8594    fi
8595  fi
8596
8597
8598  if test "x$path" != "x$new_path"; then
8599    CURDIR="$new_path"
8600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
8601$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
8602  fi
8603
8604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8605
8606  path="$CURDIR"
8607  has_colon=`$ECHO $path | $GREP ^.:`
8608  new_path="$path"
8609  if test "x$has_colon" = x; then
8610    # Not in mixed or Windows style, start by that.
8611    new_path=`cmd //c echo $path`
8612  fi
8613
8614
8615  input_path="$new_path"
8616  # Check if we need to convert this using DOS-style short mode. If the path
8617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8618  # take no chances and rewrite it.
8619  # Note: m4 eats our [], so we need to use [ and ] instead.
8620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8621  if test "x$has_forbidden_chars" != x; then
8622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8624  fi
8625
8626
8627  windows_path="$new_path"
8628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8629    unix_path=`$CYGPATH -u "$windows_path"`
8630    new_path="$unix_path"
8631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8633    new_path="$unix_path"
8634  fi
8635
8636  if test "x$path" != "x$new_path"; then
8637    CURDIR="$new_path"
8638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
8639$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
8640  fi
8641
8642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8644
8645  else
8646    # We're on a posix platform. Hooray! :)
8647    path="$CURDIR"
8648
8649    if test ! -f "$path" && test ! -d "$path"; then
8650      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
8651    fi
8652
8653    has_space=`$ECHO "$path" | $GREP " "`
8654    if test "x$has_space" != x; then
8655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
8656$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
8657      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8658    fi
8659  fi
8660
8661
8662if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
8663    # Add extra search paths on solaris for utilities like ar and as etc...
8664    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
8665fi
8666
8667# You can force the sys-root if the sys-root encoded into the cross compiler tools
8668# is not correct.
8669
8670# Check whether --with-sys-root was given.
8671if test "${with_sys_root+set}" = set; then :
8672  withval=$with_sys_root;
8673fi
8674
8675
8676if test "x$with_sys_root" != x; then
8677  SYS_ROOT=$with_sys_root
8678else
8679  SYS_ROOT=/
8680fi
8681
8682
8683
8684# Check whether --with-tools-dir was given.
8685if test "${with_tools_dir+set}" = set; then :
8686  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
8687fi
8688
8689
8690
8691# Check whether --with-devkit was given.
8692if test "${with_devkit+set}" = set; then :
8693  withval=$with_devkit;
8694    if test "x$with_sys_root" != x; then
8695      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
8696    fi
8697    if test "x$with_tools_dir" != x; then
8698      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
8699    fi
8700    TOOLS_DIR=$with_devkit/bin
8701    SYS_ROOT=$with_devkit/$host_alias/libc
8702
8703fi
8704
8705
8706
8707
8708# Setup default logging of stdout and stderr to build.log in the output root.
8709BUILD_LOG='$(OUTPUT_ROOT)/build.log'
8710BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
8711BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
8712
8713
8714
8715
8716
8717# Check if it's a pure open build or if custom sources are to be used.
8718
8719  # Check whether --enable-openjdk-only was given.
8720if test "${enable_openjdk_only+set}" = set; then :
8721  enableval=$enable_openjdk_only;
8722else
8723  enable_openjdk_only="no"
8724fi
8725
8726
8727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
8728$as_echo_n "checking for presence of closed sources... " >&6; }
8729  if test -d "$SRC_ROOT/jdk/src/closed"; then
8730    CLOSED_SOURCE_PRESENT=yes
8731  else
8732    CLOSED_SOURCE_PRESENT=no
8733  fi
8734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
8735$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
8736
8737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
8738$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
8739  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
8740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
8741$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
8742
8743  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
8744    OPENJDK=true
8745    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
8746      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
8747$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
8748    fi
8749  else
8750    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
8751      OPENJDK=true
8752    else
8753      OPENJDK=false
8754    fi
8755  fi
8756
8757  if test "x$OPENJDK" = "xtrue"; then
8758    SET_OPENJDK="OPENJDK=true"
8759  fi
8760
8761
8762
8763
8764# These are needed to be able to create a configuration name (and thus the output directory)
8765
8766###############################################################################
8767#
8768# Check which variant of the JDK that we want to build.
8769# Currently we have:
8770#    normal:   standard edition
8771# but the custom make system may add other variants
8772#
8773# Effectively the JDK variant gives a name to a specific set of
8774# modules to compile into the JDK. In the future, these modules
8775# might even be Jigsaw modules.
8776#
8777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
8778$as_echo_n "checking which variant of the JDK to build... " >&6; }
8779
8780# Check whether --with-jdk-variant was given.
8781if test "${with_jdk_variant+set}" = set; then :
8782  withval=$with_jdk_variant;
8783fi
8784
8785
8786if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
8787    JDK_VARIANT="normal"
8788else
8789    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
8790fi
8791
8792
8793
8794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
8795$as_echo "$JDK_VARIANT" >&6; }
8796
8797
8798
8799###############################################################################
8800#
8801# Check which variants of the JVM that we want to build.
8802# Currently we have:
8803#    server: normal interpreter and a tiered C1/C2 compiler
8804#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
8805#    minimal1: reduced form of client with optional VM services and features stripped out
8806#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
8807#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
8808#    zero: no machine code interpreter, no compiler
8809#    zeroshark: zero interpreter and shark/llvm compiler backend
8810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
8811$as_echo_n "checking which variants of the JVM to build... " >&6; }
8812
8813# Check whether --with-jvm-variants was given.
8814if test "${with_jvm_variants+set}" = set; then :
8815  withval=$with_jvm_variants;
8816fi
8817
8818
8819if test "x$with_jvm_variants" = x; then
8820     with_jvm_variants="server"
8821fi
8822
8823JVM_VARIANTS=",$with_jvm_variants,"
8824TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
8825
8826if test "x$TEST_VARIANTS" != "x,"; then
8827   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
8828fi
8829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
8830$as_echo "$with_jvm_variants" >&6; }
8831
8832JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
8833JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
8834JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
8835JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
8836JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
8837JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
8838
8839if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8840    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
8841        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
8842    fi
8843fi
8844if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8845    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
8846        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
8847    fi
8848fi
8849if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8850    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
8851        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
8852    fi
8853fi
8854
8855# Replace the commas with AND for use in the build directory name.
8856ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
8857COUNT_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/'`
8858if test "x$COUNT_VARIANTS" != "x,1"; then
8859    BUILDING_MULTIPLE_JVM_VARIANTS=yes
8860else
8861    BUILDING_MULTIPLE_JVM_VARIANTS=no
8862fi
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872INCLUDE_SA=true
8873if test "x$JVM_VARIANT_ZERO" = xtrue ; then
8874    INCLUDE_SA=false
8875fi
8876if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
8877    INCLUDE_SA=false
8878fi
8879
8880
8881if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
8882   MACOSX_UNIVERSAL="true"
8883fi
8884
8885
8886
8887
8888
8889###############################################################################
8890#
8891# Set the debug level
8892#    release: no debug information, all optimizations, no asserts.
8893#    fastdebug: debug information (-g), all optimizations, all asserts
8894#    slowdebug: debug information (-g), no optimizations, all asserts
8895#
8896DEBUG_LEVEL="release"
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
8898$as_echo_n "checking which debug level to use... " >&6; }
8899# Check whether --enable-debug was given.
8900if test "${enable_debug+set}" = set; then :
8901  enableval=$enable_debug;
8902        ENABLE_DEBUG="${enableval}"
8903        DEBUG_LEVEL="fastdebug"
8904
8905else
8906  ENABLE_DEBUG="no"
8907fi
8908
8909
8910
8911# Check whether --with-debug-level was given.
8912if test "${with_debug_level+set}" = set; then :
8913  withval=$with_debug_level;
8914        DEBUG_LEVEL="${withval}"
8915        if test "x$ENABLE_DEBUG" = xyes; then
8916			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
8917        fi
8918
8919fi
8920
8921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
8922$as_echo "$DEBUG_LEVEL" >&6; }
8923
8924if test "x$DEBUG_LEVEL" != xrelease && \
8925   test "x$DEBUG_LEVEL" != xfastdebug && \
8926   test "x$DEBUG_LEVEL" != xslowdebug; then
8927   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
8928fi
8929
8930
8931###############################################################################
8932#
8933# Setup legacy vars/targets and new vars to deal with different debug levels.
8934#
8935
8936case $DEBUG_LEVEL in
8937      release )
8938          VARIANT="OPT"
8939          FASTDEBUG="false"
8940          DEBUG_CLASSFILES="false"
8941          BUILD_VARIANT_RELEASE=""
8942          HOTSPOT_DEBUG_LEVEL="product"
8943          HOTSPOT_EXPORT="product"
8944           ;;
8945      fastdebug )
8946          VARIANT="DBG"
8947          FASTDEBUG="true"
8948          DEBUG_CLASSFILES="true"
8949          BUILD_VARIANT_RELEASE="-fastdebug"
8950          HOTSPOT_DEBUG_LEVEL="fastdebug"
8951          HOTSPOT_EXPORT="fastdebug"
8952           ;;
8953      slowdebug )
8954          VARIANT="DBG"
8955          FASTDEBUG="false"
8956          DEBUG_CLASSFILES="true"
8957          BUILD_VARIANT_RELEASE="-debug"
8958          HOTSPOT_DEBUG_LEVEL="jvmg"
8959          HOTSPOT_EXPORT="debug"
8960           ;;
8961esac
8962
8963#####
8964# Generate the legacy makefile targets for hotspot.
8965# The hotspot api for selecting the build artifacts, really, needs to be improved.
8966# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
8967# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
8968# But until then ...
8969HOTSPOT_TARGET=""
8970
8971if test "x$JVM_VARIANT_SERVER" = xtrue; then
8972    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8973fi
8974
8975if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8976    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8977fi
8978
8979if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8980    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8981fi
8982
8983if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8984    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8985fi
8986
8987if test "x$JVM_VARIANT_ZERO" = xtrue; then
8988    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8989fi
8990
8991if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8992    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8993fi
8994
8995HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8996
8997# On Macosx universal binaries are produced, but they only contain
8998# 64 bit intel. This invalidates control of which jvms are built
8999# from configure, but only server is valid anyway. Fix this
9000# when hotspot makefiles are rewritten.
9001if test "x$MACOSX_UNIVERSAL" = xtrue; then
9002    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
9003fi
9004
9005#####
9006
9007
9008
9009
9010
9011
9012
9013
9014# With basic setup done, call the custom early hook.
9015
9016
9017# To properly create a configuration name, we need to have the OpenJDK target
9018# and options (variants and debug level) parsed.
9019
9020
9021
9022# Check whether --with-conf-name was given.
9023if test "${with_conf_name+set}" = set; then :
9024  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
9025fi
9026
9027
9028# Test from where we are running configure, in or outside of src root.
9029# To enable comparison of directories, CURDIR needs to be symlink free
9030# just like SRC_ROOT already is
9031NOSYM_CURDIR="$CURDIR"
9032
9033    if test "x$OPENJDK_BUILD_OS" != xwindows; then
9034        # Follow a chain of symbolic links. Use readlink
9035        # where it exists, else fall back to horribly
9036        # complicated shell code.
9037        if test "x$READLINK_TESTED" != yes; then
9038            # On MacOSX there is a readlink tool with a different
9039            # purpose than the GNU readlink tool. Check the found readlink.
9040            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
9041            if test "x$ISGNU" = x; then
9042                 # A readlink that we do not know how to use.
9043                 # Are there other non-GNU readlinks out there?
9044                 READLINK_TESTED=yes
9045                 READLINK=
9046            fi
9047        fi
9048
9049        if test "x$READLINK" != x; then
9050            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
9051        else
9052            # Save the current directory for restoring afterwards
9053            STARTDIR=$PWD
9054            COUNTER=0
9055            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
9056            sym_link_file=`$BASENAME $NOSYM_CURDIR`
9057            # Use the system pwd and not the shell builtin to resolve directory symlinks
9058            cd $sym_link_dir
9059            cd `$THEPWDCMD`
9060            sym_link_dir=`$THEPWDCMD`
9061            # Resolve file symlinks
9062            while test $COUNTER -lt 20; do
9063                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
9064                if test "x$ISLINK" == x; then
9065                    # This is not a symbolic link! We are done!
9066                    break
9067                fi
9068                # Again resolve directory symlinks since the target of the just found
9069                # link could be in a different directory
9070                cd `$DIRNAME $ISLINK`
9071                sym_link_dir=`$THEPWDCMD`
9072                sym_link_file=`$BASENAME $ISLINK`
9073                let COUNTER=COUNTER+1
9074            done
9075            cd $STARTDIR
9076            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
9077        fi
9078    fi
9079
9080if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
9081        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
9082        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
9083    # We are running configure from the src root.
9084    # Create a default ./build/target-variant-debuglevel output root.
9085    if test "x${CONF_NAME}" = x; then
9086        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
9087    fi
9088    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
9089    $MKDIR -p "$OUTPUT_ROOT"
9090    if test ! -d "$OUTPUT_ROOT"; then
9091        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
9092    fi
9093else
9094    # We are running configure from outside of the src dir.
9095    # Then use the current directory as output dir!
9096    # If configuration is situated in normal build directory, just use the build
9097    # directory name as configuration name, otherwise use the complete path.
9098    if test "x${CONF_NAME}" = x; then
9099        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
9100    fi
9101    OUTPUT_ROOT="$CURDIR"
9102
9103    # WARNING: This might be a bad thing to do. You need to be sure you want to
9104    # have a configuration in this directory. Do some sanity checks!
9105
9106    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
9107      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
9108      # other files
9109      files_present=`$LS $OUTPUT_ROOT`
9110      # Configure has already touched config.log and confdefs.h in the current dir when this check
9111      # is performed.
9112      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
9113                                             | $TR -d '\n'`
9114      if test "x$filtered_files" != x; then
9115        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
9116$as_echo "$as_me: Current directory is $CURDIR." >&6;}
9117        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
9118$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
9119        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
9120$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
9121        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
9122$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
9123        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
9124$as_echo "$as_me: seriously mess up just about everything." >&6;}
9125        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
9126$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
9127        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
9128$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
9129        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
9130      fi
9131    fi
9132fi
9133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
9134$as_echo_n "checking what configuration name to use... " >&6; }
9135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
9136$as_echo "$CONF_NAME" >&6; }
9137
9138
9139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9140
9141  # Input might be given as Windows format, start by converting to
9142  # unix format.
9143  path="$OUTPUT_ROOT"
9144  new_path=`$CYGPATH -u "$path"`
9145
9146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9149  # "foo.exe" is OK but "foo" is an error.
9150  #
9151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9152  # It is also a way to make sure we got the proper file name for the real test later on.
9153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9154  if test "x$test_shortpath" = x; then
9155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
9156$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
9157    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
9158  fi
9159
9160  # Call helper function which possibly converts this using DOS-style short mode.
9161  # If so, the updated path is stored in $new_path.
9162
9163  input_path="$new_path"
9164  # Check if we need to convert this using DOS-style short mode. If the path
9165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9166  # take no chances and rewrite it.
9167  # Note: m4 eats our [], so we need to use [ and ] instead.
9168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9169  if test "x$has_forbidden_chars" != x; then
9170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9174      # Going to short mode and back again did indeed matter. Since short mode is
9175      # case insensitive, let's make it lowercase to improve readability.
9176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9177      # Now convert it back to Unix-stile (cygpath)
9178      input_path=`$CYGPATH -u "$shortmode_path"`
9179      new_path="$input_path"
9180    fi
9181  fi
9182
9183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9184  if test "x$test_cygdrive_prefix" = x; then
9185    # As a simple fix, exclude /usr/bin since it's not a real path.
9186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
9187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9188      # a path prefixed by /cygdrive for fixpath to work.
9189      new_path="$CYGWIN_ROOT_PATH$input_path"
9190    fi
9191  fi
9192
9193
9194  if test "x$path" != "x$new_path"; then
9195    OUTPUT_ROOT="$new_path"
9196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
9197$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
9198  fi
9199
9200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9201
9202  path="$OUTPUT_ROOT"
9203  has_colon=`$ECHO $path | $GREP ^.:`
9204  new_path="$path"
9205  if test "x$has_colon" = x; then
9206    # Not in mixed or Windows style, start by that.
9207    new_path=`cmd //c echo $path`
9208  fi
9209
9210
9211  input_path="$new_path"
9212  # Check if we need to convert this using DOS-style short mode. If the path
9213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9214  # take no chances and rewrite it.
9215  # Note: m4 eats our [], so we need to use [ and ] instead.
9216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9217  if test "x$has_forbidden_chars" != x; then
9218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9220  fi
9221
9222
9223  windows_path="$new_path"
9224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9225    unix_path=`$CYGPATH -u "$windows_path"`
9226    new_path="$unix_path"
9227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9229    new_path="$unix_path"
9230  fi
9231
9232  if test "x$path" != "x$new_path"; then
9233    OUTPUT_ROOT="$new_path"
9234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
9235$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
9236  fi
9237
9238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
9239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9240
9241  else
9242    # We're on a posix platform. Hooray! :)
9243    path="$OUTPUT_ROOT"
9244
9245    if test ! -f "$path" && test ! -d "$path"; then
9246      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
9247    fi
9248
9249    has_space=`$ECHO "$path" | $GREP " "`
9250    if test "x$has_space" != x; then
9251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
9252$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
9253      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
9254    fi
9255  fi
9256
9257
9258SPEC=$OUTPUT_ROOT/spec.gmk
9259
9260CONF_NAME=$CONF_NAME
9261
9262OUTPUT_ROOT=$OUTPUT_ROOT
9263
9264
9265# Most of the probed defines are put into config.h
9266ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
9267
9268# The spec.gmk file contains all variables for the make system.
9269ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
9270
9271# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
9272ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
9273
9274# The bootcycle-spec.gmk file contains support for boot cycle builds.
9275ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
9276
9277# The compare.sh is used to compare the build output to other builds.
9278ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
9279
9280# Spec.sh is currently used by compare-objects.sh
9281ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
9282
9283# The generated Makefile knows where the spec.gmk is and where the source is.
9284# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
9285# which will look for generated configurations
9286ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
9287
9288
9289# Save the arguments given to us
9290echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
9291
9292
9293# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
9294
9295    for ac_prog in apt-get yum port pkgutil pkgadd
9296do
9297  # Extract the first word of "$ac_prog", so it can be a program name with args.
9298set dummy $ac_prog; ac_word=$2
9299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9300$as_echo_n "checking for $ac_word... " >&6; }
9301if ${ac_cv_prog_PKGHANDLER+:} false; then :
9302  $as_echo_n "(cached) " >&6
9303else
9304  if test -n "$PKGHANDLER"; then
9305  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
9306else
9307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9308for as_dir in $PATH
9309do
9310  IFS=$as_save_IFS
9311  test -z "$as_dir" && as_dir=.
9312    for ac_exec_ext in '' $ac_executable_extensions; do
9313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9314    ac_cv_prog_PKGHANDLER="$ac_prog"
9315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9316    break 2
9317  fi
9318done
9319  done
9320IFS=$as_save_IFS
9321
9322fi
9323fi
9324PKGHANDLER=$ac_cv_prog_PKGHANDLER
9325if test -n "$PKGHANDLER"; then
9326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
9327$as_echo "$PKGHANDLER" >&6; }
9328else
9329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9330$as_echo "no" >&6; }
9331fi
9332
9333
9334  test -n "$PKGHANDLER" && break
9335done
9336
9337
9338
9339# Setup tools that requires more complex handling, or that is not needed by the configure script.
9340
9341
9342  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
9343  if test "x$MAKE" != x; then
9344    # User has supplied a make, test it.
9345    if test ! -f "$MAKE"; then
9346      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
9347    fi
9348
9349  MAKE_CANDIDATE=""$MAKE""
9350  DESCRIPTION="user supplied MAKE=$MAKE"
9351  if test "x$MAKE_CANDIDATE" != x; then
9352    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9353$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9354    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9355    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9356    if test "x$IS_GNU_MAKE" = x; then
9357      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9358$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9359    else
9360      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9361      if test "x$IS_MODERN_MAKE" = x; then
9362        { $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
9363$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;}
9364      else
9365        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9366          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9367            MAKE_EXPECTED_ENV='cygwin'
9368          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9369            MAKE_EXPECTED_ENV='msys'
9370          else
9371            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9372          fi
9373          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9374          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9375        else
9376          # Not relevant for non-Windows
9377          IS_MAKE_CORRECT_ENV=true
9378        fi
9379        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9380          { $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
9381$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;}
9382        else
9383          FOUND_MAKE=$MAKE_CANDIDATE
9384
9385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9386
9387  # First separate the path from the arguments. This will split at the first
9388  # space.
9389  complete="$FOUND_MAKE"
9390  path="${complete%% *}"
9391  tmp="$complete EOL"
9392  arguments="${tmp#* }"
9393
9394  # Input might be given as Windows format, start by converting to
9395  # unix format.
9396  new_path=`$CYGPATH -u "$path"`
9397
9398  # Now try to locate executable using which
9399  new_path=`$WHICH "$new_path" 2> /dev/null`
9400  # bat and cmd files are not always considered executable in cygwin causing which
9401  # to not find them
9402  if test "x$new_path" = x \
9403           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9404           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9405    new_path=`$CYGPATH -u "$path"`
9406  fi
9407  if test "x$new_path" = x; then
9408    # Oops. Which didn't find the executable.
9409    # The splitting of arguments from the executable at a space might have been incorrect,
9410    # since paths with space are more likely in Windows. Give it another try with the whole
9411    # argument.
9412    path="$complete"
9413    arguments="EOL"
9414    new_path=`$CYGPATH -u "$path"`
9415    new_path=`$WHICH "$new_path" 2> /dev/null`
9416    # bat and cmd files are not always considered executable in cygwin causing which
9417    # to not find them
9418    if test "x$new_path" = x \
9419             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9420             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9421      new_path=`$CYGPATH -u "$path"`
9422    fi
9423    if test "x$new_path" = x; then
9424      # It's still not found. Now this is an unrecoverable error.
9425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9426$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9427      has_space=`$ECHO "$complete" | $GREP " "`
9428      if test "x$has_space" != x; then
9429        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9430$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9431      fi
9432      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9433    fi
9434  fi
9435
9436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9439  # "foo.exe" is OK but "foo" is an error.
9440  #
9441  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9442  # It is also a way to make sure we got the proper file name for the real test later on.
9443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9444  if test "x$test_shortpath" = x; then
9445    # Short path failed, file does not exist as specified.
9446    # Try adding .exe or .cmd
9447    if test -f "${new_path}.exe"; then
9448       input_to_shortpath="${new_path}.exe"
9449    elif test -f "${new_path}.cmd"; then
9450       input_to_shortpath="${new_path}.cmd"
9451    else
9452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9453$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9454      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9455$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9456      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9457    fi
9458  else
9459    input_to_shortpath="$new_path"
9460  fi
9461
9462  # Call helper function which possibly converts this using DOS-style short mode.
9463  # If so, the updated path is stored in $new_path.
9464  new_path="$input_to_shortpath"
9465
9466  input_path="$input_to_shortpath"
9467  # Check if we need to convert this using DOS-style short mode. If the path
9468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9469  # take no chances and rewrite it.
9470  # Note: m4 eats our [], so we need to use [ and ] instead.
9471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9472  if test "x$has_forbidden_chars" != x; then
9473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9477      # Going to short mode and back again did indeed matter. Since short mode is
9478      # case insensitive, let's make it lowercase to improve readability.
9479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9480      # Now convert it back to Unix-stile (cygpath)
9481      input_path=`$CYGPATH -u "$shortmode_path"`
9482      new_path="$input_path"
9483    fi
9484  fi
9485
9486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9487  if test "x$test_cygdrive_prefix" = x; then
9488    # As a simple fix, exclude /usr/bin since it's not a real path.
9489    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9491      # a path prefixed by /cygdrive for fixpath to work.
9492      new_path="$CYGWIN_ROOT_PATH$input_path"
9493    fi
9494  fi
9495
9496  # remove trailing .exe if any
9497  new_path="${new_path/%.exe/}"
9498
9499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9500
9501  # First separate the path from the arguments. This will split at the first
9502  # space.
9503  complete="$FOUND_MAKE"
9504  path="${complete%% *}"
9505  tmp="$complete EOL"
9506  arguments="${tmp#* }"
9507
9508  # Input might be given as Windows format, start by converting to
9509  # unix format.
9510  new_path="$path"
9511
9512  windows_path="$new_path"
9513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9514    unix_path=`$CYGPATH -u "$windows_path"`
9515    new_path="$unix_path"
9516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9518    new_path="$unix_path"
9519  fi
9520
9521
9522  # Now try to locate executable using which
9523  new_path=`$WHICH "$new_path" 2> /dev/null`
9524
9525  if test "x$new_path" = x; then
9526    # Oops. Which didn't find the executable.
9527    # The splitting of arguments from the executable at a space might have been incorrect,
9528    # since paths with space are more likely in Windows. Give it another try with the whole
9529    # argument.
9530    path="$complete"
9531    arguments="EOL"
9532    new_path="$path"
9533
9534  windows_path="$new_path"
9535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9536    unix_path=`$CYGPATH -u "$windows_path"`
9537    new_path="$unix_path"
9538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9540    new_path="$unix_path"
9541  fi
9542
9543
9544    new_path=`$WHICH "$new_path" 2> /dev/null`
9545
9546    if test "x$new_path" = x; then
9547      # It's still not found. Now this is an unrecoverable error.
9548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9549$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9550      has_space=`$ECHO "$complete" | $GREP " "`
9551      if test "x$has_space" != x; then
9552        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9553$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9554      fi
9555      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9556    fi
9557  fi
9558
9559  # Now new_path has a complete unix path to the binary
9560  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9561    # Keep paths in /bin as-is, but remove trailing .exe if any
9562    new_path="${new_path/%.exe/}"
9563    # Do not save /bin paths to all_fixpath_prefixes!
9564  else
9565    # Not in mixed or Windows style, start by that.
9566    new_path=`cmd //c echo $new_path`
9567
9568  input_path="$new_path"
9569  # Check if we need to convert this using DOS-style short mode. If the path
9570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9571  # take no chances and rewrite it.
9572  # Note: m4 eats our [], so we need to use [ and ] instead.
9573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9574  if test "x$has_forbidden_chars" != x; then
9575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9577  fi
9578
9579    # Output is in $new_path
9580
9581  windows_path="$new_path"
9582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9583    unix_path=`$CYGPATH -u "$windows_path"`
9584    new_path="$unix_path"
9585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9587    new_path="$unix_path"
9588  fi
9589
9590    # remove trailing .exe if any
9591    new_path="${new_path/%.exe/}"
9592
9593    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9594    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9595  fi
9596
9597  else
9598    # We're on a posix platform. Hooray! :)
9599    # First separate the path from the arguments. This will split at the first
9600    # space.
9601    complete="$FOUND_MAKE"
9602    path="${complete%% *}"
9603    tmp="$complete EOL"
9604    arguments="${tmp#* }"
9605
9606    # Cannot rely on the command "which" here since it doesn't always work.
9607    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9608    if test -z "$is_absolute_path"; then
9609      # Path to executable is not absolute. Find it.
9610      IFS_save="$IFS"
9611      IFS=:
9612      for p in $PATH; do
9613        if test -f "$p/$path" && test -x "$p/$path"; then
9614          new_path="$p/$path"
9615          break
9616        fi
9617      done
9618      IFS="$IFS_save"
9619    else
9620      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9621$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9622      new_path="$path"
9623    fi
9624
9625    if test "x$new_path" = x; then
9626        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9627$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9628        has_space=`$ECHO "$complete" | $GREP " "`
9629        if test "x$has_space" != x; then
9630          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9631$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9632        fi
9633        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9634      fi
9635  fi
9636
9637      # Now join together the path and the arguments once again
9638      if test "x$arguments" != xEOL; then
9639        new_complete="$new_path ${arguments% *}"
9640      else
9641        new_complete="$new_path"
9642      fi
9643
9644  if test "x$complete" != "x$new_complete"; then
9645      FOUND_MAKE="$new_complete"
9646      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9647$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9648    fi
9649
9650        fi
9651      fi
9652    fi
9653  fi
9654
9655    if test "x$FOUND_MAKE" = x; then
9656      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
9657    fi
9658  else
9659    # Try our hardest to locate a correct version of GNU make
9660    for ac_prog in gmake
9661do
9662  # Extract the first word of "$ac_prog", so it can be a program name with args.
9663set dummy $ac_prog; ac_word=$2
9664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9665$as_echo_n "checking for $ac_word... " >&6; }
9666if ${ac_cv_path_CHECK_GMAKE+:} false; then :
9667  $as_echo_n "(cached) " >&6
9668else
9669  case $CHECK_GMAKE in
9670  [\\/]* | ?:[\\/]*)
9671  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
9672  ;;
9673  *)
9674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9675for as_dir in $PATH
9676do
9677  IFS=$as_save_IFS
9678  test -z "$as_dir" && as_dir=.
9679    for ac_exec_ext in '' $ac_executable_extensions; do
9680  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9681    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9683    break 2
9684  fi
9685done
9686  done
9687IFS=$as_save_IFS
9688
9689  ;;
9690esac
9691fi
9692CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
9693if test -n "$CHECK_GMAKE"; then
9694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
9695$as_echo "$CHECK_GMAKE" >&6; }
9696else
9697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9698$as_echo "no" >&6; }
9699fi
9700
9701
9702  test -n "$CHECK_GMAKE" && break
9703done
9704
9705
9706  MAKE_CANDIDATE=""$CHECK_GMAKE""
9707  DESCRIPTION="gmake in PATH"
9708  if test "x$MAKE_CANDIDATE" != x; then
9709    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9710$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9711    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9712    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9713    if test "x$IS_GNU_MAKE" = x; then
9714      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9715$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9716    else
9717      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9718      if test "x$IS_MODERN_MAKE" = x; then
9719        { $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
9720$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;}
9721      else
9722        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9723          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9724            MAKE_EXPECTED_ENV='cygwin'
9725          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9726            MAKE_EXPECTED_ENV='msys'
9727          else
9728            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9729          fi
9730          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9731          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9732        else
9733          # Not relevant for non-Windows
9734          IS_MAKE_CORRECT_ENV=true
9735        fi
9736        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9737          { $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
9738$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;}
9739        else
9740          FOUND_MAKE=$MAKE_CANDIDATE
9741
9742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9743
9744  # First separate the path from the arguments. This will split at the first
9745  # space.
9746  complete="$FOUND_MAKE"
9747  path="${complete%% *}"
9748  tmp="$complete EOL"
9749  arguments="${tmp#* }"
9750
9751  # Input might be given as Windows format, start by converting to
9752  # unix format.
9753  new_path=`$CYGPATH -u "$path"`
9754
9755  # Now try to locate executable using which
9756  new_path=`$WHICH "$new_path" 2> /dev/null`
9757  # bat and cmd files are not always considered executable in cygwin causing which
9758  # to not find them
9759  if test "x$new_path" = x \
9760           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9761           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9762    new_path=`$CYGPATH -u "$path"`
9763  fi
9764  if test "x$new_path" = x; then
9765    # Oops. Which didn't find the executable.
9766    # The splitting of arguments from the executable at a space might have been incorrect,
9767    # since paths with space are more likely in Windows. Give it another try with the whole
9768    # argument.
9769    path="$complete"
9770    arguments="EOL"
9771    new_path=`$CYGPATH -u "$path"`
9772    new_path=`$WHICH "$new_path" 2> /dev/null`
9773    # bat and cmd files are not always considered executable in cygwin causing which
9774    # to not find them
9775    if test "x$new_path" = x \
9776             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9777             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9778      new_path=`$CYGPATH -u "$path"`
9779    fi
9780    if test "x$new_path" = x; then
9781      # It's still not found. Now this is an unrecoverable error.
9782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9783$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9784      has_space=`$ECHO "$complete" | $GREP " "`
9785      if test "x$has_space" != x; then
9786        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9787$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9788      fi
9789      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9790    fi
9791  fi
9792
9793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9796  # "foo.exe" is OK but "foo" is an error.
9797  #
9798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9799  # It is also a way to make sure we got the proper file name for the real test later on.
9800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9801  if test "x$test_shortpath" = x; then
9802    # Short path failed, file does not exist as specified.
9803    # Try adding .exe or .cmd
9804    if test -f "${new_path}.exe"; then
9805       input_to_shortpath="${new_path}.exe"
9806    elif test -f "${new_path}.cmd"; then
9807       input_to_shortpath="${new_path}.cmd"
9808    else
9809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9810$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9811      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9812$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9813      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9814    fi
9815  else
9816    input_to_shortpath="$new_path"
9817  fi
9818
9819  # Call helper function which possibly converts this using DOS-style short mode.
9820  # If so, the updated path is stored in $new_path.
9821  new_path="$input_to_shortpath"
9822
9823  input_path="$input_to_shortpath"
9824  # Check if we need to convert this using DOS-style short mode. If the path
9825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9826  # take no chances and rewrite it.
9827  # Note: m4 eats our [], so we need to use [ and ] instead.
9828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9829  if test "x$has_forbidden_chars" != x; then
9830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9834      # Going to short mode and back again did indeed matter. Since short mode is
9835      # case insensitive, let's make it lowercase to improve readability.
9836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9837      # Now convert it back to Unix-stile (cygpath)
9838      input_path=`$CYGPATH -u "$shortmode_path"`
9839      new_path="$input_path"
9840    fi
9841  fi
9842
9843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9844  if test "x$test_cygdrive_prefix" = x; then
9845    # As a simple fix, exclude /usr/bin since it's not a real path.
9846    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9848      # a path prefixed by /cygdrive for fixpath to work.
9849      new_path="$CYGWIN_ROOT_PATH$input_path"
9850    fi
9851  fi
9852
9853  # remove trailing .exe if any
9854  new_path="${new_path/%.exe/}"
9855
9856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9857
9858  # First separate the path from the arguments. This will split at the first
9859  # space.
9860  complete="$FOUND_MAKE"
9861  path="${complete%% *}"
9862  tmp="$complete EOL"
9863  arguments="${tmp#* }"
9864
9865  # Input might be given as Windows format, start by converting to
9866  # unix format.
9867  new_path="$path"
9868
9869  windows_path="$new_path"
9870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9871    unix_path=`$CYGPATH -u "$windows_path"`
9872    new_path="$unix_path"
9873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9875    new_path="$unix_path"
9876  fi
9877
9878
9879  # Now try to locate executable using which
9880  new_path=`$WHICH "$new_path" 2> /dev/null`
9881
9882  if test "x$new_path" = x; then
9883    # Oops. Which didn't find the executable.
9884    # The splitting of arguments from the executable at a space might have been incorrect,
9885    # since paths with space are more likely in Windows. Give it another try with the whole
9886    # argument.
9887    path="$complete"
9888    arguments="EOL"
9889    new_path="$path"
9890
9891  windows_path="$new_path"
9892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9893    unix_path=`$CYGPATH -u "$windows_path"`
9894    new_path="$unix_path"
9895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9897    new_path="$unix_path"
9898  fi
9899
9900
9901    new_path=`$WHICH "$new_path" 2> /dev/null`
9902
9903    if test "x$new_path" = x; then
9904      # It's still not found. Now this is an unrecoverable error.
9905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9906$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9907      has_space=`$ECHO "$complete" | $GREP " "`
9908      if test "x$has_space" != x; then
9909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9911      fi
9912      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9913    fi
9914  fi
9915
9916  # Now new_path has a complete unix path to the binary
9917  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9918    # Keep paths in /bin as-is, but remove trailing .exe if any
9919    new_path="${new_path/%.exe/}"
9920    # Do not save /bin paths to all_fixpath_prefixes!
9921  else
9922    # Not in mixed or Windows style, start by that.
9923    new_path=`cmd //c echo $new_path`
9924
9925  input_path="$new_path"
9926  # Check if we need to convert this using DOS-style short mode. If the path
9927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9928  # take no chances and rewrite it.
9929  # Note: m4 eats our [], so we need to use [ and ] instead.
9930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9931  if test "x$has_forbidden_chars" != x; then
9932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9934  fi
9935
9936    # Output is in $new_path
9937
9938  windows_path="$new_path"
9939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9940    unix_path=`$CYGPATH -u "$windows_path"`
9941    new_path="$unix_path"
9942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9944    new_path="$unix_path"
9945  fi
9946
9947    # remove trailing .exe if any
9948    new_path="${new_path/%.exe/}"
9949
9950    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9951    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9952  fi
9953
9954  else
9955    # We're on a posix platform. Hooray! :)
9956    # First separate the path from the arguments. This will split at the first
9957    # space.
9958    complete="$FOUND_MAKE"
9959    path="${complete%% *}"
9960    tmp="$complete EOL"
9961    arguments="${tmp#* }"
9962
9963    # Cannot rely on the command "which" here since it doesn't always work.
9964    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9965    if test -z "$is_absolute_path"; then
9966      # Path to executable is not absolute. Find it.
9967      IFS_save="$IFS"
9968      IFS=:
9969      for p in $PATH; do
9970        if test -f "$p/$path" && test -x "$p/$path"; then
9971          new_path="$p/$path"
9972          break
9973        fi
9974      done
9975      IFS="$IFS_save"
9976    else
9977      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9978$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9979      new_path="$path"
9980    fi
9981
9982    if test "x$new_path" = x; then
9983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9984$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9985        has_space=`$ECHO "$complete" | $GREP " "`
9986        if test "x$has_space" != x; then
9987          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9989        fi
9990        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9991      fi
9992  fi
9993
9994      # Now join together the path and the arguments once again
9995      if test "x$arguments" != xEOL; then
9996        new_complete="$new_path ${arguments% *}"
9997      else
9998        new_complete="$new_path"
9999      fi
10000
10001  if test "x$complete" != "x$new_complete"; then
10002      FOUND_MAKE="$new_complete"
10003      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10004$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10005    fi
10006
10007        fi
10008      fi
10009    fi
10010  fi
10011
10012
10013    if test "x$FOUND_MAKE" = x; then
10014      for ac_prog in make
10015do
10016  # Extract the first word of "$ac_prog", so it can be a program name with args.
10017set dummy $ac_prog; ac_word=$2
10018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10019$as_echo_n "checking for $ac_word... " >&6; }
10020if ${ac_cv_path_CHECK_MAKE+:} false; then :
10021  $as_echo_n "(cached) " >&6
10022else
10023  case $CHECK_MAKE in
10024  [\\/]* | ?:[\\/]*)
10025  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
10026  ;;
10027  *)
10028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10029for as_dir in $PATH
10030do
10031  IFS=$as_save_IFS
10032  test -z "$as_dir" && as_dir=.
10033    for ac_exec_ext in '' $ac_executable_extensions; do
10034  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10035    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
10036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10037    break 2
10038  fi
10039done
10040  done
10041IFS=$as_save_IFS
10042
10043  ;;
10044esac
10045fi
10046CHECK_MAKE=$ac_cv_path_CHECK_MAKE
10047if test -n "$CHECK_MAKE"; then
10048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
10049$as_echo "$CHECK_MAKE" >&6; }
10050else
10051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10052$as_echo "no" >&6; }
10053fi
10054
10055
10056  test -n "$CHECK_MAKE" && break
10057done
10058
10059
10060  MAKE_CANDIDATE=""$CHECK_MAKE""
10061  DESCRIPTION="make in PATH"
10062  if test "x$MAKE_CANDIDATE" != x; then
10063    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
10064$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
10065    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
10066    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
10067    if test "x$IS_GNU_MAKE" = x; then
10068      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
10069$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
10070    else
10071      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
10072      if test "x$IS_MODERN_MAKE" = x; then
10073        { $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
10074$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;}
10075      else
10076        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
10077          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10078            MAKE_EXPECTED_ENV='cygwin'
10079          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10080            MAKE_EXPECTED_ENV='msys'
10081          else
10082            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
10083          fi
10084          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
10085          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
10086        else
10087          # Not relevant for non-Windows
10088          IS_MAKE_CORRECT_ENV=true
10089        fi
10090        if test "x$IS_MAKE_CORRECT_ENV" = x; then
10091          { $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
10092$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;}
10093        else
10094          FOUND_MAKE=$MAKE_CANDIDATE
10095
10096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10097
10098  # First separate the path from the arguments. This will split at the first
10099  # space.
10100  complete="$FOUND_MAKE"
10101  path="${complete%% *}"
10102  tmp="$complete EOL"
10103  arguments="${tmp#* }"
10104
10105  # Input might be given as Windows format, start by converting to
10106  # unix format.
10107  new_path=`$CYGPATH -u "$path"`
10108
10109  # Now try to locate executable using which
10110  new_path=`$WHICH "$new_path" 2> /dev/null`
10111  # bat and cmd files are not always considered executable in cygwin causing which
10112  # to not find them
10113  if test "x$new_path" = x \
10114           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
10115           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
10116    new_path=`$CYGPATH -u "$path"`
10117  fi
10118  if test "x$new_path" = x; then
10119    # Oops. Which didn't find the executable.
10120    # The splitting of arguments from the executable at a space might have been incorrect,
10121    # since paths with space are more likely in Windows. Give it another try with the whole
10122    # argument.
10123    path="$complete"
10124    arguments="EOL"
10125    new_path=`$CYGPATH -u "$path"`
10126    new_path=`$WHICH "$new_path" 2> /dev/null`
10127    # bat and cmd files are not always considered executable in cygwin causing which
10128    # to not find them
10129    if test "x$new_path" = x \
10130             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
10131             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
10132      new_path=`$CYGPATH -u "$path"`
10133    fi
10134    if test "x$new_path" = x; then
10135      # It's still not found. Now this is an unrecoverable error.
10136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10137$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10138      has_space=`$ECHO "$complete" | $GREP " "`
10139      if test "x$has_space" != x; then
10140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10142      fi
10143      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10144    fi
10145  fi
10146
10147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10150  # "foo.exe" is OK but "foo" is an error.
10151  #
10152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10153  # It is also a way to make sure we got the proper file name for the real test later on.
10154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10155  if test "x$test_shortpath" = x; then
10156    # Short path failed, file does not exist as specified.
10157    # Try adding .exe or .cmd
10158    if test -f "${new_path}.exe"; then
10159       input_to_shortpath="${new_path}.exe"
10160    elif test -f "${new_path}.cmd"; then
10161       input_to_shortpath="${new_path}.cmd"
10162    else
10163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
10164$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
10165      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
10166$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
10167      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10168    fi
10169  else
10170    input_to_shortpath="$new_path"
10171  fi
10172
10173  # Call helper function which possibly converts this using DOS-style short mode.
10174  # If so, the updated path is stored in $new_path.
10175  new_path="$input_to_shortpath"
10176
10177  input_path="$input_to_shortpath"
10178  # Check if we need to convert this using DOS-style short mode. If the path
10179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10180  # take no chances and rewrite it.
10181  # Note: m4 eats our [], so we need to use [ and ] instead.
10182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10183  if test "x$has_forbidden_chars" != x; then
10184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10188      # Going to short mode and back again did indeed matter. Since short mode is
10189      # case insensitive, let's make it lowercase to improve readability.
10190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10191      # Now convert it back to Unix-stile (cygpath)
10192      input_path=`$CYGPATH -u "$shortmode_path"`
10193      new_path="$input_path"
10194    fi
10195  fi
10196
10197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10198  if test "x$test_cygdrive_prefix" = x; then
10199    # As a simple fix, exclude /usr/bin since it's not a real path.
10200    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
10201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10202      # a path prefixed by /cygdrive for fixpath to work.
10203      new_path="$CYGWIN_ROOT_PATH$input_path"
10204    fi
10205  fi
10206
10207  # remove trailing .exe if any
10208  new_path="${new_path/%.exe/}"
10209
10210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10211
10212  # First separate the path from the arguments. This will split at the first
10213  # space.
10214  complete="$FOUND_MAKE"
10215  path="${complete%% *}"
10216  tmp="$complete EOL"
10217  arguments="${tmp#* }"
10218
10219  # Input might be given as Windows format, start by converting to
10220  # unix format.
10221  new_path="$path"
10222
10223  windows_path="$new_path"
10224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10225    unix_path=`$CYGPATH -u "$windows_path"`
10226    new_path="$unix_path"
10227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10229    new_path="$unix_path"
10230  fi
10231
10232
10233  # Now try to locate executable using which
10234  new_path=`$WHICH "$new_path" 2> /dev/null`
10235
10236  if test "x$new_path" = x; then
10237    # Oops. Which didn't find the executable.
10238    # The splitting of arguments from the executable at a space might have been incorrect,
10239    # since paths with space are more likely in Windows. Give it another try with the whole
10240    # argument.
10241    path="$complete"
10242    arguments="EOL"
10243    new_path="$path"
10244
10245  windows_path="$new_path"
10246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10247    unix_path=`$CYGPATH -u "$windows_path"`
10248    new_path="$unix_path"
10249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10251    new_path="$unix_path"
10252  fi
10253
10254
10255    new_path=`$WHICH "$new_path" 2> /dev/null`
10256
10257    if test "x$new_path" = x; then
10258      # It's still not found. Now this is an unrecoverable error.
10259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10260$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10261      has_space=`$ECHO "$complete" | $GREP " "`
10262      if test "x$has_space" != x; then
10263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10265      fi
10266      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10267    fi
10268  fi
10269
10270  # Now new_path has a complete unix path to the binary
10271  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10272    # Keep paths in /bin as-is, but remove trailing .exe if any
10273    new_path="${new_path/%.exe/}"
10274    # Do not save /bin paths to all_fixpath_prefixes!
10275  else
10276    # Not in mixed or Windows style, start by that.
10277    new_path=`cmd //c echo $new_path`
10278
10279  input_path="$new_path"
10280  # Check if we need to convert this using DOS-style short mode. If the path
10281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10282  # take no chances and rewrite it.
10283  # Note: m4 eats our [], so we need to use [ and ] instead.
10284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10285  if test "x$has_forbidden_chars" != x; then
10286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10288  fi
10289
10290    # Output is in $new_path
10291
10292  windows_path="$new_path"
10293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10294    unix_path=`$CYGPATH -u "$windows_path"`
10295    new_path="$unix_path"
10296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10298    new_path="$unix_path"
10299  fi
10300
10301    # remove trailing .exe if any
10302    new_path="${new_path/%.exe/}"
10303
10304    # Save the first 10 bytes of this path to the storage, so fixpath can work.
10305    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10306  fi
10307
10308  else
10309    # We're on a posix platform. Hooray! :)
10310    # First separate the path from the arguments. This will split at the first
10311    # space.
10312    complete="$FOUND_MAKE"
10313    path="${complete%% *}"
10314    tmp="$complete EOL"
10315    arguments="${tmp#* }"
10316
10317    # Cannot rely on the command "which" here since it doesn't always work.
10318    is_absolute_path=`$ECHO "$path" | $GREP ^/`
10319    if test -z "$is_absolute_path"; then
10320      # Path to executable is not absolute. Find it.
10321      IFS_save="$IFS"
10322      IFS=:
10323      for p in $PATH; do
10324        if test -f "$p/$path" && test -x "$p/$path"; then
10325          new_path="$p/$path"
10326          break
10327        fi
10328      done
10329      IFS="$IFS_save"
10330    else
10331      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10332$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10333      new_path="$path"
10334    fi
10335
10336    if test "x$new_path" = x; then
10337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10338$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10339        has_space=`$ECHO "$complete" | $GREP " "`
10340        if test "x$has_space" != x; then
10341          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10342$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10343        fi
10344        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10345      fi
10346  fi
10347
10348      # Now join together the path and the arguments once again
10349      if test "x$arguments" != xEOL; then
10350        new_complete="$new_path ${arguments% *}"
10351      else
10352        new_complete="$new_path"
10353      fi
10354
10355  if test "x$complete" != "x$new_complete"; then
10356      FOUND_MAKE="$new_complete"
10357      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10358$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10359    fi
10360
10361        fi
10362      fi
10363    fi
10364  fi
10365
10366    fi
10367
10368    if test "x$FOUND_MAKE" = x; then
10369      if test "x$TOOLS_DIR" != x; then
10370        # We have a tools-dir, check that as well before giving up.
10371        OLD_PATH=$PATH
10372        PATH=$TOOLS_DIR:$PATH
10373        for ac_prog in gmake
10374do
10375  # Extract the first word of "$ac_prog", so it can be a program name with args.
10376set dummy $ac_prog; ac_word=$2
10377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10378$as_echo_n "checking for $ac_word... " >&6; }
10379if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
10380  $as_echo_n "(cached) " >&6
10381else
10382  case $CHECK_TOOLSDIR_GMAKE in
10383  [\\/]* | ?:[\\/]*)
10384  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
10385  ;;
10386  *)
10387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10388for as_dir in $PATH
10389do
10390  IFS=$as_save_IFS
10391  test -z "$as_dir" && as_dir=.
10392    for ac_exec_ext in '' $ac_executable_extensions; do
10393  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10394    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
10395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10396    break 2
10397  fi
10398done
10399  done
10400IFS=$as_save_IFS
10401
10402  ;;
10403esac
10404fi
10405CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
10406if test -n "$CHECK_TOOLSDIR_GMAKE"; then
10407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
10408$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
10409else
10410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411$as_echo "no" >&6; }
10412fi
10413
10414
10415  test -n "$CHECK_TOOLSDIR_GMAKE" && break
10416done
10417
10418
10419  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
10420  DESCRIPTION="gmake in tools-dir"
10421  if test "x$MAKE_CANDIDATE" != x; then
10422    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
10423$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
10424    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
10425    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
10426    if test "x$IS_GNU_MAKE" = x; then
10427      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
10428$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
10429    else
10430      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
10431      if test "x$IS_MODERN_MAKE" = x; then
10432        { $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
10433$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;}
10434      else
10435        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
10436          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10437            MAKE_EXPECTED_ENV='cygwin'
10438          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10439            MAKE_EXPECTED_ENV='msys'
10440          else
10441            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
10442          fi
10443          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
10444          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
10445        else
10446          # Not relevant for non-Windows
10447          IS_MAKE_CORRECT_ENV=true
10448        fi
10449        if test "x$IS_MAKE_CORRECT_ENV" = x; then
10450          { $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
10451$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;}
10452        else
10453          FOUND_MAKE=$MAKE_CANDIDATE
10454
10455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10456
10457  # First separate the path from the arguments. This will split at the first
10458  # space.
10459  complete="$FOUND_MAKE"
10460  path="${complete%% *}"
10461  tmp="$complete EOL"
10462  arguments="${tmp#* }"
10463
10464  # Input might be given as Windows format, start by converting to
10465  # unix format.
10466  new_path=`$CYGPATH -u "$path"`
10467
10468  # Now try to locate executable using which
10469  new_path=`$WHICH "$new_path" 2> /dev/null`
10470  # bat and cmd files are not always considered executable in cygwin causing which
10471  # to not find them
10472  if test "x$new_path" = x \
10473           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
10474           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
10475    new_path=`$CYGPATH -u "$path"`
10476  fi
10477  if test "x$new_path" = x; then
10478    # Oops. Which didn't find the executable.
10479    # The splitting of arguments from the executable at a space might have been incorrect,
10480    # since paths with space are more likely in Windows. Give it another try with the whole
10481    # argument.
10482    path="$complete"
10483    arguments="EOL"
10484    new_path=`$CYGPATH -u "$path"`
10485    new_path=`$WHICH "$new_path" 2> /dev/null`
10486    # bat and cmd files are not always considered executable in cygwin causing which
10487    # to not find them
10488    if test "x$new_path" = x \
10489             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
10490             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
10491      new_path=`$CYGPATH -u "$path"`
10492    fi
10493    if test "x$new_path" = x; then
10494      # It's still not found. Now this is an unrecoverable error.
10495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10496$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10497      has_space=`$ECHO "$complete" | $GREP " "`
10498      if test "x$has_space" != x; then
10499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10501      fi
10502      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10503    fi
10504  fi
10505
10506  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10507  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10508  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10509  # "foo.exe" is OK but "foo" is an error.
10510  #
10511  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10512  # It is also a way to make sure we got the proper file name for the real test later on.
10513  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10514  if test "x$test_shortpath" = x; then
10515    # Short path failed, file does not exist as specified.
10516    # Try adding .exe or .cmd
10517    if test -f "${new_path}.exe"; then
10518       input_to_shortpath="${new_path}.exe"
10519    elif test -f "${new_path}.cmd"; then
10520       input_to_shortpath="${new_path}.cmd"
10521    else
10522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
10523$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
10524      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
10525$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
10526      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10527    fi
10528  else
10529    input_to_shortpath="$new_path"
10530  fi
10531
10532  # Call helper function which possibly converts this using DOS-style short mode.
10533  # If so, the updated path is stored in $new_path.
10534  new_path="$input_to_shortpath"
10535
10536  input_path="$input_to_shortpath"
10537  # Check if we need to convert this using DOS-style short mode. If the path
10538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10539  # take no chances and rewrite it.
10540  # Note: m4 eats our [], so we need to use [ and ] instead.
10541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10542  if test "x$has_forbidden_chars" != x; then
10543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10547      # Going to short mode and back again did indeed matter. Since short mode is
10548      # case insensitive, let's make it lowercase to improve readability.
10549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10550      # Now convert it back to Unix-stile (cygpath)
10551      input_path=`$CYGPATH -u "$shortmode_path"`
10552      new_path="$input_path"
10553    fi
10554  fi
10555
10556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10557  if test "x$test_cygdrive_prefix" = x; then
10558    # As a simple fix, exclude /usr/bin since it's not a real path.
10559    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
10560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10561      # a path prefixed by /cygdrive for fixpath to work.
10562      new_path="$CYGWIN_ROOT_PATH$input_path"
10563    fi
10564  fi
10565
10566  # remove trailing .exe if any
10567  new_path="${new_path/%.exe/}"
10568
10569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10570
10571  # First separate the path from the arguments. This will split at the first
10572  # space.
10573  complete="$FOUND_MAKE"
10574  path="${complete%% *}"
10575  tmp="$complete EOL"
10576  arguments="${tmp#* }"
10577
10578  # Input might be given as Windows format, start by converting to
10579  # unix format.
10580  new_path="$path"
10581
10582  windows_path="$new_path"
10583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10584    unix_path=`$CYGPATH -u "$windows_path"`
10585    new_path="$unix_path"
10586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10588    new_path="$unix_path"
10589  fi
10590
10591
10592  # Now try to locate executable using which
10593  new_path=`$WHICH "$new_path" 2> /dev/null`
10594
10595  if test "x$new_path" = x; then
10596    # Oops. Which didn't find the executable.
10597    # The splitting of arguments from the executable at a space might have been incorrect,
10598    # since paths with space are more likely in Windows. Give it another try with the whole
10599    # argument.
10600    path="$complete"
10601    arguments="EOL"
10602    new_path="$path"
10603
10604  windows_path="$new_path"
10605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10606    unix_path=`$CYGPATH -u "$windows_path"`
10607    new_path="$unix_path"
10608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10610    new_path="$unix_path"
10611  fi
10612
10613
10614    new_path=`$WHICH "$new_path" 2> /dev/null`
10615
10616    if test "x$new_path" = x; then
10617      # It's still not found. Now this is an unrecoverable error.
10618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10619$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10620      has_space=`$ECHO "$complete" | $GREP " "`
10621      if test "x$has_space" != x; then
10622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10624      fi
10625      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10626    fi
10627  fi
10628
10629  # Now new_path has a complete unix path to the binary
10630  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10631    # Keep paths in /bin as-is, but remove trailing .exe if any
10632    new_path="${new_path/%.exe/}"
10633    # Do not save /bin paths to all_fixpath_prefixes!
10634  else
10635    # Not in mixed or Windows style, start by that.
10636    new_path=`cmd //c echo $new_path`
10637
10638  input_path="$new_path"
10639  # Check if we need to convert this using DOS-style short mode. If the path
10640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10641  # take no chances and rewrite it.
10642  # Note: m4 eats our [], so we need to use [ and ] instead.
10643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10644  if test "x$has_forbidden_chars" != x; then
10645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10647  fi
10648
10649    # Output is in $new_path
10650
10651  windows_path="$new_path"
10652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10653    unix_path=`$CYGPATH -u "$windows_path"`
10654    new_path="$unix_path"
10655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10657    new_path="$unix_path"
10658  fi
10659
10660    # remove trailing .exe if any
10661    new_path="${new_path/%.exe/}"
10662
10663    # Save the first 10 bytes of this path to the storage, so fixpath can work.
10664    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10665  fi
10666
10667  else
10668    # We're on a posix platform. Hooray! :)
10669    # First separate the path from the arguments. This will split at the first
10670    # space.
10671    complete="$FOUND_MAKE"
10672    path="${complete%% *}"
10673    tmp="$complete EOL"
10674    arguments="${tmp#* }"
10675
10676    # Cannot rely on the command "which" here since it doesn't always work.
10677    is_absolute_path=`$ECHO "$path" | $GREP ^/`
10678    if test -z "$is_absolute_path"; then
10679      # Path to executable is not absolute. Find it.
10680      IFS_save="$IFS"
10681      IFS=:
10682      for p in $PATH; do
10683        if test -f "$p/$path" && test -x "$p/$path"; then
10684          new_path="$p/$path"
10685          break
10686        fi
10687      done
10688      IFS="$IFS_save"
10689    else
10690      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10691$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10692      new_path="$path"
10693    fi
10694
10695    if test "x$new_path" = x; then
10696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10698        has_space=`$ECHO "$complete" | $GREP " "`
10699        if test "x$has_space" != x; then
10700          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10701$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10702        fi
10703        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10704      fi
10705  fi
10706
10707      # Now join together the path and the arguments once again
10708      if test "x$arguments" != xEOL; then
10709        new_complete="$new_path ${arguments% *}"
10710      else
10711        new_complete="$new_path"
10712      fi
10713
10714  if test "x$complete" != "x$new_complete"; then
10715      FOUND_MAKE="$new_complete"
10716      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10717$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10718    fi
10719
10720        fi
10721      fi
10722    fi
10723  fi
10724
10725        if test "x$FOUND_MAKE" = x; then
10726          for ac_prog in make
10727do
10728  # Extract the first word of "$ac_prog", so it can be a program name with args.
10729set dummy $ac_prog; ac_word=$2
10730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10731$as_echo_n "checking for $ac_word... " >&6; }
10732if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
10733  $as_echo_n "(cached) " >&6
10734else
10735  case $CHECK_TOOLSDIR_MAKE in
10736  [\\/]* | ?:[\\/]*)
10737  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
10738  ;;
10739  *)
10740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10741for as_dir in $PATH
10742do
10743  IFS=$as_save_IFS
10744  test -z "$as_dir" && as_dir=.
10745    for ac_exec_ext in '' $ac_executable_extensions; do
10746  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10747    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
10748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10749    break 2
10750  fi
10751done
10752  done
10753IFS=$as_save_IFS
10754
10755  ;;
10756esac
10757fi
10758CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
10759if test -n "$CHECK_TOOLSDIR_MAKE"; then
10760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
10761$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
10762else
10763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10764$as_echo "no" >&6; }
10765fi
10766
10767
10768  test -n "$CHECK_TOOLSDIR_MAKE" && break
10769done
10770
10771
10772  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
10773  DESCRIPTION="make in tools-dir"
10774  if test "x$MAKE_CANDIDATE" != x; then
10775    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
10776$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
10777    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
10778    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
10779    if test "x$IS_GNU_MAKE" = x; then
10780      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
10781$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
10782    else
10783      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
10784      if test "x$IS_MODERN_MAKE" = x; then
10785        { $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
10786$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;}
10787      else
10788        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
10789          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10790            MAKE_EXPECTED_ENV='cygwin'
10791          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10792            MAKE_EXPECTED_ENV='msys'
10793          else
10794            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
10795          fi
10796          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
10797          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
10798        else
10799          # Not relevant for non-Windows
10800          IS_MAKE_CORRECT_ENV=true
10801        fi
10802        if test "x$IS_MAKE_CORRECT_ENV" = x; then
10803          { $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
10804$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;}
10805        else
10806          FOUND_MAKE=$MAKE_CANDIDATE
10807
10808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10809
10810  # First separate the path from the arguments. This will split at the first
10811  # space.
10812  complete="$FOUND_MAKE"
10813  path="${complete%% *}"
10814  tmp="$complete EOL"
10815  arguments="${tmp#* }"
10816
10817  # Input might be given as Windows format, start by converting to
10818  # unix format.
10819  new_path=`$CYGPATH -u "$path"`
10820
10821  # Now try to locate executable using which
10822  new_path=`$WHICH "$new_path" 2> /dev/null`
10823  # bat and cmd files are not always considered executable in cygwin causing which
10824  # to not find them
10825  if test "x$new_path" = x \
10826           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
10827           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
10828    new_path=`$CYGPATH -u "$path"`
10829  fi
10830  if test "x$new_path" = x; then
10831    # Oops. Which didn't find the executable.
10832    # The splitting of arguments from the executable at a space might have been incorrect,
10833    # since paths with space are more likely in Windows. Give it another try with the whole
10834    # argument.
10835    path="$complete"
10836    arguments="EOL"
10837    new_path=`$CYGPATH -u "$path"`
10838    new_path=`$WHICH "$new_path" 2> /dev/null`
10839    # bat and cmd files are not always considered executable in cygwin causing which
10840    # to not find them
10841    if test "x$new_path" = x \
10842             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
10843             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
10844      new_path=`$CYGPATH -u "$path"`
10845    fi
10846    if test "x$new_path" = x; then
10847      # It's still not found. Now this is an unrecoverable error.
10848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10849$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10850      has_space=`$ECHO "$complete" | $GREP " "`
10851      if test "x$has_space" != x; then
10852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10854      fi
10855      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10856    fi
10857  fi
10858
10859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10862  # "foo.exe" is OK but "foo" is an error.
10863  #
10864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10865  # It is also a way to make sure we got the proper file name for the real test later on.
10866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10867  if test "x$test_shortpath" = x; then
10868    # Short path failed, file does not exist as specified.
10869    # Try adding .exe or .cmd
10870    if test -f "${new_path}.exe"; then
10871       input_to_shortpath="${new_path}.exe"
10872    elif test -f "${new_path}.cmd"; then
10873       input_to_shortpath="${new_path}.cmd"
10874    else
10875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
10876$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
10877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
10878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
10879      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10880    fi
10881  else
10882    input_to_shortpath="$new_path"
10883  fi
10884
10885  # Call helper function which possibly converts this using DOS-style short mode.
10886  # If so, the updated path is stored in $new_path.
10887  new_path="$input_to_shortpath"
10888
10889  input_path="$input_to_shortpath"
10890  # Check if we need to convert this using DOS-style short mode. If the path
10891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10892  # take no chances and rewrite it.
10893  # Note: m4 eats our [], so we need to use [ and ] instead.
10894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10895  if test "x$has_forbidden_chars" != x; then
10896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10900      # Going to short mode and back again did indeed matter. Since short mode is
10901      # case insensitive, let's make it lowercase to improve readability.
10902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10903      # Now convert it back to Unix-stile (cygpath)
10904      input_path=`$CYGPATH -u "$shortmode_path"`
10905      new_path="$input_path"
10906    fi
10907  fi
10908
10909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10910  if test "x$test_cygdrive_prefix" = x; then
10911    # As a simple fix, exclude /usr/bin since it's not a real path.
10912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
10913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10914      # a path prefixed by /cygdrive for fixpath to work.
10915      new_path="$CYGWIN_ROOT_PATH$input_path"
10916    fi
10917  fi
10918
10919  # remove trailing .exe if any
10920  new_path="${new_path/%.exe/}"
10921
10922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10923
10924  # First separate the path from the arguments. This will split at the first
10925  # space.
10926  complete="$FOUND_MAKE"
10927  path="${complete%% *}"
10928  tmp="$complete EOL"
10929  arguments="${tmp#* }"
10930
10931  # Input might be given as Windows format, start by converting to
10932  # unix format.
10933  new_path="$path"
10934
10935  windows_path="$new_path"
10936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10937    unix_path=`$CYGPATH -u "$windows_path"`
10938    new_path="$unix_path"
10939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10941    new_path="$unix_path"
10942  fi
10943
10944
10945  # Now try to locate executable using which
10946  new_path=`$WHICH "$new_path" 2> /dev/null`
10947
10948  if test "x$new_path" = x; then
10949    # Oops. Which didn't find the executable.
10950    # The splitting of arguments from the executable at a space might have been incorrect,
10951    # since paths with space are more likely in Windows. Give it another try with the whole
10952    # argument.
10953    path="$complete"
10954    arguments="EOL"
10955    new_path="$path"
10956
10957  windows_path="$new_path"
10958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10959    unix_path=`$CYGPATH -u "$windows_path"`
10960    new_path="$unix_path"
10961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10963    new_path="$unix_path"
10964  fi
10965
10966
10967    new_path=`$WHICH "$new_path" 2> /dev/null`
10968
10969    if test "x$new_path" = x; then
10970      # It's still not found. Now this is an unrecoverable error.
10971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10972$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10973      has_space=`$ECHO "$complete" | $GREP " "`
10974      if test "x$has_space" != x; then
10975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10977      fi
10978      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10979    fi
10980  fi
10981
10982  # Now new_path has a complete unix path to the binary
10983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10984    # Keep paths in /bin as-is, but remove trailing .exe if any
10985    new_path="${new_path/%.exe/}"
10986    # Do not save /bin paths to all_fixpath_prefixes!
10987  else
10988    # Not in mixed or Windows style, start by that.
10989    new_path=`cmd //c echo $new_path`
10990
10991  input_path="$new_path"
10992  # Check if we need to convert this using DOS-style short mode. If the path
10993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10994  # take no chances and rewrite it.
10995  # Note: m4 eats our [], so we need to use [ and ] instead.
10996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10997  if test "x$has_forbidden_chars" != x; then
10998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11000  fi
11001
11002    # Output is in $new_path
11003
11004  windows_path="$new_path"
11005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11006    unix_path=`$CYGPATH -u "$windows_path"`
11007    new_path="$unix_path"
11008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11010    new_path="$unix_path"
11011  fi
11012
11013    # remove trailing .exe if any
11014    new_path="${new_path/%.exe/}"
11015
11016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
11017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11018  fi
11019
11020  else
11021    # We're on a posix platform. Hooray! :)
11022    # First separate the path from the arguments. This will split at the first
11023    # space.
11024    complete="$FOUND_MAKE"
11025    path="${complete%% *}"
11026    tmp="$complete EOL"
11027    arguments="${tmp#* }"
11028
11029    # Cannot rely on the command "which" here since it doesn't always work.
11030    is_absolute_path=`$ECHO "$path" | $GREP ^/`
11031    if test -z "$is_absolute_path"; then
11032      # Path to executable is not absolute. Find it.
11033      IFS_save="$IFS"
11034      IFS=:
11035      for p in $PATH; do
11036        if test -f "$p/$path" && test -x "$p/$path"; then
11037          new_path="$p/$path"
11038          break
11039        fi
11040      done
11041      IFS="$IFS_save"
11042    else
11043      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
11044$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
11045      new_path="$path"
11046    fi
11047
11048    if test "x$new_path" = x; then
11049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
11050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
11051        has_space=`$ECHO "$complete" | $GREP " "`
11052        if test "x$has_space" != x; then
11053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
11054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
11055        fi
11056        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
11057      fi
11058  fi
11059
11060      # Now join together the path and the arguments once again
11061      if test "x$arguments" != xEOL; then
11062        new_complete="$new_path ${arguments% *}"
11063      else
11064        new_complete="$new_path"
11065      fi
11066
11067  if test "x$complete" != "x$new_complete"; then
11068      FOUND_MAKE="$new_complete"
11069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
11070$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
11071    fi
11072
11073        fi
11074      fi
11075    fi
11076  fi
11077
11078        fi
11079        PATH=$OLD_PATH
11080      fi
11081    fi
11082
11083    if test "x$FOUND_MAKE" = x; then
11084      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
11085    fi
11086  fi
11087
11088  MAKE=$FOUND_MAKE
11089
11090  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
11091$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
11092
11093
11094
11095    # Test if find supports -delete
11096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
11097$as_echo_n "checking if find supports -delete... " >&6; }
11098    FIND_DELETE="-delete"
11099
11100    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
11101
11102    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
11103
11104    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
11105    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
11106        # No, it does not.
11107        rm $DELETEDIR/TestIfFindSupportsDelete
11108        FIND_DELETE="-exec rm \{\} \+"
11109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11110$as_echo "no" >&6; }
11111    else
11112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11113$as_echo "yes" >&6; }
11114    fi
11115    rmdir $DELETEDIR
11116
11117
11118
11119# These tools might not be installed by default,
11120# need hint on how to install them.
11121
11122    for ac_prog in unzip
11123do
11124  # Extract the first word of "$ac_prog", so it can be a program name with args.
11125set dummy $ac_prog; ac_word=$2
11126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11127$as_echo_n "checking for $ac_word... " >&6; }
11128if ${ac_cv_path_UNZIP+:} false; then :
11129  $as_echo_n "(cached) " >&6
11130else
11131  case $UNZIP in
11132  [\\/]* | ?:[\\/]*)
11133  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
11134  ;;
11135  *)
11136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11137for as_dir in $PATH
11138do
11139  IFS=$as_save_IFS
11140  test -z "$as_dir" && as_dir=.
11141    for ac_exec_ext in '' $ac_executable_extensions; do
11142  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11143    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
11144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11145    break 2
11146  fi
11147done
11148  done
11149IFS=$as_save_IFS
11150
11151  ;;
11152esac
11153fi
11154UNZIP=$ac_cv_path_UNZIP
11155if test -n "$UNZIP"; then
11156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
11157$as_echo "$UNZIP" >&6; }
11158else
11159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11160$as_echo "no" >&6; }
11161fi
11162
11163
11164  test -n "$UNZIP" && break
11165done
11166
11167
11168    if test "x$UNZIP" = x; then
11169        if test "xunzip" = x; then
11170          PROG_NAME=unzip
11171        else
11172          PROG_NAME=unzip
11173        fi
11174        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
11175$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
11176        as_fn_error $? "Cannot continue" "$LINENO" 5
11177    fi
11178
11179
11180
11181    for ac_prog in zip
11182do
11183  # Extract the first word of "$ac_prog", so it can be a program name with args.
11184set dummy $ac_prog; ac_word=$2
11185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11186$as_echo_n "checking for $ac_word... " >&6; }
11187if ${ac_cv_path_ZIP+:} false; then :
11188  $as_echo_n "(cached) " >&6
11189else
11190  case $ZIP in
11191  [\\/]* | ?:[\\/]*)
11192  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
11193  ;;
11194  *)
11195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11196for as_dir in $PATH
11197do
11198  IFS=$as_save_IFS
11199  test -z "$as_dir" && as_dir=.
11200    for ac_exec_ext in '' $ac_executable_extensions; do
11201  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11202    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
11203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11204    break 2
11205  fi
11206done
11207  done
11208IFS=$as_save_IFS
11209
11210  ;;
11211esac
11212fi
11213ZIP=$ac_cv_path_ZIP
11214if test -n "$ZIP"; then
11215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
11216$as_echo "$ZIP" >&6; }
11217else
11218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11219$as_echo "no" >&6; }
11220fi
11221
11222
11223  test -n "$ZIP" && break
11224done
11225
11226
11227    if test "x$ZIP" = x; then
11228        if test "xzip" = x; then
11229          PROG_NAME=zip
11230        else
11231          PROG_NAME=zip
11232        fi
11233        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
11234$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
11235        as_fn_error $? "Cannot continue" "$LINENO" 5
11236    fi
11237
11238
11239
11240# Non-required basic tools
11241
11242# Extract the first word of "ldd", so it can be a program name with args.
11243set dummy ldd; ac_word=$2
11244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11245$as_echo_n "checking for $ac_word... " >&6; }
11246if ${ac_cv_path_LDD+:} false; then :
11247  $as_echo_n "(cached) " >&6
11248else
11249  case $LDD in
11250  [\\/]* | ?:[\\/]*)
11251  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
11252  ;;
11253  *)
11254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11255for as_dir in $PATH
11256do
11257  IFS=$as_save_IFS
11258  test -z "$as_dir" && as_dir=.
11259    for ac_exec_ext in '' $ac_executable_extensions; do
11260  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11261    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
11262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11263    break 2
11264  fi
11265done
11266  done
11267IFS=$as_save_IFS
11268
11269  ;;
11270esac
11271fi
11272LDD=$ac_cv_path_LDD
11273if test -n "$LDD"; then
11274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
11275$as_echo "$LDD" >&6; }
11276else
11277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11278$as_echo "no" >&6; }
11279fi
11280
11281
11282if test "x$LDD" = "x"; then
11283    # List shared lib dependencies is used for
11284    # debug output and checking for forbidden dependencies.
11285    # We can build without it.
11286    LDD="true"
11287fi
11288# Extract the first word of "otool", so it can be a program name with args.
11289set dummy otool; ac_word=$2
11290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11291$as_echo_n "checking for $ac_word... " >&6; }
11292if ${ac_cv_path_OTOOL+:} false; then :
11293  $as_echo_n "(cached) " >&6
11294else
11295  case $OTOOL in
11296  [\\/]* | ?:[\\/]*)
11297  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
11298  ;;
11299  *)
11300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11301for as_dir in $PATH
11302do
11303  IFS=$as_save_IFS
11304  test -z "$as_dir" && as_dir=.
11305    for ac_exec_ext in '' $ac_executable_extensions; do
11306  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11307    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
11308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11309    break 2
11310  fi
11311done
11312  done
11313IFS=$as_save_IFS
11314
11315  ;;
11316esac
11317fi
11318OTOOL=$ac_cv_path_OTOOL
11319if test -n "$OTOOL"; then
11320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
11321$as_echo "$OTOOL" >&6; }
11322else
11323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11324$as_echo "no" >&6; }
11325fi
11326
11327
11328if test "x$OTOOL" = "x"; then
11329   OTOOL="true"
11330fi
11331for ac_prog in readelf greadelf
11332do
11333  # Extract the first word of "$ac_prog", so it can be a program name with args.
11334set dummy $ac_prog; ac_word=$2
11335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11336$as_echo_n "checking for $ac_word... " >&6; }
11337if ${ac_cv_path_READELF+:} false; then :
11338  $as_echo_n "(cached) " >&6
11339else
11340  case $READELF in
11341  [\\/]* | ?:[\\/]*)
11342  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
11343  ;;
11344  *)
11345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11346for as_dir in $PATH
11347do
11348  IFS=$as_save_IFS
11349  test -z "$as_dir" && as_dir=.
11350    for ac_exec_ext in '' $ac_executable_extensions; do
11351  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11352    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
11353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11354    break 2
11355  fi
11356done
11357  done
11358IFS=$as_save_IFS
11359
11360  ;;
11361esac
11362fi
11363READELF=$ac_cv_path_READELF
11364if test -n "$READELF"; then
11365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
11366$as_echo "$READELF" >&6; }
11367else
11368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369$as_echo "no" >&6; }
11370fi
11371
11372
11373  test -n "$READELF" && break
11374done
11375
11376# Extract the first word of "hg", so it can be a program name with args.
11377set dummy hg; ac_word=$2
11378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11379$as_echo_n "checking for $ac_word... " >&6; }
11380if ${ac_cv_path_HG+:} false; then :
11381  $as_echo_n "(cached) " >&6
11382else
11383  case $HG in
11384  [\\/]* | ?:[\\/]*)
11385  ac_cv_path_HG="$HG" # Let the user override the test with a path.
11386  ;;
11387  *)
11388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11389for as_dir in $PATH
11390do
11391  IFS=$as_save_IFS
11392  test -z "$as_dir" && as_dir=.
11393    for ac_exec_ext in '' $ac_executable_extensions; do
11394  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11395    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
11396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11397    break 2
11398  fi
11399done
11400  done
11401IFS=$as_save_IFS
11402
11403  ;;
11404esac
11405fi
11406HG=$ac_cv_path_HG
11407if test -n "$HG"; then
11408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
11409$as_echo "$HG" >&6; }
11410else
11411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11412$as_echo "no" >&6; }
11413fi
11414
11415
11416# Extract the first word of "stat", so it can be a program name with args.
11417set dummy stat; ac_word=$2
11418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11419$as_echo_n "checking for $ac_word... " >&6; }
11420if ${ac_cv_path_STAT+:} false; then :
11421  $as_echo_n "(cached) " >&6
11422else
11423  case $STAT in
11424  [\\/]* | ?:[\\/]*)
11425  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
11426  ;;
11427  *)
11428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11429for as_dir in $PATH
11430do
11431  IFS=$as_save_IFS
11432  test -z "$as_dir" && as_dir=.
11433    for ac_exec_ext in '' $ac_executable_extensions; do
11434  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11435    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
11436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11437    break 2
11438  fi
11439done
11440  done
11441IFS=$as_save_IFS
11442
11443  ;;
11444esac
11445fi
11446STAT=$ac_cv_path_STAT
11447if test -n "$STAT"; then
11448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
11449$as_echo "$STAT" >&6; }
11450else
11451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11452$as_echo "no" >&6; }
11453fi
11454
11455
11456# Extract the first word of "time", so it can be a program name with args.
11457set dummy time; ac_word=$2
11458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11459$as_echo_n "checking for $ac_word... " >&6; }
11460if ${ac_cv_path_TIME+:} false; then :
11461  $as_echo_n "(cached) " >&6
11462else
11463  case $TIME in
11464  [\\/]* | ?:[\\/]*)
11465  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
11466  ;;
11467  *)
11468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11469for as_dir in $PATH
11470do
11471  IFS=$as_save_IFS
11472  test -z "$as_dir" && as_dir=.
11473    for ac_exec_ext in '' $ac_executable_extensions; do
11474  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11475    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
11476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11477    break 2
11478  fi
11479done
11480  done
11481IFS=$as_save_IFS
11482
11483  ;;
11484esac
11485fi
11486TIME=$ac_cv_path_TIME
11487if test -n "$TIME"; then
11488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
11489$as_echo "$TIME" >&6; }
11490else
11491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11492$as_echo "no" >&6; }
11493fi
11494
11495
11496
11497if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
11498
11499    for ac_prog in comm
11500do
11501  # Extract the first word of "$ac_prog", so it can be a program name with args.
11502set dummy $ac_prog; ac_word=$2
11503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11504$as_echo_n "checking for $ac_word... " >&6; }
11505if ${ac_cv_path_COMM+:} false; then :
11506  $as_echo_n "(cached) " >&6
11507else
11508  case $COMM in
11509  [\\/]* | ?:[\\/]*)
11510  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
11511  ;;
11512  *)
11513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11514for as_dir in $PATH
11515do
11516  IFS=$as_save_IFS
11517  test -z "$as_dir" && as_dir=.
11518    for ac_exec_ext in '' $ac_executable_extensions; do
11519  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11520    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
11521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11522    break 2
11523  fi
11524done
11525  done
11526IFS=$as_save_IFS
11527
11528  ;;
11529esac
11530fi
11531COMM=$ac_cv_path_COMM
11532if test -n "$COMM"; then
11533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
11534$as_echo "$COMM" >&6; }
11535else
11536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11537$as_echo "no" >&6; }
11538fi
11539
11540
11541  test -n "$COMM" && break
11542done
11543
11544
11545    if test "x$COMM" = x; then
11546        if test "xcomm" = x; then
11547          PROG_NAME=comm
11548        else
11549          PROG_NAME=comm
11550        fi
11551        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
11552$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
11553        as_fn_error $? "Cannot continue" "$LINENO" 5
11554    fi
11555
11556
11557fi
11558
11559if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
11560
11561    for ac_prog in xattr
11562do
11563  # Extract the first word of "$ac_prog", so it can be a program name with args.
11564set dummy $ac_prog; ac_word=$2
11565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11566$as_echo_n "checking for $ac_word... " >&6; }
11567if ${ac_cv_path_XATTR+:} false; then :
11568  $as_echo_n "(cached) " >&6
11569else
11570  case $XATTR in
11571  [\\/]* | ?:[\\/]*)
11572  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
11573  ;;
11574  *)
11575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11576for as_dir in $PATH
11577do
11578  IFS=$as_save_IFS
11579  test -z "$as_dir" && as_dir=.
11580    for ac_exec_ext in '' $ac_executable_extensions; do
11581  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11582    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
11583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11584    break 2
11585  fi
11586done
11587  done
11588IFS=$as_save_IFS
11589
11590  ;;
11591esac
11592fi
11593XATTR=$ac_cv_path_XATTR
11594if test -n "$XATTR"; then
11595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
11596$as_echo "$XATTR" >&6; }
11597else
11598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599$as_echo "no" >&6; }
11600fi
11601
11602
11603  test -n "$XATTR" && break
11604done
11605
11606
11607    if test "x$XATTR" = x; then
11608        if test "xxattr" = x; then
11609          PROG_NAME=xattr
11610        else
11611          PROG_NAME=xattr
11612        fi
11613        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
11614$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
11615        as_fn_error $? "Cannot continue" "$LINENO" 5
11616    fi
11617
11618
11619fi
11620
11621
11622# Check if pkg-config is available.
11623
11624
11625if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11626	if test -n "$ac_tool_prefix"; then
11627  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11628set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
11629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11630$as_echo_n "checking for $ac_word... " >&6; }
11631if ${ac_cv_path_PKG_CONFIG+:} false; then :
11632  $as_echo_n "(cached) " >&6
11633else
11634  case $PKG_CONFIG in
11635  [\\/]* | ?:[\\/]*)
11636  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11637  ;;
11638  *)
11639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11640for as_dir in $PATH
11641do
11642  IFS=$as_save_IFS
11643  test -z "$as_dir" && as_dir=.
11644    for ac_exec_ext in '' $ac_executable_extensions; do
11645  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11646    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11648    break 2
11649  fi
11650done
11651  done
11652IFS=$as_save_IFS
11653
11654  ;;
11655esac
11656fi
11657PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11658if test -n "$PKG_CONFIG"; then
11659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11660$as_echo "$PKG_CONFIG" >&6; }
11661else
11662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11663$as_echo "no" >&6; }
11664fi
11665
11666
11667fi
11668if test -z "$ac_cv_path_PKG_CONFIG"; then
11669  ac_pt_PKG_CONFIG=$PKG_CONFIG
11670  # Extract the first word of "pkg-config", so it can be a program name with args.
11671set dummy pkg-config; ac_word=$2
11672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11673$as_echo_n "checking for $ac_word... " >&6; }
11674if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
11675  $as_echo_n "(cached) " >&6
11676else
11677  case $ac_pt_PKG_CONFIG in
11678  [\\/]* | ?:[\\/]*)
11679  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11680  ;;
11681  *)
11682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11683for as_dir in $PATH
11684do
11685  IFS=$as_save_IFS
11686  test -z "$as_dir" && as_dir=.
11687    for ac_exec_ext in '' $ac_executable_extensions; do
11688  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11689    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11691    break 2
11692  fi
11693done
11694  done
11695IFS=$as_save_IFS
11696
11697  ;;
11698esac
11699fi
11700ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
11701if test -n "$ac_pt_PKG_CONFIG"; then
11702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
11703$as_echo "$ac_pt_PKG_CONFIG" >&6; }
11704else
11705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11706$as_echo "no" >&6; }
11707fi
11708
11709  if test "x$ac_pt_PKG_CONFIG" = x; then
11710    PKG_CONFIG=""
11711  else
11712    case $cross_compiling:$ac_tool_warned in
11713yes:)
11714{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11715$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11716ac_tool_warned=yes ;;
11717esac
11718    PKG_CONFIG=$ac_pt_PKG_CONFIG
11719  fi
11720else
11721  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
11722fi
11723
11724fi
11725if test -n "$PKG_CONFIG"; then
11726	_pkg_min_version=0.9.0
11727	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
11728$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
11729	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
11730		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11731$as_echo "yes" >&6; }
11732	else
11733		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11734$as_echo "no" >&6; }
11735		PKG_CONFIG=""
11736	fi
11737
11738fi
11739
11740# After basic tools have been setup, we can check build os specific details.
11741
11742###############################################################################
11743
11744# Note that this is the build platform OS version!
11745
11746OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
11747OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
11748OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
11749OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
11750
11751
11752
11753
11754
11755# Setup builddeps, for automatic downloading of tools we need.
11756# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
11757# boot-jdk setup, but we need to have basic tools setup first.
11758
11759
11760# Check whether --with-builddeps-conf was given.
11761if test "${with_builddeps_conf+set}" = set; then :
11762  withval=$with_builddeps_conf;
11763fi
11764
11765
11766
11767# Check whether --with-builddeps-server was given.
11768if test "${with_builddeps_server+set}" = set; then :
11769  withval=$with_builddeps_server;
11770fi
11771
11772
11773
11774# Check whether --with-builddeps-dir was given.
11775if test "${with_builddeps_dir+set}" = set; then :
11776  withval=$with_builddeps_dir;
11777else
11778  with_builddeps_dir=/localhome/builddeps
11779fi
11780
11781
11782
11783# Check whether --with-builddeps-group was given.
11784if test "${with_builddeps_group+set}" = set; then :
11785  withval=$with_builddeps_group;
11786fi
11787
11788
11789
11790
11791    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11792        if test "x$with_builddeps_conf" != x; then
11793            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
11794$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
11795            builddepsfile=$with_builddeps_conf
11796            if test -s $builddepsfile; then
11797                . $builddepsfile
11798                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
11799$as_echo "loaded!" >&6; }
11800            else
11801               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
11802           fi
11803        else
11804            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
11805$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
11806            builddepsfile=`mktemp`
11807            touch $builddepsfile
11808            # Put all found confs into a single file.
11809            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
11810            # Source the file to acquire the variables
11811            if test -s $builddepsfile; then
11812                . $builddepsfile
11813                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
11814$as_echo "found at least one!" >&6; }
11815            else
11816               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
11817           fi
11818        fi
11819        # Create build and target names that use _ instead of "-" and ".".
11820        # This is necessary to use them in variable names.
11821        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
11822        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
11823        # Extract rewrite information for build and target
11824        eval rewritten_build=\${REWRITE_${build_var}}
11825        if test "x$rewritten_build" = x; then
11826            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
11827            echo Build stays the same $rewritten_build
11828        else
11829            echo Rewriting build for builddeps into $rewritten_build
11830        fi
11831        eval rewritten_target=\${REWRITE_${target_var}}
11832        if test "x$rewritten_target" = x; then
11833            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
11834            echo Target stays the same $rewritten_target
11835        else
11836            echo Rewriting target for builddeps into $rewritten_target
11837        fi
11838        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
11839        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
11840    fi
11841    for ac_prog in 7z unzip
11842do
11843  # Extract the first word of "$ac_prog", so it can be a program name with args.
11844set dummy $ac_prog; ac_word=$2
11845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11846$as_echo_n "checking for $ac_word... " >&6; }
11847if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
11848  $as_echo_n "(cached) " >&6
11849else
11850  if test -n "$BDEPS_UNZIP"; then
11851  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
11852else
11853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11854for as_dir in $PATH
11855do
11856  IFS=$as_save_IFS
11857  test -z "$as_dir" && as_dir=.
11858    for ac_exec_ext in '' $ac_executable_extensions; do
11859  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11860    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
11861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11862    break 2
11863  fi
11864done
11865  done
11866IFS=$as_save_IFS
11867
11868fi
11869fi
11870BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
11871if test -n "$BDEPS_UNZIP"; then
11872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
11873$as_echo "$BDEPS_UNZIP" >&6; }
11874else
11875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11876$as_echo "no" >&6; }
11877fi
11878
11879
11880  test -n "$BDEPS_UNZIP" && break
11881done
11882
11883    if test "x$BDEPS_UNZIP" = x7z; then
11884        BDEPS_UNZIP="7z x"
11885    fi
11886
11887    for ac_prog in wget lftp ftp
11888do
11889  # Extract the first word of "$ac_prog", so it can be a program name with args.
11890set dummy $ac_prog; ac_word=$2
11891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11892$as_echo_n "checking for $ac_word... " >&6; }
11893if ${ac_cv_prog_BDEPS_FTP+:} false; then :
11894  $as_echo_n "(cached) " >&6
11895else
11896  if test -n "$BDEPS_FTP"; then
11897  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
11898else
11899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11900for as_dir in $PATH
11901do
11902  IFS=$as_save_IFS
11903  test -z "$as_dir" && as_dir=.
11904    for ac_exec_ext in '' $ac_executable_extensions; do
11905  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11906    ac_cv_prog_BDEPS_FTP="$ac_prog"
11907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11908    break 2
11909  fi
11910done
11911  done
11912IFS=$as_save_IFS
11913
11914fi
11915fi
11916BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11917if test -n "$BDEPS_FTP"; then
11918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11919$as_echo "$BDEPS_FTP" >&6; }
11920else
11921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11922$as_echo "no" >&6; }
11923fi
11924
11925
11926  test -n "$BDEPS_FTP" && break
11927done
11928
11929
11930
11931###############################################################################
11932#
11933# Determine OpenJDK variants, options and version numbers.
11934#
11935###############################################################################
11936
11937# We need build & target for this.
11938
11939
11940###############################################################################
11941#
11942# Should we build a JDK/JVM with headful support (ie a graphical ui)?
11943# We always build headless support.
11944#
11945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11946$as_echo_n "checking headful support... " >&6; }
11947# Check whether --enable-headful was given.
11948if test "${enable_headful+set}" = set; then :
11949  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11950else
11951  SUPPORT_HEADFUL=yes
11952fi
11953
11954
11955SUPPORT_HEADLESS=yes
11956BUILD_HEADLESS="BUILD_HEADLESS:=true"
11957
11958if test "x$SUPPORT_HEADFUL" = xyes; then
11959    # We are building both headful and headless.
11960    headful_msg="inlude support for both headful and headless"
11961fi
11962
11963if test "x$SUPPORT_HEADFUL" = xno; then
11964    # Thus we are building headless only.
11965    BUILD_HEADLESS="BUILD_HEADLESS:=true"
11966    headful_msg="headless only"
11967fi
11968
11969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11970$as_echo "$headful_msg" >&6; }
11971
11972
11973
11974
11975
11976# Control wether Hotspot runs Queens test after build.
11977# Check whether --enable-hotspot-test-in-build was given.
11978if test "${enable_hotspot_test_in_build+set}" = set; then :
11979  enableval=$enable_hotspot_test_in_build;
11980else
11981  enable_hotspot_test_in_build=no
11982fi
11983
11984if test "x$enable_hotspot_test_in_build" = "xyes"; then
11985    TEST_IN_BUILD=true
11986else
11987    TEST_IN_BUILD=false
11988fi
11989
11990
11991###############################################################################
11992#
11993# Choose cacerts source file
11994#
11995
11996# Check whether --with-cacerts-file was given.
11997if test "${with_cacerts_file+set}" = set; then :
11998  withval=$with_cacerts_file;
11999fi
12000
12001if test "x$with_cacerts_file" != x; then
12002    CACERTS_FILE=$with_cacerts_file
12003else
12004    if test "x$OPENJDK" = "xtrue"; then
12005        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
12006    else
12007        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
12008    fi
12009fi
12010
12011
12012###############################################################################
12013#
12014# Enable or disable unlimited crypto
12015#
12016# Check whether --enable-unlimited-crypto was given.
12017if test "${enable_unlimited_crypto+set}" = set; then :
12018  enableval=$enable_unlimited_crypto;
12019else
12020  enable_unlimited_crypto=no
12021fi
12022
12023if test "x$enable_unlimited_crypto" = "xyes"; then
12024    UNLIMITED_CRYPTO=true
12025else
12026    UNLIMITED_CRYPTO=false
12027fi
12028
12029
12030###############################################################################
12031#
12032# Enable or disable the elliptic curve crypto implementation
12033#
12034
12035
12036###############################################################################
12037#
12038# Compress jars
12039#
12040COMPRESS_JARS=false
12041
12042
12043
12044
12045# Source the version numbers
12046. $AUTOCONF_DIR/version-numbers
12047
12048# Get the settings from parameters
12049
12050# Check whether --with-milestone was given.
12051if test "${with_milestone+set}" = set; then :
12052  withval=$with_milestone;
12053fi
12054
12055if test "x$with_milestone" = xyes; then
12056  as_fn_error $? "Milestone must have a value" "$LINENO" 5
12057elif test "x$with_milestone" != x; then
12058    MILESTONE="$with_milestone"
12059fi
12060if test "x$MILESTONE" = x; then
12061  MILESTONE=internal
12062fi
12063
12064
12065# Check whether --with-build-number was given.
12066if test "${with_build_number+set}" = set; then :
12067  withval=$with_build_number;
12068fi
12069
12070if test "x$with_build_number" = xyes; then
12071  as_fn_error $? "Build number must have a value" "$LINENO" 5
12072elif test "x$with_build_number" != x; then
12073  JDK_BUILD_NUMBER="$with_build_number"
12074fi
12075if test "x$JDK_BUILD_NUMBER" = x; then
12076  JDK_BUILD_NUMBER=b00
12077fi
12078
12079
12080# Check whether --with-user-release-suffix was given.
12081if test "${with_user_release_suffix+set}" = set; then :
12082  withval=$with_user_release_suffix;
12083fi
12084
12085if test "x$with_user_release_suffix" = xyes; then
12086  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
12087elif test "x$with_user_release_suffix" != x; then
12088  USER_RELEASE_SUFFIX="$with_user_release_suffix"
12089else
12090  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
12091  # Avoid [:alnum:] since it depends on the locale.
12092  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
12093  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12094fi
12095
12096
12097# Now set the JDK version, milestone, build number etc.
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112COPYRIGHT_YEAR=`date +'%Y'`
12113
12114
12115if test "x$JDK_UPDATE_VERSION" != x; then
12116  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
12117else
12118  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
12119fi
12120
12121
12122COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
12123
12124
12125
12126###############################################################################
12127#
12128# Setup BootJDK, used to bootstrap the build.
12129#
12130###############################################################################
12131
12132
12133BOOT_JDK_FOUND=no
12134
12135# Check whether --with-boot-jdk was given.
12136if test "${with_boot_jdk+set}" = set; then :
12137  withval=$with_boot_jdk;
12138fi
12139
12140
12141# We look for the Boot JDK through various means, going from more certain to
12142# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
12143# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
12144# must check if this is indeed valid; otherwise we'll continue looking.
12145
12146# Test: Is bootjdk explicitely set by command line arguments?
12147
12148  if test "x$BOOT_JDK_FOUND" = xno; then
12149    # Now execute the test
12150
12151if test "x$with_boot_jdk" != x; then
12152    BOOT_JDK=$with_boot_jdk
12153    BOOT_JDK_FOUND=maybe
12154    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
12155$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
12156fi
12157
12158
12159    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12160    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12161      # Do we have a bin/java?
12162      if test ! -x "$BOOT_JDK/bin/java"; then
12163        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12165        BOOT_JDK_FOUND=no
12166      else
12167        # Do we have a bin/javac?
12168        if test ! -x "$BOOT_JDK/bin/javac"; then
12169          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12171          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12172$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12173          BOOT_JDK_FOUND=no
12174        else
12175          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12176          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12177            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12179            BOOT_JDK_FOUND=no
12180          else
12181            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12182            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12183
12184            # Extra M4 quote needed to protect [] in grep expression.
12185            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12186            if test "x$FOUND_VERSION_78" = x; then
12187              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12189              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12190$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12191              BOOT_JDK_FOUND=no
12192            else
12193              # We're done! :-)
12194              BOOT_JDK_FOUND=yes
12195
12196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12197
12198  # Input might be given as Windows format, start by converting to
12199  # unix format.
12200  path="$BOOT_JDK"
12201  new_path=`$CYGPATH -u "$path"`
12202
12203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12206  # "foo.exe" is OK but "foo" is an error.
12207  #
12208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12209  # It is also a way to make sure we got the proper file name for the real test later on.
12210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12211  if test "x$test_shortpath" = x; then
12212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12213$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12214    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12215  fi
12216
12217  # Call helper function which possibly converts this using DOS-style short mode.
12218  # If so, the updated path is stored in $new_path.
12219
12220  input_path="$new_path"
12221  # Check if we need to convert this using DOS-style short mode. If the path
12222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12223  # take no chances and rewrite it.
12224  # Note: m4 eats our [], so we need to use [ and ] instead.
12225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12226  if test "x$has_forbidden_chars" != x; then
12227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12231      # Going to short mode and back again did indeed matter. Since short mode is
12232      # case insensitive, let's make it lowercase to improve readability.
12233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12234      # Now convert it back to Unix-stile (cygpath)
12235      input_path=`$CYGPATH -u "$shortmode_path"`
12236      new_path="$input_path"
12237    fi
12238  fi
12239
12240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12241  if test "x$test_cygdrive_prefix" = x; then
12242    # As a simple fix, exclude /usr/bin since it's not a real path.
12243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12245      # a path prefixed by /cygdrive for fixpath to work.
12246      new_path="$CYGWIN_ROOT_PATH$input_path"
12247    fi
12248  fi
12249
12250
12251  if test "x$path" != "x$new_path"; then
12252    BOOT_JDK="$new_path"
12253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12255  fi
12256
12257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12258
12259  path="$BOOT_JDK"
12260  has_colon=`$ECHO $path | $GREP ^.:`
12261  new_path="$path"
12262  if test "x$has_colon" = x; then
12263    # Not in mixed or Windows style, start by that.
12264    new_path=`cmd //c echo $path`
12265  fi
12266
12267
12268  input_path="$new_path"
12269  # Check if we need to convert this using DOS-style short mode. If the path
12270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12271  # take no chances and rewrite it.
12272  # Note: m4 eats our [], so we need to use [ and ] instead.
12273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12274  if test "x$has_forbidden_chars" != x; then
12275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12277  fi
12278
12279
12280  windows_path="$new_path"
12281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12282    unix_path=`$CYGPATH -u "$windows_path"`
12283    new_path="$unix_path"
12284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12286    new_path="$unix_path"
12287  fi
12288
12289  if test "x$path" != "x$new_path"; then
12290    BOOT_JDK="$new_path"
12291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12292$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12293  fi
12294
12295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12297
12298  else
12299    # We're on a posix platform. Hooray! :)
12300    path="$BOOT_JDK"
12301
12302    if test ! -f "$path" && test ! -d "$path"; then
12303      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12304    fi
12305
12306    has_space=`$ECHO "$path" | $GREP " "`
12307    if test "x$has_space" != x; then
12308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12309$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12310      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12311    fi
12312  fi
12313
12314              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12315$as_echo_n "checking for Boot JDK... " >&6; }
12316              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12317$as_echo "$BOOT_JDK" >&6; }
12318              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12319$as_echo_n "checking Boot JDK version... " >&6; }
12320              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12321              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12322$as_echo "$BOOT_JDK_VERSION" >&6; }
12323            fi # end check jdk version
12324          fi # end check rt.jar
12325        fi # end check javac
12326      fi # end check java
12327    fi # end check boot jdk found
12328  fi
12329
12330if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
12331  # Having specified an argument which is incorrect will produce an instant failure;
12332  # we should not go on looking
12333  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
12334fi
12335
12336# Test: Is bootjdk available from builddeps?
12337
12338  if test "x$BOOT_JDK_FOUND" = xno; then
12339    # Now execute the test
12340
12341
12342
12343    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
12344        # Source the builddeps file again, to make sure it uses the latest variables!
12345        . $builddepsfile
12346        # Look for a target and build machine specific resource!
12347        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
12348        if test "x$resource" = x; then
12349            # Ok, lets instead look for a target specific resource
12350            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
12351        fi
12352        if test "x$resource" = x; then
12353            # Ok, lets instead look for a build specific resource
12354            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
12355        fi
12356        if test "x$resource" = x; then
12357            # Ok, lets instead look for a generic resource
12358            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
12359            resource=${builddep_bootjdk}
12360        fi
12361        if test "x$resource" != x; then
12362            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
12363$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
12364	    # If the resource in the builddeps.conf file is an existing directory,
12365	    # for example /java/linux/cups
12366	    if test -d ${resource}; then
12367	       depdir=${resource}
12368	    else
12369
12370# bootjdk is for example mymodule
12371# $resource is for example libs/general/libmymod_1_2_3.zip
12372# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
12373# $with_builddeps_dir is for example /localhome/builddeps
12374# depdir is the name of the variable into which we store the depdir, eg MYMOD
12375# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
12376# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
12377    filename=`basename $resource`
12378    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
12379    filebase=${filename%%.*}
12380    extension=${filename#*.}
12381    installdir=$with_builddeps_dir/$filebase
12382    if test ! -f $installdir/$filename.unpacked; then
12383        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
12384$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
12385        if test ! -d $installdir; then
12386            mkdir -p $installdir
12387        fi
12388        if test ! -d $installdir; then
12389            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
12390        fi
12391        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
12392        touch $tmpfile
12393        if test ! -f $tmpfile; then
12394            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
12395        fi
12396
12397    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
12398    # $tmpfile is the local file name for the downloaded file.
12399    VALID_TOOL=no
12400    if test "x$BDEPS_FTP" = xwget; then
12401       VALID_TOOL=yes
12402       wget -O $tmpfile $with_builddeps_server/$resource
12403    fi
12404    if test "x$BDEPS_FTP" = xlftp; then
12405       VALID_TOOL=yes
12406       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
12407    fi
12408    if test "x$BDEPS_FTP" = xftp; then
12409        VALID_TOOL=yes
12410        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
12411        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
12412        FTPUSERPWD=${FTPSERVER%%@*}
12413        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
12414            FTPUSER=${userpwd%%:*}
12415            FTPPWD=${userpwd#*@}
12416            FTPSERVER=${FTPSERVER#*@}
12417        else
12418            FTPUSER=ftp
12419            FTPPWD=ftp
12420        fi
12421        # the "pass" command does not work on some
12422        # ftp clients (read ftp.exe) but if it works,
12423        # passive mode is better!
12424        (\
12425            echo "user $FTPUSER $FTPPWD"        ;\
12426            echo "pass"                         ;\
12427            echo "bin"                          ;\
12428            echo "get $FTPPATH $tmpfile"              ;\
12429        ) | ftp -in $FTPSERVER
12430    fi
12431    if test "x$VALID_TOOL" != xyes; then
12432       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
12433    fi
12434
12435        mv $tmpfile $installdir/$filename
12436        if test ! -s $installdir/$filename; then
12437            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
12438        fi
12439        case "$extension" in
12440            zip)  echo "Unzipping $installdir/$filename..."
12441               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
12442            ;;
12443            tar.gz) echo "Untaring $installdir/$filename..."
12444               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
12445            ;;
12446            tgz) echo "Untaring $installdir/$filename..."
12447               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
12448            ;;
12449            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
12450            ;;
12451        esac
12452    fi
12453    if test -f $installdir/$filename.unpacked; then
12454        depdir=$installdir
12455    fi
12456
12457	    fi
12458            # Source the builddeps file again, because in the previous command, the depdir
12459            # was updated to point at the current build dependency install directory.
12460            . $builddepsfile
12461            # Now extract variables from the builddeps.conf files.
12462            theroot=${builddep_bootjdk_ROOT}
12463            thecflags=${builddep_bootjdk_CFLAGS}
12464            thelibs=${builddep_bootjdk_LIBS}
12465            if test "x$depdir" = x; then
12466                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
12467            fi
12468            BOOT_JDK=$depdir
12469            if test "x$theroot" != x; then
12470               BOOT_JDK="$theroot"
12471            fi
12472            if test "x$thecflags" != x; then
12473               BOOT_JDK_CFLAGS="$thecflags"
12474            fi
12475            if test "x$thelibs" != x; then
12476               BOOT_JDK_LIBS="$thelibs"
12477            fi
12478            BOOT_JDK_FOUND=maybe
12479            else BOOT_JDK_FOUND=no
12480
12481        fi
12482        else BOOT_JDK_FOUND=no
12483
12484    fi
12485
12486
12487
12488    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12489    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12490      # Do we have a bin/java?
12491      if test ! -x "$BOOT_JDK/bin/java"; then
12492        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12494        BOOT_JDK_FOUND=no
12495      else
12496        # Do we have a bin/javac?
12497        if test ! -x "$BOOT_JDK/bin/javac"; then
12498          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12500          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12501$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12502          BOOT_JDK_FOUND=no
12503        else
12504          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12505          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12506            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12508            BOOT_JDK_FOUND=no
12509          else
12510            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12511            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12512
12513            # Extra M4 quote needed to protect [] in grep expression.
12514            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12515            if test "x$FOUND_VERSION_78" = x; then
12516              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12518              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12519$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12520              BOOT_JDK_FOUND=no
12521            else
12522              # We're done! :-)
12523              BOOT_JDK_FOUND=yes
12524
12525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12526
12527  # Input might be given as Windows format, start by converting to
12528  # unix format.
12529  path="$BOOT_JDK"
12530  new_path=`$CYGPATH -u "$path"`
12531
12532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12535  # "foo.exe" is OK but "foo" is an error.
12536  #
12537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12538  # It is also a way to make sure we got the proper file name for the real test later on.
12539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12540  if test "x$test_shortpath" = x; then
12541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12543    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12544  fi
12545
12546  # Call helper function which possibly converts this using DOS-style short mode.
12547  # If so, the updated path is stored in $new_path.
12548
12549  input_path="$new_path"
12550  # Check if we need to convert this using DOS-style short mode. If the path
12551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12552  # take no chances and rewrite it.
12553  # Note: m4 eats our [], so we need to use [ and ] instead.
12554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12555  if test "x$has_forbidden_chars" != x; then
12556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12560      # Going to short mode and back again did indeed matter. Since short mode is
12561      # case insensitive, let's make it lowercase to improve readability.
12562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12563      # Now convert it back to Unix-stile (cygpath)
12564      input_path=`$CYGPATH -u "$shortmode_path"`
12565      new_path="$input_path"
12566    fi
12567  fi
12568
12569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12570  if test "x$test_cygdrive_prefix" = x; then
12571    # As a simple fix, exclude /usr/bin since it's not a real path.
12572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12574      # a path prefixed by /cygdrive for fixpath to work.
12575      new_path="$CYGWIN_ROOT_PATH$input_path"
12576    fi
12577  fi
12578
12579
12580  if test "x$path" != "x$new_path"; then
12581    BOOT_JDK="$new_path"
12582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12583$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12584  fi
12585
12586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12587
12588  path="$BOOT_JDK"
12589  has_colon=`$ECHO $path | $GREP ^.:`
12590  new_path="$path"
12591  if test "x$has_colon" = x; then
12592    # Not in mixed or Windows style, start by that.
12593    new_path=`cmd //c echo $path`
12594  fi
12595
12596
12597  input_path="$new_path"
12598  # Check if we need to convert this using DOS-style short mode. If the path
12599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12600  # take no chances and rewrite it.
12601  # Note: m4 eats our [], so we need to use [ and ] instead.
12602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12603  if test "x$has_forbidden_chars" != x; then
12604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12606  fi
12607
12608
12609  windows_path="$new_path"
12610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12611    unix_path=`$CYGPATH -u "$windows_path"`
12612    new_path="$unix_path"
12613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12615    new_path="$unix_path"
12616  fi
12617
12618  if test "x$path" != "x$new_path"; then
12619    BOOT_JDK="$new_path"
12620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12621$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12622  fi
12623
12624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12626
12627  else
12628    # We're on a posix platform. Hooray! :)
12629    path="$BOOT_JDK"
12630
12631    if test ! -f "$path" && test ! -d "$path"; then
12632      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12633    fi
12634
12635    has_space=`$ECHO "$path" | $GREP " "`
12636    if test "x$has_space" != x; then
12637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12638$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12639      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12640    fi
12641  fi
12642
12643              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12644$as_echo_n "checking for Boot JDK... " >&6; }
12645              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12646$as_echo "$BOOT_JDK" >&6; }
12647              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12648$as_echo_n "checking Boot JDK version... " >&6; }
12649              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12650              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12651$as_echo "$BOOT_JDK_VERSION" >&6; }
12652            fi # end check jdk version
12653          fi # end check rt.jar
12654        fi # end check javac
12655      fi # end check java
12656    fi # end check boot jdk found
12657  fi
12658
12659
12660# Test: Is $JAVA_HOME set?
12661
12662  if test "x$BOOT_JDK_FOUND" = xno; then
12663    # Now execute the test
12664
12665    if test "x$JAVA_HOME" != x; then
12666        JAVA_HOME_PROCESSED="$JAVA_HOME"
12667
12668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12669
12670  # Input might be given as Windows format, start by converting to
12671  # unix format.
12672  path="$JAVA_HOME_PROCESSED"
12673  new_path=`$CYGPATH -u "$path"`
12674
12675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12678  # "foo.exe" is OK but "foo" is an error.
12679  #
12680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12681  # It is also a way to make sure we got the proper file name for the real test later on.
12682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12683  if test "x$test_shortpath" = x; then
12684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
12685$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
12686    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
12687  fi
12688
12689  # Call helper function which possibly converts this using DOS-style short mode.
12690  # If so, the updated path is stored in $new_path.
12691
12692  input_path="$new_path"
12693  # Check if we need to convert this using DOS-style short mode. If the path
12694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12695  # take no chances and rewrite it.
12696  # Note: m4 eats our [], so we need to use [ and ] instead.
12697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12698  if test "x$has_forbidden_chars" != x; then
12699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12703      # Going to short mode and back again did indeed matter. Since short mode is
12704      # case insensitive, let's make it lowercase to improve readability.
12705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12706      # Now convert it back to Unix-stile (cygpath)
12707      input_path=`$CYGPATH -u "$shortmode_path"`
12708      new_path="$input_path"
12709    fi
12710  fi
12711
12712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12713  if test "x$test_cygdrive_prefix" = x; then
12714    # As a simple fix, exclude /usr/bin since it's not a real path.
12715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12717      # a path prefixed by /cygdrive for fixpath to work.
12718      new_path="$CYGWIN_ROOT_PATH$input_path"
12719    fi
12720  fi
12721
12722
12723  if test "x$path" != "x$new_path"; then
12724    JAVA_HOME_PROCESSED="$new_path"
12725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
12726$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
12727  fi
12728
12729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12730
12731  path="$JAVA_HOME_PROCESSED"
12732  has_colon=`$ECHO $path | $GREP ^.:`
12733  new_path="$path"
12734  if test "x$has_colon" = x; then
12735    # Not in mixed or Windows style, start by that.
12736    new_path=`cmd //c echo $path`
12737  fi
12738
12739
12740  input_path="$new_path"
12741  # Check if we need to convert this using DOS-style short mode. If the path
12742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12743  # take no chances and rewrite it.
12744  # Note: m4 eats our [], so we need to use [ and ] instead.
12745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12746  if test "x$has_forbidden_chars" != x; then
12747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12749  fi
12750
12751
12752  windows_path="$new_path"
12753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12754    unix_path=`$CYGPATH -u "$windows_path"`
12755    new_path="$unix_path"
12756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12758    new_path="$unix_path"
12759  fi
12760
12761  if test "x$path" != "x$new_path"; then
12762    JAVA_HOME_PROCESSED="$new_path"
12763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
12764$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
12765  fi
12766
12767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12769
12770  else
12771    # We're on a posix platform. Hooray! :)
12772    path="$JAVA_HOME_PROCESSED"
12773
12774    if test ! -f "$path" && test ! -d "$path"; then
12775      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
12776    fi
12777
12778    has_space=`$ECHO "$path" | $GREP " "`
12779    if test "x$has_space" != x; then
12780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
12781$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
12782      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12783    fi
12784  fi
12785
12786        if test ! -d "$JAVA_HOME_PROCESSED"; then
12787            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
12788$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
12789        else
12790          # Aha, the user has set a JAVA_HOME
12791          # let us use that as the Boot JDK.
12792          BOOT_JDK="$JAVA_HOME_PROCESSED"
12793          BOOT_JDK_FOUND=maybe
12794          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
12795$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
12796        fi
12797    fi
12798
12799
12800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12802      # Do we have a bin/java?
12803      if test ! -x "$BOOT_JDK/bin/java"; then
12804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12806        BOOT_JDK_FOUND=no
12807      else
12808        # Do we have a bin/javac?
12809        if test ! -x "$BOOT_JDK/bin/javac"; then
12810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12814          BOOT_JDK_FOUND=no
12815        else
12816          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12817          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12818            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12820            BOOT_JDK_FOUND=no
12821          else
12822            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12823            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12824
12825            # Extra M4 quote needed to protect [] in grep expression.
12826            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12827            if test "x$FOUND_VERSION_78" = x; then
12828              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12830              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12831$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12832              BOOT_JDK_FOUND=no
12833            else
12834              # We're done! :-)
12835              BOOT_JDK_FOUND=yes
12836
12837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12838
12839  # Input might be given as Windows format, start by converting to
12840  # unix format.
12841  path="$BOOT_JDK"
12842  new_path=`$CYGPATH -u "$path"`
12843
12844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12847  # "foo.exe" is OK but "foo" is an error.
12848  #
12849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12850  # It is also a way to make sure we got the proper file name for the real test later on.
12851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12852  if test "x$test_shortpath" = x; then
12853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12855    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12856  fi
12857
12858  # Call helper function which possibly converts this using DOS-style short mode.
12859  # If so, the updated path is stored in $new_path.
12860
12861  input_path="$new_path"
12862  # Check if we need to convert this using DOS-style short mode. If the path
12863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12864  # take no chances and rewrite it.
12865  # Note: m4 eats our [], so we need to use [ and ] instead.
12866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12867  if test "x$has_forbidden_chars" != x; then
12868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12872      # Going to short mode and back again did indeed matter. Since short mode is
12873      # case insensitive, let's make it lowercase to improve readability.
12874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12875      # Now convert it back to Unix-stile (cygpath)
12876      input_path=`$CYGPATH -u "$shortmode_path"`
12877      new_path="$input_path"
12878    fi
12879  fi
12880
12881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12882  if test "x$test_cygdrive_prefix" = x; then
12883    # As a simple fix, exclude /usr/bin since it's not a real path.
12884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12886      # a path prefixed by /cygdrive for fixpath to work.
12887      new_path="$CYGWIN_ROOT_PATH$input_path"
12888    fi
12889  fi
12890
12891
12892  if test "x$path" != "x$new_path"; then
12893    BOOT_JDK="$new_path"
12894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12896  fi
12897
12898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12899
12900  path="$BOOT_JDK"
12901  has_colon=`$ECHO $path | $GREP ^.:`
12902  new_path="$path"
12903  if test "x$has_colon" = x; then
12904    # Not in mixed or Windows style, start by that.
12905    new_path=`cmd //c echo $path`
12906  fi
12907
12908
12909  input_path="$new_path"
12910  # Check if we need to convert this using DOS-style short mode. If the path
12911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12912  # take no chances and rewrite it.
12913  # Note: m4 eats our [], so we need to use [ and ] instead.
12914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12915  if test "x$has_forbidden_chars" != x; then
12916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12918  fi
12919
12920
12921  windows_path="$new_path"
12922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12923    unix_path=`$CYGPATH -u "$windows_path"`
12924    new_path="$unix_path"
12925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12927    new_path="$unix_path"
12928  fi
12929
12930  if test "x$path" != "x$new_path"; then
12931    BOOT_JDK="$new_path"
12932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12933$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12934  fi
12935
12936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12938
12939  else
12940    # We're on a posix platform. Hooray! :)
12941    path="$BOOT_JDK"
12942
12943    if test ! -f "$path" && test ! -d "$path"; then
12944      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12945    fi
12946
12947    has_space=`$ECHO "$path" | $GREP " "`
12948    if test "x$has_space" != x; then
12949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12950$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12951      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12952    fi
12953  fi
12954
12955              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12956$as_echo_n "checking for Boot JDK... " >&6; }
12957              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12958$as_echo "$BOOT_JDK" >&6; }
12959              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12960$as_echo_n "checking Boot JDK version... " >&6; }
12961              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12962              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12963$as_echo "$BOOT_JDK_VERSION" >&6; }
12964            fi # end check jdk version
12965          fi # end check rt.jar
12966        fi # end check javac
12967      fi # end check java
12968    fi # end check boot jdk found
12969  fi
12970
12971
12972# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12973
12974  if test "x$BOOT_JDK_FOUND" = xno; then
12975    # Now execute the test
12976
12977    if test -x /usr/libexec/java_home; then
12978        BOOT_JDK=`/usr/libexec/java_home`
12979        BOOT_JDK_FOUND=maybe
12980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12981$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12982    fi
12983
12984
12985    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12986    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12987      # Do we have a bin/java?
12988      if test ! -x "$BOOT_JDK/bin/java"; then
12989        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12991        BOOT_JDK_FOUND=no
12992      else
12993        # Do we have a bin/javac?
12994        if test ! -x "$BOOT_JDK/bin/javac"; then
12995          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12997          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12998$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12999          BOOT_JDK_FOUND=no
13000        else
13001          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13002          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13003            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13005            BOOT_JDK_FOUND=no
13006          else
13007            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13008            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13009
13010            # Extra M4 quote needed to protect [] in grep expression.
13011            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13012            if test "x$FOUND_VERSION_78" = x; then
13013              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13015              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13016$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13017              BOOT_JDK_FOUND=no
13018            else
13019              # We're done! :-)
13020              BOOT_JDK_FOUND=yes
13021
13022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13023
13024  # Input might be given as Windows format, start by converting to
13025  # unix format.
13026  path="$BOOT_JDK"
13027  new_path=`$CYGPATH -u "$path"`
13028
13029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13032  # "foo.exe" is OK but "foo" is an error.
13033  #
13034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13035  # It is also a way to make sure we got the proper file name for the real test later on.
13036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13037  if test "x$test_shortpath" = x; then
13038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13040    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13041  fi
13042
13043  # Call helper function which possibly converts this using DOS-style short mode.
13044  # If so, the updated path is stored in $new_path.
13045
13046  input_path="$new_path"
13047  # Check if we need to convert this using DOS-style short mode. If the path
13048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13049  # take no chances and rewrite it.
13050  # Note: m4 eats our [], so we need to use [ and ] instead.
13051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13052  if test "x$has_forbidden_chars" != x; then
13053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13057      # Going to short mode and back again did indeed matter. Since short mode is
13058      # case insensitive, let's make it lowercase to improve readability.
13059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13060      # Now convert it back to Unix-stile (cygpath)
13061      input_path=`$CYGPATH -u "$shortmode_path"`
13062      new_path="$input_path"
13063    fi
13064  fi
13065
13066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13067  if test "x$test_cygdrive_prefix" = x; then
13068    # As a simple fix, exclude /usr/bin since it's not a real path.
13069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13071      # a path prefixed by /cygdrive for fixpath to work.
13072      new_path="$CYGWIN_ROOT_PATH$input_path"
13073    fi
13074  fi
13075
13076
13077  if test "x$path" != "x$new_path"; then
13078    BOOT_JDK="$new_path"
13079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13081  fi
13082
13083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13084
13085  path="$BOOT_JDK"
13086  has_colon=`$ECHO $path | $GREP ^.:`
13087  new_path="$path"
13088  if test "x$has_colon" = x; then
13089    # Not in mixed or Windows style, start by that.
13090    new_path=`cmd //c echo $path`
13091  fi
13092
13093
13094  input_path="$new_path"
13095  # Check if we need to convert this using DOS-style short mode. If the path
13096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13097  # take no chances and rewrite it.
13098  # Note: m4 eats our [], so we need to use [ and ] instead.
13099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13100  if test "x$has_forbidden_chars" != x; then
13101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13103  fi
13104
13105
13106  windows_path="$new_path"
13107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13108    unix_path=`$CYGPATH -u "$windows_path"`
13109    new_path="$unix_path"
13110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13112    new_path="$unix_path"
13113  fi
13114
13115  if test "x$path" != "x$new_path"; then
13116    BOOT_JDK="$new_path"
13117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13119  fi
13120
13121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13123
13124  else
13125    # We're on a posix platform. Hooray! :)
13126    path="$BOOT_JDK"
13127
13128    if test ! -f "$path" && test ! -d "$path"; then
13129      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13130    fi
13131
13132    has_space=`$ECHO "$path" | $GREP " "`
13133    if test "x$has_space" != x; then
13134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13136      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13137    fi
13138  fi
13139
13140              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13141$as_echo_n "checking for Boot JDK... " >&6; }
13142              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13143$as_echo "$BOOT_JDK" >&6; }
13144              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13145$as_echo_n "checking Boot JDK version... " >&6; }
13146              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13147              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13148$as_echo "$BOOT_JDK_VERSION" >&6; }
13149            fi # end check jdk version
13150          fi # end check rt.jar
13151        fi # end check javac
13152      fi # end check java
13153    fi # end check boot jdk found
13154  fi
13155
13156
13157# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
13158
13159  if test "x$BOOT_JDK_FOUND" = xno; then
13160    # Now execute the test
13161
13162    # Extract the first word of "javac", so it can be a program name with args.
13163set dummy javac; ac_word=$2
13164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13165$as_echo_n "checking for $ac_word... " >&6; }
13166if ${ac_cv_path_JAVAC_CHECK+:} false; then :
13167  $as_echo_n "(cached) " >&6
13168else
13169  case $JAVAC_CHECK in
13170  [\\/]* | ?:[\\/]*)
13171  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
13172  ;;
13173  *)
13174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13175for as_dir in $PATH
13176do
13177  IFS=$as_save_IFS
13178  test -z "$as_dir" && as_dir=.
13179    for ac_exec_ext in '' $ac_executable_extensions; do
13180  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13181    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
13182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13183    break 2
13184  fi
13185done
13186  done
13187IFS=$as_save_IFS
13188
13189  ;;
13190esac
13191fi
13192JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
13193if test -n "$JAVAC_CHECK"; then
13194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
13195$as_echo "$JAVAC_CHECK" >&6; }
13196else
13197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13198$as_echo "no" >&6; }
13199fi
13200
13201
13202    # Extract the first word of "java", so it can be a program name with args.
13203set dummy java; ac_word=$2
13204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13205$as_echo_n "checking for $ac_word... " >&6; }
13206if ${ac_cv_path_JAVA_CHECK+:} false; then :
13207  $as_echo_n "(cached) " >&6
13208else
13209  case $JAVA_CHECK in
13210  [\\/]* | ?:[\\/]*)
13211  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
13212  ;;
13213  *)
13214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13215for as_dir in $PATH
13216do
13217  IFS=$as_save_IFS
13218  test -z "$as_dir" && as_dir=.
13219    for ac_exec_ext in '' $ac_executable_extensions; do
13220  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13221    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
13222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13223    break 2
13224  fi
13225done
13226  done
13227IFS=$as_save_IFS
13228
13229  ;;
13230esac
13231fi
13232JAVA_CHECK=$ac_cv_path_JAVA_CHECK
13233if test -n "$JAVA_CHECK"; then
13234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
13235$as_echo "$JAVA_CHECK" >&6; }
13236else
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13238$as_echo "no" >&6; }
13239fi
13240
13241
13242    BINARY="$JAVAC_CHECK"
13243    if test "x$JAVAC_CHECK" = x; then
13244        BINARY="$JAVA_CHECK"
13245    fi
13246    if test "x$BINARY" != x; then
13247        # So there is a java(c) binary, it might be part of a JDK.
13248        # Lets find the JDK/JRE directory by following symbolic links.
13249        # Linux/GNU systems often have links from /usr/bin/java to
13250        # /etc/alternatives/java to the real JDK binary.
13251
13252    if test "x$OPENJDK_BUILD_OS" != xwindows; then
13253        # Follow a chain of symbolic links. Use readlink
13254        # where it exists, else fall back to horribly
13255        # complicated shell code.
13256        if test "x$READLINK_TESTED" != yes; then
13257            # On MacOSX there is a readlink tool with a different
13258            # purpose than the GNU readlink tool. Check the found readlink.
13259            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
13260            if test "x$ISGNU" = x; then
13261                 # A readlink that we do not know how to use.
13262                 # Are there other non-GNU readlinks out there?
13263                 READLINK_TESTED=yes
13264                 READLINK=
13265            fi
13266        fi
13267
13268        if test "x$READLINK" != x; then
13269            BINARY=`$READLINK -f $BINARY`
13270        else
13271            # Save the current directory for restoring afterwards
13272            STARTDIR=$PWD
13273            COUNTER=0
13274            sym_link_dir=`$DIRNAME $BINARY`
13275            sym_link_file=`$BASENAME $BINARY`
13276            # Use the system pwd and not the shell builtin to resolve directory symlinks
13277            cd $sym_link_dir
13278            cd `$THEPWDCMD`
13279            sym_link_dir=`$THEPWDCMD`
13280            # Resolve file symlinks
13281            while test $COUNTER -lt 20; do
13282                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
13283                if test "x$ISLINK" == x; then
13284                    # This is not a symbolic link! We are done!
13285                    break
13286                fi
13287                # Again resolve directory symlinks since the target of the just found
13288                # link could be in a different directory
13289                cd `$DIRNAME $ISLINK`
13290                sym_link_dir=`$THEPWDCMD`
13291                sym_link_file=`$BASENAME $ISLINK`
13292                let COUNTER=COUNTER+1
13293            done
13294            cd $STARTDIR
13295            BINARY=$sym_link_dir/$sym_link_file
13296        fi
13297    fi
13298
13299        BOOT_JDK=`dirname "$BINARY"`
13300        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
13301        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
13302            # Looks like we found ourselves an JDK
13303            BOOT_JDK_FOUND=maybe
13304            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
13305$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
13306        fi
13307    fi
13308
13309
13310    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13311    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13312      # Do we have a bin/java?
13313      if test ! -x "$BOOT_JDK/bin/java"; then
13314        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13316        BOOT_JDK_FOUND=no
13317      else
13318        # Do we have a bin/javac?
13319        if test ! -x "$BOOT_JDK/bin/javac"; then
13320          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13322          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13323$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13324          BOOT_JDK_FOUND=no
13325        else
13326          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13327          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13328            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13330            BOOT_JDK_FOUND=no
13331          else
13332            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13333            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13334
13335            # Extra M4 quote needed to protect [] in grep expression.
13336            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13337            if test "x$FOUND_VERSION_78" = x; then
13338              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13340              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13341$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13342              BOOT_JDK_FOUND=no
13343            else
13344              # We're done! :-)
13345              BOOT_JDK_FOUND=yes
13346
13347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13348
13349  # Input might be given as Windows format, start by converting to
13350  # unix format.
13351  path="$BOOT_JDK"
13352  new_path=`$CYGPATH -u "$path"`
13353
13354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13357  # "foo.exe" is OK but "foo" is an error.
13358  #
13359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13360  # It is also a way to make sure we got the proper file name for the real test later on.
13361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13362  if test "x$test_shortpath" = x; then
13363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13365    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13366  fi
13367
13368  # Call helper function which possibly converts this using DOS-style short mode.
13369  # If so, the updated path is stored in $new_path.
13370
13371  input_path="$new_path"
13372  # Check if we need to convert this using DOS-style short mode. If the path
13373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13374  # take no chances and rewrite it.
13375  # Note: m4 eats our [], so we need to use [ and ] instead.
13376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13377  if test "x$has_forbidden_chars" != x; then
13378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13382      # Going to short mode and back again did indeed matter. Since short mode is
13383      # case insensitive, let's make it lowercase to improve readability.
13384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13385      # Now convert it back to Unix-stile (cygpath)
13386      input_path=`$CYGPATH -u "$shortmode_path"`
13387      new_path="$input_path"
13388    fi
13389  fi
13390
13391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13392  if test "x$test_cygdrive_prefix" = x; then
13393    # As a simple fix, exclude /usr/bin since it's not a real path.
13394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13396      # a path prefixed by /cygdrive for fixpath to work.
13397      new_path="$CYGWIN_ROOT_PATH$input_path"
13398    fi
13399  fi
13400
13401
13402  if test "x$path" != "x$new_path"; then
13403    BOOT_JDK="$new_path"
13404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13406  fi
13407
13408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13409
13410  path="$BOOT_JDK"
13411  has_colon=`$ECHO $path | $GREP ^.:`
13412  new_path="$path"
13413  if test "x$has_colon" = x; then
13414    # Not in mixed or Windows style, start by that.
13415    new_path=`cmd //c echo $path`
13416  fi
13417
13418
13419  input_path="$new_path"
13420  # Check if we need to convert this using DOS-style short mode. If the path
13421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13422  # take no chances and rewrite it.
13423  # Note: m4 eats our [], so we need to use [ and ] instead.
13424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13425  if test "x$has_forbidden_chars" != x; then
13426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13428  fi
13429
13430
13431  windows_path="$new_path"
13432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13433    unix_path=`$CYGPATH -u "$windows_path"`
13434    new_path="$unix_path"
13435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13437    new_path="$unix_path"
13438  fi
13439
13440  if test "x$path" != "x$new_path"; then
13441    BOOT_JDK="$new_path"
13442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13444  fi
13445
13446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13448
13449  else
13450    # We're on a posix platform. Hooray! :)
13451    path="$BOOT_JDK"
13452
13453    if test ! -f "$path" && test ! -d "$path"; then
13454      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13455    fi
13456
13457    has_space=`$ECHO "$path" | $GREP " "`
13458    if test "x$has_space" != x; then
13459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13461      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13462    fi
13463  fi
13464
13465              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13466$as_echo_n "checking for Boot JDK... " >&6; }
13467              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13468$as_echo "$BOOT_JDK" >&6; }
13469              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13470$as_echo_n "checking Boot JDK version... " >&6; }
13471              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13472              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13473$as_echo "$BOOT_JDK_VERSION" >&6; }
13474            fi # end check jdk version
13475          fi # end check rt.jar
13476        fi # end check javac
13477      fi # end check java
13478    fi # end check boot jdk found
13479  fi
13480
13481
13482# Test: Is there a JDK installed in default, well-known locations?
13483
13484  if test "x$BOOT_JDK_FOUND" = xno; then
13485    # Now execute the test
13486
13487  if test "x$OPENJDK_TARGET_OS" = xwindows; then
13488
13489  if test "x$BOOT_JDK_FOUND" = xno; then
13490    # Now execute the test
13491
13492  if test "x$ProgramW6432" != x; then
13493    VIRTUAL_DIR="$ProgramW6432/Java"
13494
13495  windows_path="$VIRTUAL_DIR"
13496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13497    unix_path=`$CYGPATH -u "$windows_path"`
13498    VIRTUAL_DIR="$unix_path"
13499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13501    VIRTUAL_DIR="$unix_path"
13502  fi
13503
13504
13505  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13506  BOOT_JDK_SUFFIX=""
13507  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13508  if test "x$ALL_JDKS_FOUND" != x; then
13509    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13510
13511  if test "x$BOOT_JDK_FOUND" = xno; then
13512    # Now execute the test
13513
13514        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13515        if test -d "$BOOT_JDK"; then
13516          BOOT_JDK_FOUND=maybe
13517          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13518$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13519        fi
13520
13521
13522    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13523    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13524      # Do we have a bin/java?
13525      if test ! -x "$BOOT_JDK/bin/java"; then
13526        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13528        BOOT_JDK_FOUND=no
13529      else
13530        # Do we have a bin/javac?
13531        if test ! -x "$BOOT_JDK/bin/javac"; then
13532          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13534          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13535$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13536          BOOT_JDK_FOUND=no
13537        else
13538          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13539          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13540            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13542            BOOT_JDK_FOUND=no
13543          else
13544            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13545            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13546
13547            # Extra M4 quote needed to protect [] in grep expression.
13548            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13549            if test "x$FOUND_VERSION_78" = x; then
13550              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13552              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13553$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13554              BOOT_JDK_FOUND=no
13555            else
13556              # We're done! :-)
13557              BOOT_JDK_FOUND=yes
13558
13559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13560
13561  # Input might be given as Windows format, start by converting to
13562  # unix format.
13563  path="$BOOT_JDK"
13564  new_path=`$CYGPATH -u "$path"`
13565
13566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13569  # "foo.exe" is OK but "foo" is an error.
13570  #
13571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13572  # It is also a way to make sure we got the proper file name for the real test later on.
13573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13574  if test "x$test_shortpath" = x; then
13575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13576$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13577    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13578  fi
13579
13580  # Call helper function which possibly converts this using DOS-style short mode.
13581  # If so, the updated path is stored in $new_path.
13582
13583  input_path="$new_path"
13584  # Check if we need to convert this using DOS-style short mode. If the path
13585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13586  # take no chances and rewrite it.
13587  # Note: m4 eats our [], so we need to use [ and ] instead.
13588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13589  if test "x$has_forbidden_chars" != x; then
13590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13594      # Going to short mode and back again did indeed matter. Since short mode is
13595      # case insensitive, let's make it lowercase to improve readability.
13596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13597      # Now convert it back to Unix-stile (cygpath)
13598      input_path=`$CYGPATH -u "$shortmode_path"`
13599      new_path="$input_path"
13600    fi
13601  fi
13602
13603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13604  if test "x$test_cygdrive_prefix" = x; then
13605    # As a simple fix, exclude /usr/bin since it's not a real path.
13606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13608      # a path prefixed by /cygdrive for fixpath to work.
13609      new_path="$CYGWIN_ROOT_PATH$input_path"
13610    fi
13611  fi
13612
13613
13614  if test "x$path" != "x$new_path"; then
13615    BOOT_JDK="$new_path"
13616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13618  fi
13619
13620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13621
13622  path="$BOOT_JDK"
13623  has_colon=`$ECHO $path | $GREP ^.:`
13624  new_path="$path"
13625  if test "x$has_colon" = x; then
13626    # Not in mixed or Windows style, start by that.
13627    new_path=`cmd //c echo $path`
13628  fi
13629
13630
13631  input_path="$new_path"
13632  # Check if we need to convert this using DOS-style short mode. If the path
13633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13634  # take no chances and rewrite it.
13635  # Note: m4 eats our [], so we need to use [ and ] instead.
13636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13637  if test "x$has_forbidden_chars" != x; then
13638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13640  fi
13641
13642
13643  windows_path="$new_path"
13644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13645    unix_path=`$CYGPATH -u "$windows_path"`
13646    new_path="$unix_path"
13647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13649    new_path="$unix_path"
13650  fi
13651
13652  if test "x$path" != "x$new_path"; then
13653    BOOT_JDK="$new_path"
13654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13655$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13656  fi
13657
13658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13660
13661  else
13662    # We're on a posix platform. Hooray! :)
13663    path="$BOOT_JDK"
13664
13665    if test ! -f "$path" && test ! -d "$path"; then
13666      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13667    fi
13668
13669    has_space=`$ECHO "$path" | $GREP " "`
13670    if test "x$has_space" != x; then
13671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13672$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13673      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13674    fi
13675  fi
13676
13677              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13678$as_echo_n "checking for Boot JDK... " >&6; }
13679              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13680$as_echo "$BOOT_JDK" >&6; }
13681              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13682$as_echo_n "checking Boot JDK version... " >&6; }
13683              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13684              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13685$as_echo "$BOOT_JDK_VERSION" >&6; }
13686            fi # end check jdk version
13687          fi # end check rt.jar
13688        fi # end check javac
13689      fi # end check java
13690    fi # end check boot jdk found
13691  fi
13692
13693    done
13694  fi
13695
13696  fi
13697
13698
13699    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13700    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13701      # Do we have a bin/java?
13702      if test ! -x "$BOOT_JDK/bin/java"; then
13703        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13705        BOOT_JDK_FOUND=no
13706      else
13707        # Do we have a bin/javac?
13708        if test ! -x "$BOOT_JDK/bin/javac"; then
13709          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13711          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13712$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13713          BOOT_JDK_FOUND=no
13714        else
13715          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13716          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13717            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13719            BOOT_JDK_FOUND=no
13720          else
13721            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13722            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13723
13724            # Extra M4 quote needed to protect [] in grep expression.
13725            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13726            if test "x$FOUND_VERSION_78" = x; then
13727              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13729              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13730$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13731              BOOT_JDK_FOUND=no
13732            else
13733              # We're done! :-)
13734              BOOT_JDK_FOUND=yes
13735
13736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13737
13738  # Input might be given as Windows format, start by converting to
13739  # unix format.
13740  path="$BOOT_JDK"
13741  new_path=`$CYGPATH -u "$path"`
13742
13743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13746  # "foo.exe" is OK but "foo" is an error.
13747  #
13748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13749  # It is also a way to make sure we got the proper file name for the real test later on.
13750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13751  if test "x$test_shortpath" = x; then
13752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13754    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13755  fi
13756
13757  # Call helper function which possibly converts this using DOS-style short mode.
13758  # If so, the updated path is stored in $new_path.
13759
13760  input_path="$new_path"
13761  # Check if we need to convert this using DOS-style short mode. If the path
13762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13763  # take no chances and rewrite it.
13764  # Note: m4 eats our [], so we need to use [ and ] instead.
13765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13766  if test "x$has_forbidden_chars" != x; then
13767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13771      # Going to short mode and back again did indeed matter. Since short mode is
13772      # case insensitive, let's make it lowercase to improve readability.
13773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13774      # Now convert it back to Unix-stile (cygpath)
13775      input_path=`$CYGPATH -u "$shortmode_path"`
13776      new_path="$input_path"
13777    fi
13778  fi
13779
13780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13781  if test "x$test_cygdrive_prefix" = x; then
13782    # As a simple fix, exclude /usr/bin since it's not a real path.
13783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13785      # a path prefixed by /cygdrive for fixpath to work.
13786      new_path="$CYGWIN_ROOT_PATH$input_path"
13787    fi
13788  fi
13789
13790
13791  if test "x$path" != "x$new_path"; then
13792    BOOT_JDK="$new_path"
13793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13794$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13795  fi
13796
13797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13798
13799  path="$BOOT_JDK"
13800  has_colon=`$ECHO $path | $GREP ^.:`
13801  new_path="$path"
13802  if test "x$has_colon" = x; then
13803    # Not in mixed or Windows style, start by that.
13804    new_path=`cmd //c echo $path`
13805  fi
13806
13807
13808  input_path="$new_path"
13809  # Check if we need to convert this using DOS-style short mode. If the path
13810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13811  # take no chances and rewrite it.
13812  # Note: m4 eats our [], so we need to use [ and ] instead.
13813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13814  if test "x$has_forbidden_chars" != x; then
13815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13817  fi
13818
13819
13820  windows_path="$new_path"
13821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13822    unix_path=`$CYGPATH -u "$windows_path"`
13823    new_path="$unix_path"
13824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13826    new_path="$unix_path"
13827  fi
13828
13829  if test "x$path" != "x$new_path"; then
13830    BOOT_JDK="$new_path"
13831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13832$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13833  fi
13834
13835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13837
13838  else
13839    # We're on a posix platform. Hooray! :)
13840    path="$BOOT_JDK"
13841
13842    if test ! -f "$path" && test ! -d "$path"; then
13843      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13844    fi
13845
13846    has_space=`$ECHO "$path" | $GREP " "`
13847    if test "x$has_space" != x; then
13848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13850      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13851    fi
13852  fi
13853
13854              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13855$as_echo_n "checking for Boot JDK... " >&6; }
13856              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13857$as_echo "$BOOT_JDK" >&6; }
13858              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13859$as_echo_n "checking Boot JDK version... " >&6; }
13860              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13861              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13862$as_echo "$BOOT_JDK_VERSION" >&6; }
13863            fi # end check jdk version
13864          fi # end check rt.jar
13865        fi # end check javac
13866      fi # end check java
13867    fi # end check boot jdk found
13868  fi
13869
13870
13871  if test "x$BOOT_JDK_FOUND" = xno; then
13872    # Now execute the test
13873
13874  if test "x$PROGRAMW6432" != x; then
13875    VIRTUAL_DIR="$PROGRAMW6432/Java"
13876
13877  windows_path="$VIRTUAL_DIR"
13878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13879    unix_path=`$CYGPATH -u "$windows_path"`
13880    VIRTUAL_DIR="$unix_path"
13881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13883    VIRTUAL_DIR="$unix_path"
13884  fi
13885
13886
13887  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13888  BOOT_JDK_SUFFIX=""
13889  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13890  if test "x$ALL_JDKS_FOUND" != x; then
13891    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13892
13893  if test "x$BOOT_JDK_FOUND" = xno; then
13894    # Now execute the test
13895
13896        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13897        if test -d "$BOOT_JDK"; then
13898          BOOT_JDK_FOUND=maybe
13899          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13900$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13901        fi
13902
13903
13904    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13905    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13906      # Do we have a bin/java?
13907      if test ! -x "$BOOT_JDK/bin/java"; then
13908        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13910        BOOT_JDK_FOUND=no
13911      else
13912        # Do we have a bin/javac?
13913        if test ! -x "$BOOT_JDK/bin/javac"; then
13914          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13916          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13917$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13918          BOOT_JDK_FOUND=no
13919        else
13920          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13921          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13922            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13924            BOOT_JDK_FOUND=no
13925          else
13926            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13927            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13928
13929            # Extra M4 quote needed to protect [] in grep expression.
13930            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13931            if test "x$FOUND_VERSION_78" = x; then
13932              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13934              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13935$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13936              BOOT_JDK_FOUND=no
13937            else
13938              # We're done! :-)
13939              BOOT_JDK_FOUND=yes
13940
13941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13942
13943  # Input might be given as Windows format, start by converting to
13944  # unix format.
13945  path="$BOOT_JDK"
13946  new_path=`$CYGPATH -u "$path"`
13947
13948  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13949  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13950  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13951  # "foo.exe" is OK but "foo" is an error.
13952  #
13953  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13954  # It is also a way to make sure we got the proper file name for the real test later on.
13955  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13956  if test "x$test_shortpath" = x; then
13957    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13958$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13959    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13960  fi
13961
13962  # Call helper function which possibly converts this using DOS-style short mode.
13963  # If so, the updated path is stored in $new_path.
13964
13965  input_path="$new_path"
13966  # Check if we need to convert this using DOS-style short mode. If the path
13967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13968  # take no chances and rewrite it.
13969  # Note: m4 eats our [], so we need to use [ and ] instead.
13970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13971  if test "x$has_forbidden_chars" != x; then
13972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13976      # Going to short mode and back again did indeed matter. Since short mode is
13977      # case insensitive, let's make it lowercase to improve readability.
13978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13979      # Now convert it back to Unix-stile (cygpath)
13980      input_path=`$CYGPATH -u "$shortmode_path"`
13981      new_path="$input_path"
13982    fi
13983  fi
13984
13985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13986  if test "x$test_cygdrive_prefix" = x; then
13987    # As a simple fix, exclude /usr/bin since it's not a real path.
13988    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13990      # a path prefixed by /cygdrive for fixpath to work.
13991      new_path="$CYGWIN_ROOT_PATH$input_path"
13992    fi
13993  fi
13994
13995
13996  if test "x$path" != "x$new_path"; then
13997    BOOT_JDK="$new_path"
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13999$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14000  fi
14001
14002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14003
14004  path="$BOOT_JDK"
14005  has_colon=`$ECHO $path | $GREP ^.:`
14006  new_path="$path"
14007  if test "x$has_colon" = x; then
14008    # Not in mixed or Windows style, start by that.
14009    new_path=`cmd //c echo $path`
14010  fi
14011
14012
14013  input_path="$new_path"
14014  # Check if we need to convert this using DOS-style short mode. If the path
14015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14016  # take no chances and rewrite it.
14017  # Note: m4 eats our [], so we need to use [ and ] instead.
14018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14019  if test "x$has_forbidden_chars" != x; then
14020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14022  fi
14023
14024
14025  windows_path="$new_path"
14026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14027    unix_path=`$CYGPATH -u "$windows_path"`
14028    new_path="$unix_path"
14029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14031    new_path="$unix_path"
14032  fi
14033
14034  if test "x$path" != "x$new_path"; then
14035    BOOT_JDK="$new_path"
14036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14038  fi
14039
14040  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14041  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14042
14043  else
14044    # We're on a posix platform. Hooray! :)
14045    path="$BOOT_JDK"
14046
14047    if test ! -f "$path" && test ! -d "$path"; then
14048      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14049    fi
14050
14051    has_space=`$ECHO "$path" | $GREP " "`
14052    if test "x$has_space" != x; then
14053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14054$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14055      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14056    fi
14057  fi
14058
14059              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14060$as_echo_n "checking for Boot JDK... " >&6; }
14061              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14062$as_echo "$BOOT_JDK" >&6; }
14063              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14064$as_echo_n "checking Boot JDK version... " >&6; }
14065              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14066              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14067$as_echo "$BOOT_JDK_VERSION" >&6; }
14068            fi # end check jdk version
14069          fi # end check rt.jar
14070        fi # end check javac
14071      fi # end check java
14072    fi # end check boot jdk found
14073  fi
14074
14075    done
14076  fi
14077
14078  fi
14079
14080
14081    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14082    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14083      # Do we have a bin/java?
14084      if test ! -x "$BOOT_JDK/bin/java"; then
14085        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14087        BOOT_JDK_FOUND=no
14088      else
14089        # Do we have a bin/javac?
14090        if test ! -x "$BOOT_JDK/bin/javac"; then
14091          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14093          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14094$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14095          BOOT_JDK_FOUND=no
14096        else
14097          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14098          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14099            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14101            BOOT_JDK_FOUND=no
14102          else
14103            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14104            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14105
14106            # Extra M4 quote needed to protect [] in grep expression.
14107            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14108            if test "x$FOUND_VERSION_78" = x; then
14109              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14111              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14112$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14113              BOOT_JDK_FOUND=no
14114            else
14115              # We're done! :-)
14116              BOOT_JDK_FOUND=yes
14117
14118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14119
14120  # Input might be given as Windows format, start by converting to
14121  # unix format.
14122  path="$BOOT_JDK"
14123  new_path=`$CYGPATH -u "$path"`
14124
14125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14128  # "foo.exe" is OK but "foo" is an error.
14129  #
14130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14131  # It is also a way to make sure we got the proper file name for the real test later on.
14132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14133  if test "x$test_shortpath" = x; then
14134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14136    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14137  fi
14138
14139  # Call helper function which possibly converts this using DOS-style short mode.
14140  # If so, the updated path is stored in $new_path.
14141
14142  input_path="$new_path"
14143  # Check if we need to convert this using DOS-style short mode. If the path
14144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14145  # take no chances and rewrite it.
14146  # Note: m4 eats our [], so we need to use [ and ] instead.
14147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14148  if test "x$has_forbidden_chars" != x; then
14149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14153      # Going to short mode and back again did indeed matter. Since short mode is
14154      # case insensitive, let's make it lowercase to improve readability.
14155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14156      # Now convert it back to Unix-stile (cygpath)
14157      input_path=`$CYGPATH -u "$shortmode_path"`
14158      new_path="$input_path"
14159    fi
14160  fi
14161
14162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14163  if test "x$test_cygdrive_prefix" = x; then
14164    # As a simple fix, exclude /usr/bin since it's not a real path.
14165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14167      # a path prefixed by /cygdrive for fixpath to work.
14168      new_path="$CYGWIN_ROOT_PATH$input_path"
14169    fi
14170  fi
14171
14172
14173  if test "x$path" != "x$new_path"; then
14174    BOOT_JDK="$new_path"
14175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14177  fi
14178
14179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14180
14181  path="$BOOT_JDK"
14182  has_colon=`$ECHO $path | $GREP ^.:`
14183  new_path="$path"
14184  if test "x$has_colon" = x; then
14185    # Not in mixed or Windows style, start by that.
14186    new_path=`cmd //c echo $path`
14187  fi
14188
14189
14190  input_path="$new_path"
14191  # Check if we need to convert this using DOS-style short mode. If the path
14192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14193  # take no chances and rewrite it.
14194  # Note: m4 eats our [], so we need to use [ and ] instead.
14195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14196  if test "x$has_forbidden_chars" != x; then
14197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14199  fi
14200
14201
14202  windows_path="$new_path"
14203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14204    unix_path=`$CYGPATH -u "$windows_path"`
14205    new_path="$unix_path"
14206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14208    new_path="$unix_path"
14209  fi
14210
14211  if test "x$path" != "x$new_path"; then
14212    BOOT_JDK="$new_path"
14213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14215  fi
14216
14217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14219
14220  else
14221    # We're on a posix platform. Hooray! :)
14222    path="$BOOT_JDK"
14223
14224    if test ! -f "$path" && test ! -d "$path"; then
14225      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14226    fi
14227
14228    has_space=`$ECHO "$path" | $GREP " "`
14229    if test "x$has_space" != x; then
14230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14232      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14233    fi
14234  fi
14235
14236              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14237$as_echo_n "checking for Boot JDK... " >&6; }
14238              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14239$as_echo "$BOOT_JDK" >&6; }
14240              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14241$as_echo_n "checking Boot JDK version... " >&6; }
14242              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14243              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14244$as_echo "$BOOT_JDK_VERSION" >&6; }
14245            fi # end check jdk version
14246          fi # end check rt.jar
14247        fi # end check javac
14248      fi # end check java
14249    fi # end check boot jdk found
14250  fi
14251
14252
14253  if test "x$BOOT_JDK_FOUND" = xno; then
14254    # Now execute the test
14255
14256  if test "x$PROGRAMFILES" != x; then
14257    VIRTUAL_DIR="$PROGRAMFILES/Java"
14258
14259  windows_path="$VIRTUAL_DIR"
14260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14261    unix_path=`$CYGPATH -u "$windows_path"`
14262    VIRTUAL_DIR="$unix_path"
14263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14265    VIRTUAL_DIR="$unix_path"
14266  fi
14267
14268
14269  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
14270  BOOT_JDK_SUFFIX=""
14271  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14272  if test "x$ALL_JDKS_FOUND" != x; then
14273    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14274
14275  if test "x$BOOT_JDK_FOUND" = xno; then
14276    # Now execute the test
14277
14278        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14279        if test -d "$BOOT_JDK"; then
14280          BOOT_JDK_FOUND=maybe
14281          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14282$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14283        fi
14284
14285
14286    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14287    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14288      # Do we have a bin/java?
14289      if test ! -x "$BOOT_JDK/bin/java"; then
14290        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14292        BOOT_JDK_FOUND=no
14293      else
14294        # Do we have a bin/javac?
14295        if test ! -x "$BOOT_JDK/bin/javac"; then
14296          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14298          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14299$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14300          BOOT_JDK_FOUND=no
14301        else
14302          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14303          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14304            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14306            BOOT_JDK_FOUND=no
14307          else
14308            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14309            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14310
14311            # Extra M4 quote needed to protect [] in grep expression.
14312            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14313            if test "x$FOUND_VERSION_78" = x; then
14314              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14316              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14317$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14318              BOOT_JDK_FOUND=no
14319            else
14320              # We're done! :-)
14321              BOOT_JDK_FOUND=yes
14322
14323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14324
14325  # Input might be given as Windows format, start by converting to
14326  # unix format.
14327  path="$BOOT_JDK"
14328  new_path=`$CYGPATH -u "$path"`
14329
14330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14333  # "foo.exe" is OK but "foo" is an error.
14334  #
14335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14336  # It is also a way to make sure we got the proper file name for the real test later on.
14337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14338  if test "x$test_shortpath" = x; then
14339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14340$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14341    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14342  fi
14343
14344  # Call helper function which possibly converts this using DOS-style short mode.
14345  # If so, the updated path is stored in $new_path.
14346
14347  input_path="$new_path"
14348  # Check if we need to convert this using DOS-style short mode. If the path
14349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14350  # take no chances and rewrite it.
14351  # Note: m4 eats our [], so we need to use [ and ] instead.
14352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14353  if test "x$has_forbidden_chars" != x; then
14354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14358      # Going to short mode and back again did indeed matter. Since short mode is
14359      # case insensitive, let's make it lowercase to improve readability.
14360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14361      # Now convert it back to Unix-stile (cygpath)
14362      input_path=`$CYGPATH -u "$shortmode_path"`
14363      new_path="$input_path"
14364    fi
14365  fi
14366
14367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14368  if test "x$test_cygdrive_prefix" = x; then
14369    # As a simple fix, exclude /usr/bin since it's not a real path.
14370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14372      # a path prefixed by /cygdrive for fixpath to work.
14373      new_path="$CYGWIN_ROOT_PATH$input_path"
14374    fi
14375  fi
14376
14377
14378  if test "x$path" != "x$new_path"; then
14379    BOOT_JDK="$new_path"
14380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14381$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14382  fi
14383
14384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14385
14386  path="$BOOT_JDK"
14387  has_colon=`$ECHO $path | $GREP ^.:`
14388  new_path="$path"
14389  if test "x$has_colon" = x; then
14390    # Not in mixed or Windows style, start by that.
14391    new_path=`cmd //c echo $path`
14392  fi
14393
14394
14395  input_path="$new_path"
14396  # Check if we need to convert this using DOS-style short mode. If the path
14397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14398  # take no chances and rewrite it.
14399  # Note: m4 eats our [], so we need to use [ and ] instead.
14400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14401  if test "x$has_forbidden_chars" != x; then
14402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14404  fi
14405
14406
14407  windows_path="$new_path"
14408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14409    unix_path=`$CYGPATH -u "$windows_path"`
14410    new_path="$unix_path"
14411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14413    new_path="$unix_path"
14414  fi
14415
14416  if test "x$path" != "x$new_path"; then
14417    BOOT_JDK="$new_path"
14418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14419$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14420  fi
14421
14422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14424
14425  else
14426    # We're on a posix platform. Hooray! :)
14427    path="$BOOT_JDK"
14428
14429    if test ! -f "$path" && test ! -d "$path"; then
14430      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14431    fi
14432
14433    has_space=`$ECHO "$path" | $GREP " "`
14434    if test "x$has_space" != x; then
14435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14436$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14437      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14438    fi
14439  fi
14440
14441              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14442$as_echo_n "checking for Boot JDK... " >&6; }
14443              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14444$as_echo "$BOOT_JDK" >&6; }
14445              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14446$as_echo_n "checking Boot JDK version... " >&6; }
14447              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14448              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14449$as_echo "$BOOT_JDK_VERSION" >&6; }
14450            fi # end check jdk version
14451          fi # end check rt.jar
14452        fi # end check javac
14453      fi # end check java
14454    fi # end check boot jdk found
14455  fi
14456
14457    done
14458  fi
14459
14460  fi
14461
14462
14463    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14464    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14465      # Do we have a bin/java?
14466      if test ! -x "$BOOT_JDK/bin/java"; then
14467        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14469        BOOT_JDK_FOUND=no
14470      else
14471        # Do we have a bin/javac?
14472        if test ! -x "$BOOT_JDK/bin/javac"; then
14473          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14475          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14476$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14477          BOOT_JDK_FOUND=no
14478        else
14479          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14480          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14481            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14483            BOOT_JDK_FOUND=no
14484          else
14485            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14486            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14487
14488            # Extra M4 quote needed to protect [] in grep expression.
14489            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14490            if test "x$FOUND_VERSION_78" = x; then
14491              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14493              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14494$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14495              BOOT_JDK_FOUND=no
14496            else
14497              # We're done! :-)
14498              BOOT_JDK_FOUND=yes
14499
14500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14501
14502  # Input might be given as Windows format, start by converting to
14503  # unix format.
14504  path="$BOOT_JDK"
14505  new_path=`$CYGPATH -u "$path"`
14506
14507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14510  # "foo.exe" is OK but "foo" is an error.
14511  #
14512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14513  # It is also a way to make sure we got the proper file name for the real test later on.
14514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14515  if test "x$test_shortpath" = x; then
14516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14518    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14519  fi
14520
14521  # Call helper function which possibly converts this using DOS-style short mode.
14522  # If so, the updated path is stored in $new_path.
14523
14524  input_path="$new_path"
14525  # Check if we need to convert this using DOS-style short mode. If the path
14526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14527  # take no chances and rewrite it.
14528  # Note: m4 eats our [], so we need to use [ and ] instead.
14529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14530  if test "x$has_forbidden_chars" != x; then
14531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14535      # Going to short mode and back again did indeed matter. Since short mode is
14536      # case insensitive, let's make it lowercase to improve readability.
14537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14538      # Now convert it back to Unix-stile (cygpath)
14539      input_path=`$CYGPATH -u "$shortmode_path"`
14540      new_path="$input_path"
14541    fi
14542  fi
14543
14544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14545  if test "x$test_cygdrive_prefix" = x; then
14546    # As a simple fix, exclude /usr/bin since it's not a real path.
14547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14549      # a path prefixed by /cygdrive for fixpath to work.
14550      new_path="$CYGWIN_ROOT_PATH$input_path"
14551    fi
14552  fi
14553
14554
14555  if test "x$path" != "x$new_path"; then
14556    BOOT_JDK="$new_path"
14557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14558$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14559  fi
14560
14561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14562
14563  path="$BOOT_JDK"
14564  has_colon=`$ECHO $path | $GREP ^.:`
14565  new_path="$path"
14566  if test "x$has_colon" = x; then
14567    # Not in mixed or Windows style, start by that.
14568    new_path=`cmd //c echo $path`
14569  fi
14570
14571
14572  input_path="$new_path"
14573  # Check if we need to convert this using DOS-style short mode. If the path
14574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14575  # take no chances and rewrite it.
14576  # Note: m4 eats our [], so we need to use [ and ] instead.
14577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14578  if test "x$has_forbidden_chars" != x; then
14579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14581  fi
14582
14583
14584  windows_path="$new_path"
14585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14586    unix_path=`$CYGPATH -u "$windows_path"`
14587    new_path="$unix_path"
14588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14590    new_path="$unix_path"
14591  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14601
14602  else
14603    # We're on a posix platform. Hooray! :)
14604    path="$BOOT_JDK"
14605
14606    if test ! -f "$path" && test ! -d "$path"; then
14607      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14608    fi
14609
14610    has_space=`$ECHO "$path" | $GREP " "`
14611    if test "x$has_space" != x; then
14612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14614      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14615    fi
14616  fi
14617
14618              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14619$as_echo_n "checking for Boot JDK... " >&6; }
14620              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14621$as_echo "$BOOT_JDK" >&6; }
14622              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14623$as_echo_n "checking Boot JDK version... " >&6; }
14624              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14625              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14626$as_echo "$BOOT_JDK_VERSION" >&6; }
14627            fi # end check jdk version
14628          fi # end check rt.jar
14629        fi # end check javac
14630      fi # end check java
14631    fi # end check boot jdk found
14632  fi
14633
14634
14635  if test "x$BOOT_JDK_FOUND" = xno; then
14636    # Now execute the test
14637
14638  if test "x$ProgramFiles" != x; then
14639    VIRTUAL_DIR="$ProgramFiles/Java"
14640
14641  windows_path="$VIRTUAL_DIR"
14642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14643    unix_path=`$CYGPATH -u "$windows_path"`
14644    VIRTUAL_DIR="$unix_path"
14645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14647    VIRTUAL_DIR="$unix_path"
14648  fi
14649
14650
14651  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
14652  BOOT_JDK_SUFFIX=""
14653  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14654  if test "x$ALL_JDKS_FOUND" != x; then
14655    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14656
14657  if test "x$BOOT_JDK_FOUND" = xno; then
14658    # Now execute the test
14659
14660        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14661        if test -d "$BOOT_JDK"; then
14662          BOOT_JDK_FOUND=maybe
14663          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14664$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14665        fi
14666
14667
14668    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14669    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14670      # Do we have a bin/java?
14671      if test ! -x "$BOOT_JDK/bin/java"; then
14672        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14674        BOOT_JDK_FOUND=no
14675      else
14676        # Do we have a bin/javac?
14677        if test ! -x "$BOOT_JDK/bin/javac"; then
14678          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14680          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14681$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14682          BOOT_JDK_FOUND=no
14683        else
14684          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14685          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14686            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14688            BOOT_JDK_FOUND=no
14689          else
14690            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14691            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14692
14693            # Extra M4 quote needed to protect [] in grep expression.
14694            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14695            if test "x$FOUND_VERSION_78" = x; then
14696              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14698              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14699$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14700              BOOT_JDK_FOUND=no
14701            else
14702              # We're done! :-)
14703              BOOT_JDK_FOUND=yes
14704
14705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14706
14707  # Input might be given as Windows format, start by converting to
14708  # unix format.
14709  path="$BOOT_JDK"
14710  new_path=`$CYGPATH -u "$path"`
14711
14712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14715  # "foo.exe" is OK but "foo" is an error.
14716  #
14717  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14718  # It is also a way to make sure we got the proper file name for the real test later on.
14719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14720  if test "x$test_shortpath" = x; then
14721    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14723    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14724  fi
14725
14726  # Call helper function which possibly converts this using DOS-style short mode.
14727  # If so, the updated path is stored in $new_path.
14728
14729  input_path="$new_path"
14730  # Check if we need to convert this using DOS-style short mode. If the path
14731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14732  # take no chances and rewrite it.
14733  # Note: m4 eats our [], so we need to use [ and ] instead.
14734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14735  if test "x$has_forbidden_chars" != x; then
14736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14740      # Going to short mode and back again did indeed matter. Since short mode is
14741      # case insensitive, let's make it lowercase to improve readability.
14742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14743      # Now convert it back to Unix-stile (cygpath)
14744      input_path=`$CYGPATH -u "$shortmode_path"`
14745      new_path="$input_path"
14746    fi
14747  fi
14748
14749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14750  if test "x$test_cygdrive_prefix" = x; then
14751    # As a simple fix, exclude /usr/bin since it's not a real path.
14752    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14754      # a path prefixed by /cygdrive for fixpath to work.
14755      new_path="$CYGWIN_ROOT_PATH$input_path"
14756    fi
14757  fi
14758
14759
14760  if test "x$path" != "x$new_path"; then
14761    BOOT_JDK="$new_path"
14762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14763$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14764  fi
14765
14766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14767
14768  path="$BOOT_JDK"
14769  has_colon=`$ECHO $path | $GREP ^.:`
14770  new_path="$path"
14771  if test "x$has_colon" = x; then
14772    # Not in mixed or Windows style, start by that.
14773    new_path=`cmd //c echo $path`
14774  fi
14775
14776
14777  input_path="$new_path"
14778  # Check if we need to convert this using DOS-style short mode. If the path
14779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14780  # take no chances and rewrite it.
14781  # Note: m4 eats our [], so we need to use [ and ] instead.
14782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14783  if test "x$has_forbidden_chars" != x; then
14784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14786  fi
14787
14788
14789  windows_path="$new_path"
14790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14791    unix_path=`$CYGPATH -u "$windows_path"`
14792    new_path="$unix_path"
14793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14795    new_path="$unix_path"
14796  fi
14797
14798  if test "x$path" != "x$new_path"; then
14799    BOOT_JDK="$new_path"
14800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14802  fi
14803
14804  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14805  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14806
14807  else
14808    # We're on a posix platform. Hooray! :)
14809    path="$BOOT_JDK"
14810
14811    if test ! -f "$path" && test ! -d "$path"; then
14812      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14813    fi
14814
14815    has_space=`$ECHO "$path" | $GREP " "`
14816    if test "x$has_space" != x; then
14817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14819      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14820    fi
14821  fi
14822
14823              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14824$as_echo_n "checking for Boot JDK... " >&6; }
14825              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14826$as_echo "$BOOT_JDK" >&6; }
14827              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14828$as_echo_n "checking Boot JDK version... " >&6; }
14829              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14830              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14831$as_echo "$BOOT_JDK_VERSION" >&6; }
14832            fi # end check jdk version
14833          fi # end check rt.jar
14834        fi # end check javac
14835      fi # end check java
14836    fi # end check boot jdk found
14837  fi
14838
14839    done
14840  fi
14841
14842  fi
14843
14844
14845    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14846    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14847      # Do we have a bin/java?
14848      if test ! -x "$BOOT_JDK/bin/java"; then
14849        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14851        BOOT_JDK_FOUND=no
14852      else
14853        # Do we have a bin/javac?
14854        if test ! -x "$BOOT_JDK/bin/javac"; then
14855          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14857          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14858$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14859          BOOT_JDK_FOUND=no
14860        else
14861          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14862          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14863            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14864$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14865            BOOT_JDK_FOUND=no
14866          else
14867            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14868            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14869
14870            # Extra M4 quote needed to protect [] in grep expression.
14871            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14872            if test "x$FOUND_VERSION_78" = x; then
14873              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14875              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14876$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14877              BOOT_JDK_FOUND=no
14878            else
14879              # We're done! :-)
14880              BOOT_JDK_FOUND=yes
14881
14882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14883
14884  # Input might be given as Windows format, start by converting to
14885  # unix format.
14886  path="$BOOT_JDK"
14887  new_path=`$CYGPATH -u "$path"`
14888
14889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14892  # "foo.exe" is OK but "foo" is an error.
14893  #
14894  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14895  # It is also a way to make sure we got the proper file name for the real test later on.
14896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14897  if test "x$test_shortpath" = x; then
14898    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14899$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14900    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14901  fi
14902
14903  # Call helper function which possibly converts this using DOS-style short mode.
14904  # If so, the updated path is stored in $new_path.
14905
14906  input_path="$new_path"
14907  # Check if we need to convert this using DOS-style short mode. If the path
14908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14909  # take no chances and rewrite it.
14910  # Note: m4 eats our [], so we need to use [ and ] instead.
14911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14912  if test "x$has_forbidden_chars" != x; then
14913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14917      # Going to short mode and back again did indeed matter. Since short mode is
14918      # case insensitive, let's make it lowercase to improve readability.
14919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14920      # Now convert it back to Unix-stile (cygpath)
14921      input_path=`$CYGPATH -u "$shortmode_path"`
14922      new_path="$input_path"
14923    fi
14924  fi
14925
14926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14927  if test "x$test_cygdrive_prefix" = x; then
14928    # As a simple fix, exclude /usr/bin since it's not a real path.
14929    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14931      # a path prefixed by /cygdrive for fixpath to work.
14932      new_path="$CYGWIN_ROOT_PATH$input_path"
14933    fi
14934  fi
14935
14936
14937  if test "x$path" != "x$new_path"; then
14938    BOOT_JDK="$new_path"
14939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14940$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14941  fi
14942
14943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14944
14945  path="$BOOT_JDK"
14946  has_colon=`$ECHO $path | $GREP ^.:`
14947  new_path="$path"
14948  if test "x$has_colon" = x; then
14949    # Not in mixed or Windows style, start by that.
14950    new_path=`cmd //c echo $path`
14951  fi
14952
14953
14954  input_path="$new_path"
14955  # Check if we need to convert this using DOS-style short mode. If the path
14956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14957  # take no chances and rewrite it.
14958  # Note: m4 eats our [], so we need to use [ and ] instead.
14959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14960  if test "x$has_forbidden_chars" != x; then
14961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14963  fi
14964
14965
14966  windows_path="$new_path"
14967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14968    unix_path=`$CYGPATH -u "$windows_path"`
14969    new_path="$unix_path"
14970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14972    new_path="$unix_path"
14973  fi
14974
14975  if test "x$path" != "x$new_path"; then
14976    BOOT_JDK="$new_path"
14977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14979  fi
14980
14981  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14982  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14983
14984  else
14985    # We're on a posix platform. Hooray! :)
14986    path="$BOOT_JDK"
14987
14988    if test ! -f "$path" && test ! -d "$path"; then
14989      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14990    fi
14991
14992    has_space=`$ECHO "$path" | $GREP " "`
14993    if test "x$has_space" != x; then
14994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14995$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14996      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14997    fi
14998  fi
14999
15000              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15001$as_echo_n "checking for Boot JDK... " >&6; }
15002              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15003$as_echo "$BOOT_JDK" >&6; }
15004              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15005$as_echo_n "checking Boot JDK version... " >&6; }
15006              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15007              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15008$as_echo "$BOOT_JDK_VERSION" >&6; }
15009            fi # end check jdk version
15010          fi # end check rt.jar
15011        fi # end check javac
15012      fi # end check java
15013    fi # end check boot jdk found
15014  fi
15015
15016
15017  if test "x$BOOT_JDK_FOUND" = xno; then
15018    # Now execute the test
15019
15020  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
15021  BOOT_JDK_SUFFIX=""
15022  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15023  if test "x$ALL_JDKS_FOUND" != x; then
15024    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15025
15026  if test "x$BOOT_JDK_FOUND" = xno; then
15027    # Now execute the test
15028
15029        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15030        if test -d "$BOOT_JDK"; then
15031          BOOT_JDK_FOUND=maybe
15032          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15033$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15034        fi
15035
15036
15037    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15038    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15039      # Do we have a bin/java?
15040      if test ! -x "$BOOT_JDK/bin/java"; then
15041        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15043        BOOT_JDK_FOUND=no
15044      else
15045        # Do we have a bin/javac?
15046        if test ! -x "$BOOT_JDK/bin/javac"; then
15047          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15049          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15050$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15051          BOOT_JDK_FOUND=no
15052        else
15053          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15054          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15055            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15057            BOOT_JDK_FOUND=no
15058          else
15059            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15060            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15061
15062            # Extra M4 quote needed to protect [] in grep expression.
15063            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15064            if test "x$FOUND_VERSION_78" = x; then
15065              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15067              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15068$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15069              BOOT_JDK_FOUND=no
15070            else
15071              # We're done! :-)
15072              BOOT_JDK_FOUND=yes
15073
15074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15075
15076  # Input might be given as Windows format, start by converting to
15077  # unix format.
15078  path="$BOOT_JDK"
15079  new_path=`$CYGPATH -u "$path"`
15080
15081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15084  # "foo.exe" is OK but "foo" is an error.
15085  #
15086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15087  # It is also a way to make sure we got the proper file name for the real test later on.
15088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15089  if test "x$test_shortpath" = x; then
15090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15092    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15093  fi
15094
15095  # Call helper function which possibly converts this using DOS-style short mode.
15096  # If so, the updated path is stored in $new_path.
15097
15098  input_path="$new_path"
15099  # Check if we need to convert this using DOS-style short mode. If the path
15100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15101  # take no chances and rewrite it.
15102  # Note: m4 eats our [], so we need to use [ and ] instead.
15103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15104  if test "x$has_forbidden_chars" != x; then
15105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15109      # Going to short mode and back again did indeed matter. Since short mode is
15110      # case insensitive, let's make it lowercase to improve readability.
15111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15112      # Now convert it back to Unix-stile (cygpath)
15113      input_path=`$CYGPATH -u "$shortmode_path"`
15114      new_path="$input_path"
15115    fi
15116  fi
15117
15118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15119  if test "x$test_cygdrive_prefix" = x; then
15120    # As a simple fix, exclude /usr/bin since it's not a real path.
15121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15123      # a path prefixed by /cygdrive for fixpath to work.
15124      new_path="$CYGWIN_ROOT_PATH$input_path"
15125    fi
15126  fi
15127
15128
15129  if test "x$path" != "x$new_path"; then
15130    BOOT_JDK="$new_path"
15131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15133  fi
15134
15135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15136
15137  path="$BOOT_JDK"
15138  has_colon=`$ECHO $path | $GREP ^.:`
15139  new_path="$path"
15140  if test "x$has_colon" = x; then
15141    # Not in mixed or Windows style, start by that.
15142    new_path=`cmd //c echo $path`
15143  fi
15144
15145
15146  input_path="$new_path"
15147  # Check if we need to convert this using DOS-style short mode. If the path
15148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15149  # take no chances and rewrite it.
15150  # Note: m4 eats our [], so we need to use [ and ] instead.
15151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15152  if test "x$has_forbidden_chars" != x; then
15153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15155  fi
15156
15157
15158  windows_path="$new_path"
15159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15160    unix_path=`$CYGPATH -u "$windows_path"`
15161    new_path="$unix_path"
15162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15164    new_path="$unix_path"
15165  fi
15166
15167  if test "x$path" != "x$new_path"; then
15168    BOOT_JDK="$new_path"
15169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15170$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15171  fi
15172
15173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15175
15176  else
15177    # We're on a posix platform. Hooray! :)
15178    path="$BOOT_JDK"
15179
15180    if test ! -f "$path" && test ! -d "$path"; then
15181      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15182    fi
15183
15184    has_space=`$ECHO "$path" | $GREP " "`
15185    if test "x$has_space" != x; then
15186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15188      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15189    fi
15190  fi
15191
15192              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15193$as_echo_n "checking for Boot JDK... " >&6; }
15194              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15195$as_echo "$BOOT_JDK" >&6; }
15196              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15197$as_echo_n "checking Boot JDK version... " >&6; }
15198              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15199              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15200$as_echo "$BOOT_JDK_VERSION" >&6; }
15201            fi # end check jdk version
15202          fi # end check rt.jar
15203        fi # end check javac
15204      fi # end check java
15205    fi # end check boot jdk found
15206  fi
15207
15208    done
15209  fi
15210
15211
15212    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15213    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15214      # Do we have a bin/java?
15215      if test ! -x "$BOOT_JDK/bin/java"; then
15216        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15218        BOOT_JDK_FOUND=no
15219      else
15220        # Do we have a bin/javac?
15221        if test ! -x "$BOOT_JDK/bin/javac"; then
15222          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15224          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15225$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15226          BOOT_JDK_FOUND=no
15227        else
15228          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15229          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15230            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15232            BOOT_JDK_FOUND=no
15233          else
15234            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15235            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15236
15237            # Extra M4 quote needed to protect [] in grep expression.
15238            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15239            if test "x$FOUND_VERSION_78" = x; then
15240              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15242              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15243$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15244              BOOT_JDK_FOUND=no
15245            else
15246              # We're done! :-)
15247              BOOT_JDK_FOUND=yes
15248
15249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15250
15251  # Input might be given as Windows format, start by converting to
15252  # unix format.
15253  path="$BOOT_JDK"
15254  new_path=`$CYGPATH -u "$path"`
15255
15256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15259  # "foo.exe" is OK but "foo" is an error.
15260  #
15261  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15262  # It is also a way to make sure we got the proper file name for the real test later on.
15263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15264  if test "x$test_shortpath" = x; then
15265    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15266$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15267    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15268  fi
15269
15270  # Call helper function which possibly converts this using DOS-style short mode.
15271  # If so, the updated path is stored in $new_path.
15272
15273  input_path="$new_path"
15274  # Check if we need to convert this using DOS-style short mode. If the path
15275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15276  # take no chances and rewrite it.
15277  # Note: m4 eats our [], so we need to use [ and ] instead.
15278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15279  if test "x$has_forbidden_chars" != x; then
15280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15284      # Going to short mode and back again did indeed matter. Since short mode is
15285      # case insensitive, let's make it lowercase to improve readability.
15286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15287      # Now convert it back to Unix-stile (cygpath)
15288      input_path=`$CYGPATH -u "$shortmode_path"`
15289      new_path="$input_path"
15290    fi
15291  fi
15292
15293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15294  if test "x$test_cygdrive_prefix" = x; then
15295    # As a simple fix, exclude /usr/bin since it's not a real path.
15296    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15298      # a path prefixed by /cygdrive for fixpath to work.
15299      new_path="$CYGWIN_ROOT_PATH$input_path"
15300    fi
15301  fi
15302
15303
15304  if test "x$path" != "x$new_path"; then
15305    BOOT_JDK="$new_path"
15306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15307$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15308  fi
15309
15310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15311
15312  path="$BOOT_JDK"
15313  has_colon=`$ECHO $path | $GREP ^.:`
15314  new_path="$path"
15315  if test "x$has_colon" = x; then
15316    # Not in mixed or Windows style, start by that.
15317    new_path=`cmd //c echo $path`
15318  fi
15319
15320
15321  input_path="$new_path"
15322  # Check if we need to convert this using DOS-style short mode. If the path
15323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15324  # take no chances and rewrite it.
15325  # Note: m4 eats our [], so we need to use [ and ] instead.
15326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15327  if test "x$has_forbidden_chars" != x; then
15328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15330  fi
15331
15332
15333  windows_path="$new_path"
15334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15335    unix_path=`$CYGPATH -u "$windows_path"`
15336    new_path="$unix_path"
15337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15339    new_path="$unix_path"
15340  fi
15341
15342  if test "x$path" != "x$new_path"; then
15343    BOOT_JDK="$new_path"
15344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15346  fi
15347
15348  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15349  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15350
15351  else
15352    # We're on a posix platform. Hooray! :)
15353    path="$BOOT_JDK"
15354
15355    if test ! -f "$path" && test ! -d "$path"; then
15356      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15357    fi
15358
15359    has_space=`$ECHO "$path" | $GREP " "`
15360    if test "x$has_space" != x; then
15361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15362$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15363      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15364    fi
15365  fi
15366
15367              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15368$as_echo_n "checking for Boot JDK... " >&6; }
15369              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15370$as_echo "$BOOT_JDK" >&6; }
15371              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15372$as_echo_n "checking Boot JDK version... " >&6; }
15373              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15374              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15375$as_echo "$BOOT_JDK_VERSION" >&6; }
15376            fi # end check jdk version
15377          fi # end check rt.jar
15378        fi # end check javac
15379      fi # end check java
15380    fi # end check boot jdk found
15381  fi
15382
15383  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
15384
15385  if test "x$BOOT_JDK_FOUND" = xno; then
15386    # Now execute the test
15387
15388  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
15389  BOOT_JDK_SUFFIX="/Contents/Home"
15390  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15391  if test "x$ALL_JDKS_FOUND" != x; then
15392    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15393
15394  if test "x$BOOT_JDK_FOUND" = xno; then
15395    # Now execute the test
15396
15397        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15398        if test -d "$BOOT_JDK"; then
15399          BOOT_JDK_FOUND=maybe
15400          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15401$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15402        fi
15403
15404
15405    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15406    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15407      # Do we have a bin/java?
15408      if test ! -x "$BOOT_JDK/bin/java"; then
15409        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15411        BOOT_JDK_FOUND=no
15412      else
15413        # Do we have a bin/javac?
15414        if test ! -x "$BOOT_JDK/bin/javac"; then
15415          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15417          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15418$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15419          BOOT_JDK_FOUND=no
15420        else
15421          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15422          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15423            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15425            BOOT_JDK_FOUND=no
15426          else
15427            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15428            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15429
15430            # Extra M4 quote needed to protect [] in grep expression.
15431            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15432            if test "x$FOUND_VERSION_78" = x; then
15433              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15435              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15436$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15437              BOOT_JDK_FOUND=no
15438            else
15439              # We're done! :-)
15440              BOOT_JDK_FOUND=yes
15441
15442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15443
15444  # Input might be given as Windows format, start by converting to
15445  # unix format.
15446  path="$BOOT_JDK"
15447  new_path=`$CYGPATH -u "$path"`
15448
15449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15452  # "foo.exe" is OK but "foo" is an error.
15453  #
15454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15455  # It is also a way to make sure we got the proper file name for the real test later on.
15456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15457  if test "x$test_shortpath" = x; then
15458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15460    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15461  fi
15462
15463  # Call helper function which possibly converts this using DOS-style short mode.
15464  # If so, the updated path is stored in $new_path.
15465
15466  input_path="$new_path"
15467  # Check if we need to convert this using DOS-style short mode. If the path
15468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15469  # take no chances and rewrite it.
15470  # Note: m4 eats our [], so we need to use [ and ] instead.
15471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15472  if test "x$has_forbidden_chars" != x; then
15473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15477      # Going to short mode and back again did indeed matter. Since short mode is
15478      # case insensitive, let's make it lowercase to improve readability.
15479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15480      # Now convert it back to Unix-stile (cygpath)
15481      input_path=`$CYGPATH -u "$shortmode_path"`
15482      new_path="$input_path"
15483    fi
15484  fi
15485
15486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15487  if test "x$test_cygdrive_prefix" = x; then
15488    # As a simple fix, exclude /usr/bin since it's not a real path.
15489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15491      # a path prefixed by /cygdrive for fixpath to work.
15492      new_path="$CYGWIN_ROOT_PATH$input_path"
15493    fi
15494  fi
15495
15496
15497  if test "x$path" != "x$new_path"; then
15498    BOOT_JDK="$new_path"
15499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15500$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15501  fi
15502
15503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15504
15505  path="$BOOT_JDK"
15506  has_colon=`$ECHO $path | $GREP ^.:`
15507  new_path="$path"
15508  if test "x$has_colon" = x; then
15509    # Not in mixed or Windows style, start by that.
15510    new_path=`cmd //c echo $path`
15511  fi
15512
15513
15514  input_path="$new_path"
15515  # Check if we need to convert this using DOS-style short mode. If the path
15516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15517  # take no chances and rewrite it.
15518  # Note: m4 eats our [], so we need to use [ and ] instead.
15519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15520  if test "x$has_forbidden_chars" != x; then
15521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15523  fi
15524
15525
15526  windows_path="$new_path"
15527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15528    unix_path=`$CYGPATH -u "$windows_path"`
15529    new_path="$unix_path"
15530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15532    new_path="$unix_path"
15533  fi
15534
15535  if test "x$path" != "x$new_path"; then
15536    BOOT_JDK="$new_path"
15537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15539  fi
15540
15541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15543
15544  else
15545    # We're on a posix platform. Hooray! :)
15546    path="$BOOT_JDK"
15547
15548    if test ! -f "$path" && test ! -d "$path"; then
15549      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15550    fi
15551
15552    has_space=`$ECHO "$path" | $GREP " "`
15553    if test "x$has_space" != x; then
15554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15556      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15557    fi
15558  fi
15559
15560              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15561$as_echo_n "checking for Boot JDK... " >&6; }
15562              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15563$as_echo "$BOOT_JDK" >&6; }
15564              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15565$as_echo_n "checking Boot JDK version... " >&6; }
15566              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15567              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15568$as_echo "$BOOT_JDK_VERSION" >&6; }
15569            fi # end check jdk version
15570          fi # end check rt.jar
15571        fi # end check javac
15572      fi # end check java
15573    fi # end check boot jdk found
15574  fi
15575
15576    done
15577  fi
15578
15579
15580    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15581    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15582      # Do we have a bin/java?
15583      if test ! -x "$BOOT_JDK/bin/java"; then
15584        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15586        BOOT_JDK_FOUND=no
15587      else
15588        # Do we have a bin/javac?
15589        if test ! -x "$BOOT_JDK/bin/javac"; then
15590          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15592          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15593$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15594          BOOT_JDK_FOUND=no
15595        else
15596          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15597          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15598            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15600            BOOT_JDK_FOUND=no
15601          else
15602            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15603            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15604
15605            # Extra M4 quote needed to protect [] in grep expression.
15606            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15607            if test "x$FOUND_VERSION_78" = x; then
15608              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15610              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15611$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15612              BOOT_JDK_FOUND=no
15613            else
15614              # We're done! :-)
15615              BOOT_JDK_FOUND=yes
15616
15617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15618
15619  # Input might be given as Windows format, start by converting to
15620  # unix format.
15621  path="$BOOT_JDK"
15622  new_path=`$CYGPATH -u "$path"`
15623
15624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15627  # "foo.exe" is OK but "foo" is an error.
15628  #
15629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15630  # It is also a way to make sure we got the proper file name for the real test later on.
15631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15632  if test "x$test_shortpath" = x; then
15633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15634$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15635    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15636  fi
15637
15638  # Call helper function which possibly converts this using DOS-style short mode.
15639  # If so, the updated path is stored in $new_path.
15640
15641  input_path="$new_path"
15642  # Check if we need to convert this using DOS-style short mode. If the path
15643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15644  # take no chances and rewrite it.
15645  # Note: m4 eats our [], so we need to use [ and ] instead.
15646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15647  if test "x$has_forbidden_chars" != x; then
15648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15652      # Going to short mode and back again did indeed matter. Since short mode is
15653      # case insensitive, let's make it lowercase to improve readability.
15654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15655      # Now convert it back to Unix-stile (cygpath)
15656      input_path=`$CYGPATH -u "$shortmode_path"`
15657      new_path="$input_path"
15658    fi
15659  fi
15660
15661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15662  if test "x$test_cygdrive_prefix" = x; then
15663    # As a simple fix, exclude /usr/bin since it's not a real path.
15664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15666      # a path prefixed by /cygdrive for fixpath to work.
15667      new_path="$CYGWIN_ROOT_PATH$input_path"
15668    fi
15669  fi
15670
15671
15672  if test "x$path" != "x$new_path"; then
15673    BOOT_JDK="$new_path"
15674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15676  fi
15677
15678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15679
15680  path="$BOOT_JDK"
15681  has_colon=`$ECHO $path | $GREP ^.:`
15682  new_path="$path"
15683  if test "x$has_colon" = x; then
15684    # Not in mixed or Windows style, start by that.
15685    new_path=`cmd //c echo $path`
15686  fi
15687
15688
15689  input_path="$new_path"
15690  # Check if we need to convert this using DOS-style short mode. If the path
15691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15692  # take no chances and rewrite it.
15693  # Note: m4 eats our [], so we need to use [ and ] instead.
15694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15695  if test "x$has_forbidden_chars" != x; then
15696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15698  fi
15699
15700
15701  windows_path="$new_path"
15702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15703    unix_path=`$CYGPATH -u "$windows_path"`
15704    new_path="$unix_path"
15705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15707    new_path="$unix_path"
15708  fi
15709
15710  if test "x$path" != "x$new_path"; then
15711    BOOT_JDK="$new_path"
15712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15713$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15714  fi
15715
15716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15718
15719  else
15720    # We're on a posix platform. Hooray! :)
15721    path="$BOOT_JDK"
15722
15723    if test ! -f "$path" && test ! -d "$path"; then
15724      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15725    fi
15726
15727    has_space=`$ECHO "$path" | $GREP " "`
15728    if test "x$has_space" != x; then
15729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15731      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15732    fi
15733  fi
15734
15735              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15736$as_echo_n "checking for Boot JDK... " >&6; }
15737              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15738$as_echo "$BOOT_JDK" >&6; }
15739              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15740$as_echo_n "checking Boot JDK version... " >&6; }
15741              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15742              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15743$as_echo "$BOOT_JDK_VERSION" >&6; }
15744            fi # end check jdk version
15745          fi # end check rt.jar
15746        fi # end check javac
15747      fi # end check java
15748    fi # end check boot jdk found
15749  fi
15750
15751
15752  if test "x$BOOT_JDK_FOUND" = xno; then
15753    # Now execute the test
15754
15755  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
15756  BOOT_JDK_SUFFIX="/Contents/Home"
15757  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15758  if test "x$ALL_JDKS_FOUND" != x; then
15759    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15760
15761  if test "x$BOOT_JDK_FOUND" = xno; then
15762    # Now execute the test
15763
15764        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15765        if test -d "$BOOT_JDK"; then
15766          BOOT_JDK_FOUND=maybe
15767          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15768$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15769        fi
15770
15771
15772    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15773    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15774      # Do we have a bin/java?
15775      if test ! -x "$BOOT_JDK/bin/java"; then
15776        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15778        BOOT_JDK_FOUND=no
15779      else
15780        # Do we have a bin/javac?
15781        if test ! -x "$BOOT_JDK/bin/javac"; then
15782          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15784          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15785$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15786          BOOT_JDK_FOUND=no
15787        else
15788          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15789          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15790            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15792            BOOT_JDK_FOUND=no
15793          else
15794            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15795            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15796
15797            # Extra M4 quote needed to protect [] in grep expression.
15798            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15799            if test "x$FOUND_VERSION_78" = x; then
15800              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15802              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15803$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15804              BOOT_JDK_FOUND=no
15805            else
15806              # We're done! :-)
15807              BOOT_JDK_FOUND=yes
15808
15809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15810
15811  # Input might be given as Windows format, start by converting to
15812  # unix format.
15813  path="$BOOT_JDK"
15814  new_path=`$CYGPATH -u "$path"`
15815
15816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15819  # "foo.exe" is OK but "foo" is an error.
15820  #
15821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15822  # It is also a way to make sure we got the proper file name for the real test later on.
15823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15824  if test "x$test_shortpath" = x; then
15825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15826$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15827    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15828  fi
15829
15830  # Call helper function which possibly converts this using DOS-style short mode.
15831  # If so, the updated path is stored in $new_path.
15832
15833  input_path="$new_path"
15834  # Check if we need to convert this using DOS-style short mode. If the path
15835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15836  # take no chances and rewrite it.
15837  # Note: m4 eats our [], so we need to use [ and ] instead.
15838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15839  if test "x$has_forbidden_chars" != x; then
15840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15844      # Going to short mode and back again did indeed matter. Since short mode is
15845      # case insensitive, let's make it lowercase to improve readability.
15846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15847      # Now convert it back to Unix-stile (cygpath)
15848      input_path=`$CYGPATH -u "$shortmode_path"`
15849      new_path="$input_path"
15850    fi
15851  fi
15852
15853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15854  if test "x$test_cygdrive_prefix" = x; then
15855    # As a simple fix, exclude /usr/bin since it's not a real path.
15856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15858      # a path prefixed by /cygdrive for fixpath to work.
15859      new_path="$CYGWIN_ROOT_PATH$input_path"
15860    fi
15861  fi
15862
15863
15864  if test "x$path" != "x$new_path"; then
15865    BOOT_JDK="$new_path"
15866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15868  fi
15869
15870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15871
15872  path="$BOOT_JDK"
15873  has_colon=`$ECHO $path | $GREP ^.:`
15874  new_path="$path"
15875  if test "x$has_colon" = x; then
15876    # Not in mixed or Windows style, start by that.
15877    new_path=`cmd //c echo $path`
15878  fi
15879
15880
15881  input_path="$new_path"
15882  # Check if we need to convert this using DOS-style short mode. If the path
15883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15884  # take no chances and rewrite it.
15885  # Note: m4 eats our [], so we need to use [ and ] instead.
15886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15887  if test "x$has_forbidden_chars" != x; then
15888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15890  fi
15891
15892
15893  windows_path="$new_path"
15894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15895    unix_path=`$CYGPATH -u "$windows_path"`
15896    new_path="$unix_path"
15897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15899    new_path="$unix_path"
15900  fi
15901
15902  if test "x$path" != "x$new_path"; then
15903    BOOT_JDK="$new_path"
15904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15905$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15906  fi
15907
15908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15910
15911  else
15912    # We're on a posix platform. Hooray! :)
15913    path="$BOOT_JDK"
15914
15915    if test ! -f "$path" && test ! -d "$path"; then
15916      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15917    fi
15918
15919    has_space=`$ECHO "$path" | $GREP " "`
15920    if test "x$has_space" != x; then
15921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15923      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15924    fi
15925  fi
15926
15927              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15928$as_echo_n "checking for Boot JDK... " >&6; }
15929              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15930$as_echo "$BOOT_JDK" >&6; }
15931              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15932$as_echo_n "checking Boot JDK version... " >&6; }
15933              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15934              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15935$as_echo "$BOOT_JDK_VERSION" >&6; }
15936            fi # end check jdk version
15937          fi # end check rt.jar
15938        fi # end check javac
15939      fi # end check java
15940    fi # end check boot jdk found
15941  fi
15942
15943    done
15944  fi
15945
15946
15947    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15948    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15949      # Do we have a bin/java?
15950      if test ! -x "$BOOT_JDK/bin/java"; then
15951        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15953        BOOT_JDK_FOUND=no
15954      else
15955        # Do we have a bin/javac?
15956        if test ! -x "$BOOT_JDK/bin/javac"; then
15957          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15959          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15960$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15961          BOOT_JDK_FOUND=no
15962        else
15963          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15964          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15965            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15966$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15967            BOOT_JDK_FOUND=no
15968          else
15969            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15970            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15971
15972            # Extra M4 quote needed to protect [] in grep expression.
15973            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15974            if test "x$FOUND_VERSION_78" = x; then
15975              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15977              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15978$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15979              BOOT_JDK_FOUND=no
15980            else
15981              # We're done! :-)
15982              BOOT_JDK_FOUND=yes
15983
15984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15985
15986  # Input might be given as Windows format, start by converting to
15987  # unix format.
15988  path="$BOOT_JDK"
15989  new_path=`$CYGPATH -u "$path"`
15990
15991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15994  # "foo.exe" is OK but "foo" is an error.
15995  #
15996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15997  # It is also a way to make sure we got the proper file name for the real test later on.
15998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15999  if test "x$test_shortpath" = x; then
16000    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
16001$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
16002    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
16003  fi
16004
16005  # Call helper function which possibly converts this using DOS-style short mode.
16006  # If so, the updated path is stored in $new_path.
16007
16008  input_path="$new_path"
16009  # Check if we need to convert this using DOS-style short mode. If the path
16010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16011  # take no chances and rewrite it.
16012  # Note: m4 eats our [], so we need to use [ and ] instead.
16013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16014  if test "x$has_forbidden_chars" != x; then
16015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16019      # Going to short mode and back again did indeed matter. Since short mode is
16020      # case insensitive, let's make it lowercase to improve readability.
16021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16022      # Now convert it back to Unix-stile (cygpath)
16023      input_path=`$CYGPATH -u "$shortmode_path"`
16024      new_path="$input_path"
16025    fi
16026  fi
16027
16028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16029  if test "x$test_cygdrive_prefix" = x; then
16030    # As a simple fix, exclude /usr/bin since it's not a real path.
16031    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16033      # a path prefixed by /cygdrive for fixpath to work.
16034      new_path="$CYGWIN_ROOT_PATH$input_path"
16035    fi
16036  fi
16037
16038
16039  if test "x$path" != "x$new_path"; then
16040    BOOT_JDK="$new_path"
16041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
16042$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
16043  fi
16044
16045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16046
16047  path="$BOOT_JDK"
16048  has_colon=`$ECHO $path | $GREP ^.:`
16049  new_path="$path"
16050  if test "x$has_colon" = x; then
16051    # Not in mixed or Windows style, start by that.
16052    new_path=`cmd //c echo $path`
16053  fi
16054
16055
16056  input_path="$new_path"
16057  # Check if we need to convert this using DOS-style short mode. If the path
16058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16059  # take no chances and rewrite it.
16060  # Note: m4 eats our [], so we need to use [ and ] instead.
16061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16062  if test "x$has_forbidden_chars" != x; then
16063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16065  fi
16066
16067
16068  windows_path="$new_path"
16069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16070    unix_path=`$CYGPATH -u "$windows_path"`
16071    new_path="$unix_path"
16072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16074    new_path="$unix_path"
16075  fi
16076
16077  if test "x$path" != "x$new_path"; then
16078    BOOT_JDK="$new_path"
16079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
16080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
16081  fi
16082
16083  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16084  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16085
16086  else
16087    # We're on a posix platform. Hooray! :)
16088    path="$BOOT_JDK"
16089
16090    if test ! -f "$path" && test ! -d "$path"; then
16091      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
16092    fi
16093
16094    has_space=`$ECHO "$path" | $GREP " "`
16095    if test "x$has_space" != x; then
16096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
16097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
16098      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16099    fi
16100  fi
16101
16102              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
16103$as_echo_n "checking for Boot JDK... " >&6; }
16104              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
16105$as_echo "$BOOT_JDK" >&6; }
16106              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
16107$as_echo_n "checking Boot JDK version... " >&6; }
16108              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
16109              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
16110$as_echo "$BOOT_JDK_VERSION" >&6; }
16111            fi # end check jdk version
16112          fi # end check rt.jar
16113        fi # end check javac
16114      fi # end check java
16115    fi # end check boot jdk found
16116  fi
16117
16118  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
16119
16120  if test "x$BOOT_JDK_FOUND" = xno; then
16121    # Now execute the test
16122
16123  BOOT_JDK_PREFIX="/usr/lib/jvm"
16124  BOOT_JDK_SUFFIX=""
16125  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
16126  if test "x$ALL_JDKS_FOUND" != x; then
16127    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
16128
16129  if test "x$BOOT_JDK_FOUND" = xno; then
16130    # Now execute the test
16131
16132        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
16133        if test -d "$BOOT_JDK"; then
16134          BOOT_JDK_FOUND=maybe
16135          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
16136$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
16137        fi
16138
16139
16140    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
16141    if test "x$BOOT_JDK_FOUND" = xmaybe; then
16142      # Do we have a bin/java?
16143      if test ! -x "$BOOT_JDK/bin/java"; then
16144        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
16145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
16146        BOOT_JDK_FOUND=no
16147      else
16148        # Do we have a bin/javac?
16149        if test ! -x "$BOOT_JDK/bin/javac"; then
16150          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
16151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
16152          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
16153$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
16154          BOOT_JDK_FOUND=no
16155        else
16156          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
16157          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
16158            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
16159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
16160            BOOT_JDK_FOUND=no
16161          else
16162            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
16163            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
16164
16165            # Extra M4 quote needed to protect [] in grep expression.
16166            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
16167            if test "x$FOUND_VERSION_78" = x; then
16168              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
16169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
16170              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
16171$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
16172              BOOT_JDK_FOUND=no
16173            else
16174              # We're done! :-)
16175              BOOT_JDK_FOUND=yes
16176
16177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16178
16179  # Input might be given as Windows format, start by converting to
16180  # unix format.
16181  path="$BOOT_JDK"
16182  new_path=`$CYGPATH -u "$path"`
16183
16184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16187  # "foo.exe" is OK but "foo" is an error.
16188  #
16189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16190  # It is also a way to make sure we got the proper file name for the real test later on.
16191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16192  if test "x$test_shortpath" = x; then
16193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
16194$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
16195    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
16196  fi
16197
16198  # Call helper function which possibly converts this using DOS-style short mode.
16199  # If so, the updated path is stored in $new_path.
16200
16201  input_path="$new_path"
16202  # Check if we need to convert this using DOS-style short mode. If the path
16203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16204  # take no chances and rewrite it.
16205  # Note: m4 eats our [], so we need to use [ and ] instead.
16206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16207  if test "x$has_forbidden_chars" != x; then
16208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16212      # Going to short mode and back again did indeed matter. Since short mode is
16213      # case insensitive, let's make it lowercase to improve readability.
16214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16215      # Now convert it back to Unix-stile (cygpath)
16216      input_path=`$CYGPATH -u "$shortmode_path"`
16217      new_path="$input_path"
16218    fi
16219  fi
16220
16221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16222  if test "x$test_cygdrive_prefix" = x; then
16223    # As a simple fix, exclude /usr/bin since it's not a real path.
16224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16226      # a path prefixed by /cygdrive for fixpath to work.
16227      new_path="$CYGWIN_ROOT_PATH$input_path"
16228    fi
16229  fi
16230
16231
16232  if test "x$path" != "x$new_path"; then
16233    BOOT_JDK="$new_path"
16234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
16235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
16236  fi
16237
16238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16239
16240  path="$BOOT_JDK"
16241  has_colon=`$ECHO $path | $GREP ^.:`
16242  new_path="$path"
16243  if test "x$has_colon" = x; then
16244    # Not in mixed or Windows style, start by that.
16245    new_path=`cmd //c echo $path`
16246  fi
16247
16248
16249  input_path="$new_path"
16250  # Check if we need to convert this using DOS-style short mode. If the path
16251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16252  # take no chances and rewrite it.
16253  # Note: m4 eats our [], so we need to use [ and ] instead.
16254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16255  if test "x$has_forbidden_chars" != x; then
16256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16258  fi
16259
16260
16261  windows_path="$new_path"
16262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16263    unix_path=`$CYGPATH -u "$windows_path"`
16264    new_path="$unix_path"
16265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16267    new_path="$unix_path"
16268  fi
16269
16270  if test "x$path" != "x$new_path"; then
16271    BOOT_JDK="$new_path"
16272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
16273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
16274  fi
16275
16276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16278
16279  else
16280    # We're on a posix platform. Hooray! :)
16281    path="$BOOT_JDK"
16282
16283    if test ! -f "$path" && test ! -d "$path"; then
16284      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
16285    fi
16286
16287    has_space=`$ECHO "$path" | $GREP " "`
16288    if test "x$has_space" != x; then
16289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
16290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
16291      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16292    fi
16293  fi
16294
16295              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
16296$as_echo_n "checking for Boot JDK... " >&6; }
16297              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
16298$as_echo "$BOOT_JDK" >&6; }
16299              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
16300$as_echo_n "checking Boot JDK version... " >&6; }
16301              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
16302              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
16303$as_echo "$BOOT_JDK_VERSION" >&6; }
16304            fi # end check jdk version
16305          fi # end check rt.jar
16306        fi # end check javac
16307      fi # end check java
16308    fi # end check boot jdk found
16309  fi
16310
16311    done
16312  fi
16313
16314
16315    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
16316    if test "x$BOOT_JDK_FOUND" = xmaybe; then
16317      # Do we have a bin/java?
16318      if test ! -x "$BOOT_JDK/bin/java"; then
16319        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
16320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
16321        BOOT_JDK_FOUND=no
16322      else
16323        # Do we have a bin/javac?
16324        if test ! -x "$BOOT_JDK/bin/javac"; then
16325          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
16326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
16327          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
16328$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
16329          BOOT_JDK_FOUND=no
16330        else
16331          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
16332          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
16333            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
16334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
16335            BOOT_JDK_FOUND=no
16336          else
16337            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
16338            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
16339
16340            # Extra M4 quote needed to protect [] in grep expression.
16341            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
16342            if test "x$FOUND_VERSION_78" = x; then
16343              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
16344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
16345              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
16346$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
16347              BOOT_JDK_FOUND=no
16348            else
16349              # We're done! :-)
16350              BOOT_JDK_FOUND=yes
16351
16352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16353
16354  # Input might be given as Windows format, start by converting to
16355  # unix format.
16356  path="$BOOT_JDK"
16357  new_path=`$CYGPATH -u "$path"`
16358
16359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16362  # "foo.exe" is OK but "foo" is an error.
16363  #
16364  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16365  # It is also a way to make sure we got the proper file name for the real test later on.
16366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16367  if test "x$test_shortpath" = x; then
16368    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
16369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
16370    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
16371  fi
16372
16373  # Call helper function which possibly converts this using DOS-style short mode.
16374  # If so, the updated path is stored in $new_path.
16375
16376  input_path="$new_path"
16377  # Check if we need to convert this using DOS-style short mode. If the path
16378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16379  # take no chances and rewrite it.
16380  # Note: m4 eats our [], so we need to use [ and ] instead.
16381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16382  if test "x$has_forbidden_chars" != x; then
16383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16387      # Going to short mode and back again did indeed matter. Since short mode is
16388      # case insensitive, let's make it lowercase to improve readability.
16389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16390      # Now convert it back to Unix-stile (cygpath)
16391      input_path=`$CYGPATH -u "$shortmode_path"`
16392      new_path="$input_path"
16393    fi
16394  fi
16395
16396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16397  if test "x$test_cygdrive_prefix" = x; then
16398    # As a simple fix, exclude /usr/bin since it's not a real path.
16399    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16401      # a path prefixed by /cygdrive for fixpath to work.
16402      new_path="$CYGWIN_ROOT_PATH$input_path"
16403    fi
16404  fi
16405
16406
16407  if test "x$path" != "x$new_path"; then
16408    BOOT_JDK="$new_path"
16409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
16410$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
16411  fi
16412
16413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16414
16415  path="$BOOT_JDK"
16416  has_colon=`$ECHO $path | $GREP ^.:`
16417  new_path="$path"
16418  if test "x$has_colon" = x; then
16419    # Not in mixed or Windows style, start by that.
16420    new_path=`cmd //c echo $path`
16421  fi
16422
16423
16424  input_path="$new_path"
16425  # Check if we need to convert this using DOS-style short mode. If the path
16426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16427  # take no chances and rewrite it.
16428  # Note: m4 eats our [], so we need to use [ and ] instead.
16429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16430  if test "x$has_forbidden_chars" != x; then
16431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16433  fi
16434
16435
16436  windows_path="$new_path"
16437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16438    unix_path=`$CYGPATH -u "$windows_path"`
16439    new_path="$unix_path"
16440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16442    new_path="$unix_path"
16443  fi
16444
16445  if test "x$path" != "x$new_path"; then
16446    BOOT_JDK="$new_path"
16447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
16448$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
16449  fi
16450
16451  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16452  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16453
16454  else
16455    # We're on a posix platform. Hooray! :)
16456    path="$BOOT_JDK"
16457
16458    if test ! -f "$path" && test ! -d "$path"; then
16459      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
16460    fi
16461
16462    has_space=`$ECHO "$path" | $GREP " "`
16463    if test "x$has_space" != x; then
16464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
16465$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
16466      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16467    fi
16468  fi
16469
16470              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
16471$as_echo_n "checking for Boot JDK... " >&6; }
16472              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
16473$as_echo "$BOOT_JDK" >&6; }
16474              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
16475$as_echo_n "checking Boot JDK version... " >&6; }
16476              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
16477              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
16478$as_echo "$BOOT_JDK_VERSION" >&6; }
16479            fi # end check jdk version
16480          fi # end check rt.jar
16481        fi # end check javac
16482      fi # end check java
16483    fi # end check boot jdk found
16484  fi
16485
16486  fi
16487
16488
16489    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
16490    if test "x$BOOT_JDK_FOUND" = xmaybe; then
16491      # Do we have a bin/java?
16492      if test ! -x "$BOOT_JDK/bin/java"; then
16493        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
16494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
16495        BOOT_JDK_FOUND=no
16496      else
16497        # Do we have a bin/javac?
16498        if test ! -x "$BOOT_JDK/bin/javac"; then
16499          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
16500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
16501          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
16502$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
16503          BOOT_JDK_FOUND=no
16504        else
16505          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
16506          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
16507            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
16508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
16509            BOOT_JDK_FOUND=no
16510          else
16511            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
16512            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
16513
16514            # Extra M4 quote needed to protect [] in grep expression.
16515            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
16516            if test "x$FOUND_VERSION_78" = x; then
16517              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
16518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
16519              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
16520$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
16521              BOOT_JDK_FOUND=no
16522            else
16523              # We're done! :-)
16524              BOOT_JDK_FOUND=yes
16525
16526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16527
16528  # Input might be given as Windows format, start by converting to
16529  # unix format.
16530  path="$BOOT_JDK"
16531  new_path=`$CYGPATH -u "$path"`
16532
16533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16536  # "foo.exe" is OK but "foo" is an error.
16537  #
16538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16539  # It is also a way to make sure we got the proper file name for the real test later on.
16540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16541  if test "x$test_shortpath" = x; then
16542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
16543$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
16544    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
16545  fi
16546
16547  # Call helper function which possibly converts this using DOS-style short mode.
16548  # If so, the updated path is stored in $new_path.
16549
16550  input_path="$new_path"
16551  # Check if we need to convert this using DOS-style short mode. If the path
16552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16553  # take no chances and rewrite it.
16554  # Note: m4 eats our [], so we need to use [ and ] instead.
16555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16556  if test "x$has_forbidden_chars" != x; then
16557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16561      # Going to short mode and back again did indeed matter. Since short mode is
16562      # case insensitive, let's make it lowercase to improve readability.
16563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16564      # Now convert it back to Unix-stile (cygpath)
16565      input_path=`$CYGPATH -u "$shortmode_path"`
16566      new_path="$input_path"
16567    fi
16568  fi
16569
16570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16571  if test "x$test_cygdrive_prefix" = x; then
16572    # As a simple fix, exclude /usr/bin since it's not a real path.
16573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16575      # a path prefixed by /cygdrive for fixpath to work.
16576      new_path="$CYGWIN_ROOT_PATH$input_path"
16577    fi
16578  fi
16579
16580
16581  if test "x$path" != "x$new_path"; then
16582    BOOT_JDK="$new_path"
16583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
16584$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
16585  fi
16586
16587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16588
16589  path="$BOOT_JDK"
16590  has_colon=`$ECHO $path | $GREP ^.:`
16591  new_path="$path"
16592  if test "x$has_colon" = x; then
16593    # Not in mixed or Windows style, start by that.
16594    new_path=`cmd //c echo $path`
16595  fi
16596
16597
16598  input_path="$new_path"
16599  # Check if we need to convert this using DOS-style short mode. If the path
16600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16601  # take no chances and rewrite it.
16602  # Note: m4 eats our [], so we need to use [ and ] instead.
16603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16604  if test "x$has_forbidden_chars" != x; then
16605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16607  fi
16608
16609
16610  windows_path="$new_path"
16611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16612    unix_path=`$CYGPATH -u "$windows_path"`
16613    new_path="$unix_path"
16614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16616    new_path="$unix_path"
16617  fi
16618
16619  if test "x$path" != "x$new_path"; then
16620    BOOT_JDK="$new_path"
16621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
16622$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
16623  fi
16624
16625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16627
16628  else
16629    # We're on a posix platform. Hooray! :)
16630    path="$BOOT_JDK"
16631
16632    if test ! -f "$path" && test ! -d "$path"; then
16633      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
16634    fi
16635
16636    has_space=`$ECHO "$path" | $GREP " "`
16637    if test "x$has_space" != x; then
16638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
16639$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
16640      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16641    fi
16642  fi
16643
16644              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
16645$as_echo_n "checking for Boot JDK... " >&6; }
16646              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
16647$as_echo "$BOOT_JDK" >&6; }
16648              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
16649$as_echo_n "checking Boot JDK version... " >&6; }
16650              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
16651              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
16652$as_echo "$BOOT_JDK_VERSION" >&6; }
16653            fi # end check jdk version
16654          fi # end check rt.jar
16655        fi # end check javac
16656      fi # end check java
16657    fi # end check boot jdk found
16658  fi
16659
16660
16661# If we haven't found anything yet, we've truly lost. Give up.
16662if test "x$BOOT_JDK_FOUND" = xno; then
16663
16664    # Print a helpful message on how to acquire the necessary build dependency.
16665    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
16666    MISSING_DEPENDENCY=openjdk
16667    PKGHANDLER_COMMAND=
16668
16669    case $PKGHANDLER in
16670	apt-get)
16671                apt_help     $MISSING_DEPENDENCY ;;
16672    yum)
16673                yum_help     $MISSING_DEPENDENCY ;;
16674	port)
16675                port_help    $MISSING_DEPENDENCY ;;
16676	pkgutil)
16677                pkgutil_help $MISSING_DEPENDENCY ;;
16678	pkgadd)
16679                pkgadd_help  $MISSING_DEPENDENCY ;;
16680    * )
16681      break ;;
16682    esac
16683
16684    if test "x$PKGHANDLER_COMMAND" != x; then
16685        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
16686    fi
16687
16688  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
16689$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
16690  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
16691$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16692  as_fn_error $? "Cannot continue" "$LINENO" 5
16693fi
16694
16695# Setup proper paths for what we found
16696BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
16697if test ! -f "$BOOT_RTJAR"; then
16698    # On MacOSX it is called classes.jar
16699    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
16700    if test -f "$BOOT_RTJAR"; then
16701      # Remove the ..
16702      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
16703    fi
16704fi
16705BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
16706BOOT_JDK="$BOOT_JDK"
16707
16708
16709
16710
16711# Setup tools from the Boot JDK.
16712
16713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
16714$as_echo_n "checking for java in Boot JDK... " >&6; }
16715  JAVA=$BOOT_JDK/bin/java
16716  if test ! -x $JAVA; then
16717      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16718$as_echo "not found" >&6; }
16719      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16720$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16721      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
16722  fi
16723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16724$as_echo "ok" >&6; }
16725
16726
16727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
16728$as_echo_n "checking for javac in Boot JDK... " >&6; }
16729  JAVAC=$BOOT_JDK/bin/javac
16730  if test ! -x $JAVAC; then
16731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16732$as_echo "not found" >&6; }
16733      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16734$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16735      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
16736  fi
16737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16738$as_echo "ok" >&6; }
16739
16740
16741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
16742$as_echo_n "checking for javah in Boot JDK... " >&6; }
16743  JAVAH=$BOOT_JDK/bin/javah
16744  if test ! -x $JAVAH; then
16745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16746$as_echo "not found" >&6; }
16747      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16748$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16749      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
16750  fi
16751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16752$as_echo "ok" >&6; }
16753
16754
16755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
16756$as_echo_n "checking for javap in Boot JDK... " >&6; }
16757  JAVAP=$BOOT_JDK/bin/javap
16758  if test ! -x $JAVAP; then
16759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16760$as_echo "not found" >&6; }
16761      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16762$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16763      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
16764  fi
16765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16766$as_echo "ok" >&6; }
16767
16768
16769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
16770$as_echo_n "checking for jar in Boot JDK... " >&6; }
16771  JAR=$BOOT_JDK/bin/jar
16772  if test ! -x $JAR; then
16773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16774$as_echo "not found" >&6; }
16775      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16776$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16777      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
16778  fi
16779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16780$as_echo "ok" >&6; }
16781
16782
16783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
16784$as_echo_n "checking for rmic in Boot JDK... " >&6; }
16785  RMIC=$BOOT_JDK/bin/rmic
16786  if test ! -x $RMIC; then
16787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16788$as_echo "not found" >&6; }
16789      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16790$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16791      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
16792  fi
16793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16794$as_echo "ok" >&6; }
16795
16796
16797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16798$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16799  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16800  if test ! -x $NATIVE2ASCII; then
16801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16802$as_echo "not found" >&6; }
16803      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16804$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16805      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16806  fi
16807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16808$as_echo "ok" >&6; }
16809
16810
16811# Finally, set some other options...
16812
16813# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16814BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16815
16816
16817
16818
16819##############################################################################
16820#
16821# Specify options for anything that is run with the Boot JDK.
16822#
16823
16824# Check whether --with-boot-jdk-jvmargs was given.
16825if test "${with_boot_jdk_jvmargs+set}" = set; then :
16826  withval=$with_boot_jdk_jvmargs;
16827fi
16828
16829
16830if test "x$with_boot_jdk_jvmargs" = x; then
16831    # Not all JVM:s accept the same arguments on the command line.
16832    # OpenJDK specific increase in thread stack for JDK build,
16833    # well more specifically, when running javac.
16834    if test "x$BUILD_NUM_BITS" = x32; then
16835       STACK_SIZE=768
16836    else
16837       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
16838       # since 64-bit pointers are pushed on the stach. Apparently, we need
16839       # to increase the stack space when javacing the JDK....
16840       STACK_SIZE=1536
16841    fi
16842
16843    # Minimum amount of heap memory.
16844
16845    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
16846    # If so, then append -Xms64M to boot_jdk_jvmargs
16847    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
16848    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
16849    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16850        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
16851    fi
16852
16853    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16854        # Why does macosx need more heap? Its the huge JDK batch.
16855
16856    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
16857    # If so, then append -Xmx1600M to boot_jdk_jvmargs
16858    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
16859    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
16860    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16861        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
16862    fi
16863
16864    else
16865
16866    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
16867    # If so, then append -Xmx1100M to boot_jdk_jvmargs
16868    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
16869    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
16870    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16871        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
16872    fi
16873
16874    fi
16875    # When is adding -client something that speeds up the JVM?
16876    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16877
16878    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
16879    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
16880    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
16881    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
16882    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16883        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16884    fi
16885
16886
16887    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
16888    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
16889    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
16890    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
16891    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16892        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16893    fi
16894
16895
16896    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
16897    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
16898    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
16899    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
16900    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16901        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16902    fi
16903
16904    # Disable special log output when a debug build is used as Boot JDK...
16905
16906    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
16907    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
16908    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
16909    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
16910    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16911        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16912    fi
16913
16914fi
16915
16916BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16917
16918
16919
16920###############################################################################
16921#
16922# Configure the sources to use. We can add or override individual directories.
16923#
16924###############################################################################
16925
16926
16927
16928# Where are the sources. Any of these can be overridden
16929# using --with-override-corba and the likes.
16930LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16931CORBA_TOPDIR="$SRC_ROOT/corba"
16932JAXP_TOPDIR="$SRC_ROOT/jaxp"
16933JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16934HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16935NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16936JDK_TOPDIR="$SRC_ROOT/jdk"
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947###############################################################################
16948#
16949# Pickup additional source for a component from outside of the source root
16950# or override source for a component.
16951#
16952
16953# Check whether --with-add-source-root was given.
16954if test "${with_add_source_root+set}" = set; then :
16955  withval=$with_add_source_root;
16956fi
16957
16958
16959
16960# Check whether --with-override-source-root was given.
16961if test "${with_override_source_root+set}" = set; then :
16962  withval=$with_override_source_root;
16963fi
16964
16965
16966
16967# Check whether --with-adds-and-overrides was given.
16968if test "${with_adds_and_overrides+set}" = set; then :
16969  withval=$with_adds_and_overrides;
16970fi
16971
16972
16973if test "x$with_adds_and_overrides" != x; then
16974    with_add_source_root="$with_adds_and_overrides/adds"
16975    with_override_source_root="$with_adds_and_overrides/overrides"
16976fi
16977
16978if test "x$with_add_source_root" != x; then
16979    if ! test -d $with_add_source_root; then
16980       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16981    fi
16982    CURDIR="$PWD"
16983    cd "$with_add_source_root"
16984    ADD_SRC_ROOT="`pwd`"
16985    cd "$CURDIR"
16986    # Verify that the addon source root does not have any root makefiles.
16987    # If it does, then it is usually an error, prevent this.
16988    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16989       test -f $with_add_source_root/langtools/make/Makefile; then
16990        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
16991    fi
16992    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16993       test -f $with_add_source_root/corba/make/Makefile; then
16994        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
16995    fi
16996    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16997       test -f $with_add_source_root/jaxp/make/Makefile; then
16998        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
16999    fi
17000    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
17001       test -f $with_add_source_root/jaxws/make/Makefile; then
17002        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
17003    fi
17004    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
17005       test -f $with_add_source_root/hotspot/make/Makefile; then
17006        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
17007    fi
17008    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
17009       test -f $with_add_source_root/jdk/make/Makefile; then
17010        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
17011    fi
17012fi
17013
17014
17015if test "x$with_override_source_root" != x; then
17016    if ! test -d $with_override_source_root; then
17017       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
17018    fi
17019    CURDIR="$PWD"
17020    cd "$with_override_source_root"
17021    OVERRIDE_SRC_ROOT="`pwd`"
17022    cd "$CURDIR"
17023    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
17024       test -f $with_override_source_root/langtools/make/Makefile; then
17025        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
17026    fi
17027    if test -f $with_override_source_root/corba/makefiles/Makefile || \
17028       test -f $with_override_source_root/corba/make/Makefile; then
17029        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
17030    fi
17031    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
17032       test -f $with_override_source_root/jaxp/make/Makefile; then
17033        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
17034    fi
17035    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
17036       test -f $with_override_source_root/jaxws/make/Makefile; then
17037        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
17038    fi
17039    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
17040       test -f $with_override_source_root/hotspot/make/Makefile; then
17041        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
17042    fi
17043    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
17044       test -f $with_override_source_root/jdk/make/Makefile; then
17045        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
17046    fi
17047fi
17048
17049
17050###############################################################################
17051#
17052# Override a repo completely, this is used for example when you have 3 small
17053# development sandboxes of the langtools sources and want to avoid having 3 full
17054# OpenJDK sources checked out on disk.
17055#
17056# Assuming that the 3 langtools sandboxes are located here:
17057# /home/fredrik/sandbox1/langtools
17058# /home/fredrik/sandbox2/langtools
17059# /home/fredrik/sandbox3/langtools
17060#
17061# From the source root you create build subdirs manually:
17062#     mkdir -p build1 build2 build3
17063# in each build directory run:
17064#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
17065#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
17066#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
17067#
17068
17069
17070# Check whether --with-override-langtools was given.
17071if test "${with_override_langtools+set}" = set; then :
17072  withval=$with_override_langtools;
17073fi
17074
17075
17076
17077# Check whether --with-override-corba was given.
17078if test "${with_override_corba+set}" = set; then :
17079  withval=$with_override_corba;
17080fi
17081
17082
17083
17084# Check whether --with-override-jaxp was given.
17085if test "${with_override_jaxp+set}" = set; then :
17086  withval=$with_override_jaxp;
17087fi
17088
17089
17090
17091# Check whether --with-override-jaxws was given.
17092if test "${with_override_jaxws+set}" = set; then :
17093  withval=$with_override_jaxws;
17094fi
17095
17096
17097
17098# Check whether --with-override-hotspot was given.
17099if test "${with_override_hotspot+set}" = set; then :
17100  withval=$with_override_hotspot;
17101fi
17102
17103
17104
17105# Check whether --with-override-jdk was given.
17106if test "${with_override_jdk+set}" = set; then :
17107  withval=$with_override_jdk;
17108fi
17109
17110
17111if test "x$with_override_langtools" != x; then
17112    CURDIR="$PWD"
17113    cd "$with_override_langtools"
17114    LANGTOOLS_TOPDIR="`pwd`"
17115    cd "$CURDIR"
17116    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
17117        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
17118    fi
17119    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
17120$as_echo_n "checking if langtools should be overridden... " >&6; }
17121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
17122$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
17123fi
17124if test "x$with_override_corba" != x; then
17125    CURDIR="$PWD"
17126    cd "$with_override_corba"
17127    CORBA_TOPDIR="`pwd`"
17128    cd "$CURDIR"
17129    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
17130        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
17131    fi
17132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
17133$as_echo_n "checking if corba should be overridden... " >&6; }
17134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
17135$as_echo "yes with $CORBA_TOPDIR" >&6; }
17136fi
17137if test "x$with_override_jaxp" != x; then
17138    CURDIR="$PWD"
17139    cd "$with_override_jaxp"
17140    JAXP_TOPDIR="`pwd`"
17141    cd "$CURDIR"
17142    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
17143        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
17144    fi
17145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
17146$as_echo_n "checking if jaxp should be overridden... " >&6; }
17147    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
17148$as_echo "yes with $JAXP_TOPDIR" >&6; }
17149fi
17150if test "x$with_override_jaxws" != x; then
17151    CURDIR="$PWD"
17152    cd "$with_override_jaxws"
17153    JAXWS_TOPDIR="`pwd`"
17154    cd "$CURDIR"
17155    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
17156        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
17157    fi
17158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
17159$as_echo_n "checking if jaxws should be overridden... " >&6; }
17160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
17161$as_echo "yes with $JAXWS_TOPDIR" >&6; }
17162fi
17163if test "x$with_override_hotspot" != x; then
17164    CURDIR="$PWD"
17165    cd "$with_override_hotspot"
17166    HOTSPOT_TOPDIR="`pwd`"
17167    cd "$CURDIR"
17168    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
17169       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
17170        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
17171    fi
17172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
17173$as_echo_n "checking if hotspot should be overridden... " >&6; }
17174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
17175$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
17176fi
17177if test "x$with_override_nashorn" != x; then
17178    CURDIR="$PWD"
17179    cd "$with_override_nashorn"
17180    NASHORN_TOPDIR="`pwd`"
17181    cd "$CURDIR"
17182    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
17183        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
17184    fi
17185    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
17186$as_echo_n "checking if nashorn should be overridden... " >&6; }
17187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
17188$as_echo "yes with $NASHORN_TOPDIR" >&6; }
17189fi
17190if test "x$with_override_jdk" != x; then
17191    CURDIR="$PWD"
17192    cd "$with_override_jdk"
17193    JDK_TOPDIR="`pwd`"
17194    cd "$CURDIR"
17195    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
17196        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
17197    fi
17198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
17199$as_echo_n "checking if JDK should be overridden... " >&6; }
17200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
17201$as_echo "yes with $JDK_TOPDIR" >&6; }
17202fi
17203
17204
17205
17206BUILD_OUTPUT="$OUTPUT_ROOT"
17207
17208
17209HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
17210BUILD_HOTSPOT=true
17211
17212
17213
17214# Check whether --with-import-hotspot was given.
17215if test "${with_import_hotspot+set}" = set; then :
17216  withval=$with_import_hotspot;
17217fi
17218
17219if test "x$with_import_hotspot" != x; then
17220    CURDIR="$PWD"
17221    cd "$with_import_hotspot"
17222    HOTSPOT_DIST="`pwd`"
17223    cd "$CURDIR"
17224    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
17225        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
17226    fi
17227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
17228$as_echo_n "checking if hotspot should be imported... " >&6; }
17229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
17230$as_echo "yes from $HOTSPOT_DIST" >&6; }
17231    BUILD_HOTSPOT=false
17232fi
17233
17234JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
17235
17236
17237###############################################################################
17238#
17239# Setup the toolchain (compilers etc), i.e. the tools that need to be
17240# cross-compilation aware.
17241#
17242###############################################################################
17243
17244
17245###############################################################################
17246#
17247# Configure the development tool paths and potential sysroot.
17248#
17249ac_ext=cpp
17250ac_cpp='$CXXCPP $CPPFLAGS'
17251ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17252ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17253ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17254
17255
17256# The option used to specify the target .o,.a or .so file.
17257# When compiling, how to specify the to be created object file.
17258CC_OUT_OPTION='-o$(SPACE)'
17259# When linking, how to specify the to be created executable.
17260EXE_OUT_OPTION='-o$(SPACE)'
17261# When linking, how to specify the to be created dynamically linkable library.
17262LD_OUT_OPTION='-o$(SPACE)'
17263# When archiving, how to specify the to be create static archive for object files.
17264AR_OUT_OPTION='rcs$(SPACE)'
17265
17266
17267
17268
17269
17270# Locate the actual tools
17271
17272if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
17273
17274  # Store path to cygwin link.exe to help excluding it when searching for
17275  # VS linker. This must be done before changing the PATH when looking for VS.
17276  # Extract the first word of "link", so it can be a program name with args.
17277set dummy link; ac_word=$2
17278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17279$as_echo_n "checking for $ac_word... " >&6; }
17280if ${ac_cv_path_CYGWIN_LINK+:} false; then :
17281  $as_echo_n "(cached) " >&6
17282else
17283  case $CYGWIN_LINK in
17284  [\\/]* | ?:[\\/]*)
17285  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
17286  ;;
17287  *)
17288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17289for as_dir in $PATH
17290do
17291  IFS=$as_save_IFS
17292  test -z "$as_dir" && as_dir=.
17293    for ac_exec_ext in '' $ac_executable_extensions; do
17294  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17295    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
17296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17297    break 2
17298  fi
17299done
17300  done
17301IFS=$as_save_IFS
17302
17303  ;;
17304esac
17305fi
17306CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
17307if test -n "$CYGWIN_LINK"; then
17308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
17309$as_echo "$CYGWIN_LINK" >&6; }
17310else
17311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17312$as_echo "no" >&6; }
17313fi
17314
17315
17316  if test "x$CYGWIN_LINK" != x; then
17317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
17318$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
17319    "$CYGWIN_LINK" --version > /dev/null
17320    if test $? -eq 0 ; then
17321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17322$as_echo "yes" >&6; }
17323    else
17324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17325$as_echo "no" >&6; }
17326      # This might be the VS linker. Don't exclude it later on.
17327      CYGWIN_LINK=""
17328    fi
17329  fi
17330
17331  # First-hand choice is to locate and run the vsvars bat file.
17332
17333  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17334    VCVARSFILE="vc/bin/vcvars32.bat"
17335  else
17336    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
17337  fi
17338
17339  VS_ENV_CMD=""
17340  VS_ENV_ARGS=""
17341  if test "x$with_toolsdir" != x; then
17342
17343  if test "x$VS_ENV_CMD" = x; then
17344    VS100BASE="$with_toolsdir/../.."
17345    METHOD="--with-tools-dir"
17346
17347  windows_path="$VS100BASE"
17348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17349    unix_path=`$CYGPATH -u "$windows_path"`
17350    VS100BASE="$unix_path"
17351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17353    VS100BASE="$unix_path"
17354  fi
17355
17356    if test -d "$VS100BASE"; then
17357      if test -f "$VS100BASE/$VCVARSFILE"; then
17358        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17359$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17360        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17361      else
17362        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17363$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17364        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17365$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17366      fi
17367    fi
17368  fi
17369
17370  fi
17371
17372  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
17373    # Having specified an argument which is incorrect will produce an instant failure;
17374    # we should not go on looking
17375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
17376$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
17377    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
17378$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
17379    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
17380  fi
17381
17382  if test "x$ProgramW6432" != x; then
17383
17384  if test "x$VS_ENV_CMD" = x; then
17385    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
17386    METHOD="well-known name"
17387
17388  windows_path="$WIN_SDK_BASE"
17389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17390    unix_path=`$CYGPATH -u "$windows_path"`
17391    WIN_SDK_BASE="$unix_path"
17392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17394    WIN_SDK_BASE="$unix_path"
17395  fi
17396
17397    if test -d "$WIN_SDK_BASE"; then
17398      # There have been cases of partial or broken SDK installations. A missing
17399      # lib dir is not going to work.
17400      if test ! -d "$WIN_SDK_BASE/../lib"; then
17401        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17402$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17403        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17404$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17405      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17406        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17407$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17408        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17409        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17410          VS_ENV_ARGS="/x86"
17411        else
17412          VS_ENV_ARGS="/x64"
17413        fi
17414      else
17415        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17416$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17417        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17418$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17419      fi
17420    fi
17421  fi
17422
17423  fi
17424  if test "x$PROGRAMW6432" != x; then
17425
17426  if test "x$VS_ENV_CMD" = x; then
17427    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17428    METHOD="well-known name"
17429
17430  windows_path="$WIN_SDK_BASE"
17431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17432    unix_path=`$CYGPATH -u "$windows_path"`
17433    WIN_SDK_BASE="$unix_path"
17434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17436    WIN_SDK_BASE="$unix_path"
17437  fi
17438
17439    if test -d "$WIN_SDK_BASE"; then
17440      # There have been cases of partial or broken SDK installations. A missing
17441      # lib dir is not going to work.
17442      if test ! -d "$WIN_SDK_BASE/../lib"; then
17443        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17444$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17445        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17446$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17447      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17448        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17449$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17450        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17451        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17452          VS_ENV_ARGS="/x86"
17453        else
17454          VS_ENV_ARGS="/x64"
17455        fi
17456      else
17457        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17458$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17459        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17460$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17461      fi
17462    fi
17463  fi
17464
17465  fi
17466  if test "x$PROGRAMFILES" != x; then
17467
17468  if test "x$VS_ENV_CMD" = x; then
17469    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17470    METHOD="well-known name"
17471
17472  windows_path="$WIN_SDK_BASE"
17473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17474    unix_path=`$CYGPATH -u "$windows_path"`
17475    WIN_SDK_BASE="$unix_path"
17476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17478    WIN_SDK_BASE="$unix_path"
17479  fi
17480
17481    if test -d "$WIN_SDK_BASE"; then
17482      # There have been cases of partial or broken SDK installations. A missing
17483      # lib dir is not going to work.
17484      if test ! -d "$WIN_SDK_BASE/../lib"; then
17485        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17486$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17487        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17488$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17489      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17490        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17491$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17492        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17493        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17494          VS_ENV_ARGS="/x86"
17495        else
17496          VS_ENV_ARGS="/x64"
17497        fi
17498      else
17499        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17500$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17501        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17502$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17503      fi
17504    fi
17505  fi
17506
17507  fi
17508
17509  if test "x$VS_ENV_CMD" = x; then
17510    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17511    METHOD="well-known name"
17512
17513  windows_path="$WIN_SDK_BASE"
17514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17515    unix_path=`$CYGPATH -u "$windows_path"`
17516    WIN_SDK_BASE="$unix_path"
17517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17519    WIN_SDK_BASE="$unix_path"
17520  fi
17521
17522    if test -d "$WIN_SDK_BASE"; then
17523      # There have been cases of partial or broken SDK installations. A missing
17524      # lib dir is not going to work.
17525      if test ! -d "$WIN_SDK_BASE/../lib"; then
17526        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17527$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17528        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17529$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17530      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17531        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17532$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17533        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17534        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17535          VS_ENV_ARGS="/x86"
17536        else
17537          VS_ENV_ARGS="/x64"
17538        fi
17539      else
17540        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17541$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17542        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17543$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17544      fi
17545    fi
17546  fi
17547
17548
17549  if test "x$VS_ENV_CMD" = x; then
17550    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17551    METHOD="well-known name"
17552
17553  windows_path="$WIN_SDK_BASE"
17554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17555    unix_path=`$CYGPATH -u "$windows_path"`
17556    WIN_SDK_BASE="$unix_path"
17557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17559    WIN_SDK_BASE="$unix_path"
17560  fi
17561
17562    if test -d "$WIN_SDK_BASE"; then
17563      # There have been cases of partial or broken SDK installations. A missing
17564      # lib dir is not going to work.
17565      if test ! -d "$WIN_SDK_BASE/../lib"; then
17566        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17567$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17568        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17569$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17570      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17571        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17572$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17573        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17574        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17575          VS_ENV_ARGS="/x86"
17576        else
17577          VS_ENV_ARGS="/x64"
17578        fi
17579      else
17580        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17581$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17582        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17583$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17584      fi
17585    fi
17586  fi
17587
17588
17589  if test "x$VS100COMNTOOLS" != x; then
17590
17591  if test "x$VS_ENV_CMD" = x; then
17592    VS100BASE="$VS100COMNTOOLS/../.."
17593    METHOD="VS100COMNTOOLS variable"
17594
17595  windows_path="$VS100BASE"
17596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17597    unix_path=`$CYGPATH -u "$windows_path"`
17598    VS100BASE="$unix_path"
17599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17601    VS100BASE="$unix_path"
17602  fi
17603
17604    if test -d "$VS100BASE"; then
17605      if test -f "$VS100BASE/$VCVARSFILE"; then
17606        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17607$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17608        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17609      else
17610        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17611$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17612        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17613$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17614      fi
17615    fi
17616  fi
17617
17618  fi
17619  if test "x$PROGRAMFILES" != x; then
17620
17621  if test "x$VS_ENV_CMD" = x; then
17622    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
17623    METHOD="well-known name"
17624
17625  windows_path="$VS100BASE"
17626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17627    unix_path=`$CYGPATH -u "$windows_path"`
17628    VS100BASE="$unix_path"
17629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17631    VS100BASE="$unix_path"
17632  fi
17633
17634    if test -d "$VS100BASE"; then
17635      if test -f "$VS100BASE/$VCVARSFILE"; then
17636        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17637$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17638        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17639      else
17640        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17641$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17642        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17643$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17644      fi
17645    fi
17646  fi
17647
17648  fi
17649
17650  if test "x$VS_ENV_CMD" = x; then
17651    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
17652    METHOD="well-known name"
17653
17654  windows_path="$VS100BASE"
17655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17656    unix_path=`$CYGPATH -u "$windows_path"`
17657    VS100BASE="$unix_path"
17658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17660    VS100BASE="$unix_path"
17661  fi
17662
17663    if test -d "$VS100BASE"; then
17664      if test -f "$VS100BASE/$VCVARSFILE"; then
17665        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17666$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17667        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17668      else
17669        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17670$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17671        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17672$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17673      fi
17674    fi
17675  fi
17676
17677
17678  if test "x$VS_ENV_CMD" = x; then
17679    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
17680    METHOD="well-known name"
17681
17682  windows_path="$VS100BASE"
17683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17684    unix_path=`$CYGPATH -u "$windows_path"`
17685    VS100BASE="$unix_path"
17686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17688    VS100BASE="$unix_path"
17689  fi
17690
17691    if test -d "$VS100BASE"; then
17692      if test -f "$VS100BASE/$VCVARSFILE"; then
17693        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17694$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17695        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17696      else
17697        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17698$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17699        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17700$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17701      fi
17702    fi
17703  fi
17704
17705
17706  if test "x$VS_ENV_CMD" != x; then
17707    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17708
17709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17710
17711  # First separate the path from the arguments. This will split at the first
17712  # space.
17713  complete="$VS_ENV_CMD"
17714  path="${complete%% *}"
17715  tmp="$complete EOL"
17716  arguments="${tmp#* }"
17717
17718  # Input might be given as Windows format, start by converting to
17719  # unix format.
17720  new_path=`$CYGPATH -u "$path"`
17721
17722  # Now try to locate executable using which
17723  new_path=`$WHICH "$new_path" 2> /dev/null`
17724  # bat and cmd files are not always considered executable in cygwin causing which
17725  # to not find them
17726  if test "x$new_path" = x \
17727           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17728           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17729    new_path=`$CYGPATH -u "$path"`
17730  fi
17731  if test "x$new_path" = x; then
17732    # Oops. Which didn't find the executable.
17733    # The splitting of arguments from the executable at a space might have been incorrect,
17734    # since paths with space are more likely in Windows. Give it another try with the whole
17735    # argument.
17736    path="$complete"
17737    arguments="EOL"
17738    new_path=`$CYGPATH -u "$path"`
17739    new_path=`$WHICH "$new_path" 2> /dev/null`
17740    # bat and cmd files are not always considered executable in cygwin causing which
17741    # to not find them
17742    if test "x$new_path" = x \
17743             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17744             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17745      new_path=`$CYGPATH -u "$path"`
17746    fi
17747    if test "x$new_path" = x; then
17748      # It's still not found. Now this is an unrecoverable error.
17749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17750$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17751      has_space=`$ECHO "$complete" | $GREP " "`
17752      if test "x$has_space" != x; then
17753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17755      fi
17756      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17757    fi
17758  fi
17759
17760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17763  # "foo.exe" is OK but "foo" is an error.
17764  #
17765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17766  # It is also a way to make sure we got the proper file name for the real test later on.
17767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17768  if test "x$test_shortpath" = x; then
17769    # Short path failed, file does not exist as specified.
17770    # Try adding .exe or .cmd
17771    if test -f "${new_path}.exe"; then
17772       input_to_shortpath="${new_path}.exe"
17773    elif test -f "${new_path}.cmd"; then
17774       input_to_shortpath="${new_path}.cmd"
17775    else
17776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17777$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17778      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17779$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17780      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17781    fi
17782  else
17783    input_to_shortpath="$new_path"
17784  fi
17785
17786  # Call helper function which possibly converts this using DOS-style short mode.
17787  # If so, the updated path is stored in $new_path.
17788  new_path="$input_to_shortpath"
17789
17790  input_path="$input_to_shortpath"
17791  # Check if we need to convert this using DOS-style short mode. If the path
17792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17793  # take no chances and rewrite it.
17794  # Note: m4 eats our [], so we need to use [ and ] instead.
17795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17796  if test "x$has_forbidden_chars" != x; then
17797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17801      # Going to short mode and back again did indeed matter. Since short mode is
17802      # case insensitive, let's make it lowercase to improve readability.
17803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17804      # Now convert it back to Unix-stile (cygpath)
17805      input_path=`$CYGPATH -u "$shortmode_path"`
17806      new_path="$input_path"
17807    fi
17808  fi
17809
17810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17811  if test "x$test_cygdrive_prefix" = x; then
17812    # As a simple fix, exclude /usr/bin since it's not a real path.
17813    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17815      # a path prefixed by /cygdrive for fixpath to work.
17816      new_path="$CYGWIN_ROOT_PATH$input_path"
17817    fi
17818  fi
17819
17820  # remove trailing .exe if any
17821  new_path="${new_path/%.exe/}"
17822
17823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17824
17825  # First separate the path from the arguments. This will split at the first
17826  # space.
17827  complete="$VS_ENV_CMD"
17828  path="${complete%% *}"
17829  tmp="$complete EOL"
17830  arguments="${tmp#* }"
17831
17832  # Input might be given as Windows format, start by converting to
17833  # unix format.
17834  new_path="$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
17846  # Now try to locate executable using which
17847  new_path=`$WHICH "$new_path" 2> /dev/null`
17848
17849  if test "x$new_path" = x; then
17850    # Oops. Which didn't find the executable.
17851    # The splitting of arguments from the executable at a space might have been incorrect,
17852    # since paths with space are more likely in Windows. Give it another try with the whole
17853    # argument.
17854    path="$complete"
17855    arguments="EOL"
17856    new_path="$path"
17857
17858  windows_path="$new_path"
17859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17860    unix_path=`$CYGPATH -u "$windows_path"`
17861    new_path="$unix_path"
17862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17864    new_path="$unix_path"
17865  fi
17866
17867
17868    new_path=`$WHICH "$new_path" 2> /dev/null`
17869
17870    if test "x$new_path" = x; then
17871      # It's still not found. Now this is an unrecoverable error.
17872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17873$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17874      has_space=`$ECHO "$complete" | $GREP " "`
17875      if test "x$has_space" != x; then
17876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17878      fi
17879      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17880    fi
17881  fi
17882
17883  # Now new_path has a complete unix path to the binary
17884  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17885    # Keep paths in /bin as-is, but remove trailing .exe if any
17886    new_path="${new_path/%.exe/}"
17887    # Do not save /bin paths to all_fixpath_prefixes!
17888  else
17889    # Not in mixed or Windows style, start by that.
17890    new_path=`cmd //c echo $new_path`
17891
17892  input_path="$new_path"
17893  # Check if we need to convert this using DOS-style short mode. If the path
17894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17895  # take no chances and rewrite it.
17896  # Note: m4 eats our [], so we need to use [ and ] instead.
17897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17898  if test "x$has_forbidden_chars" != x; then
17899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17901  fi
17902
17903    # Output is in $new_path
17904
17905  windows_path="$new_path"
17906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17907    unix_path=`$CYGPATH -u "$windows_path"`
17908    new_path="$unix_path"
17909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17911    new_path="$unix_path"
17912  fi
17913
17914    # remove trailing .exe if any
17915    new_path="${new_path/%.exe/}"
17916
17917    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17918    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17919  fi
17920
17921  else
17922    # We're on a posix platform. Hooray! :)
17923    # First separate the path from the arguments. This will split at the first
17924    # space.
17925    complete="$VS_ENV_CMD"
17926    path="${complete%% *}"
17927    tmp="$complete EOL"
17928    arguments="${tmp#* }"
17929
17930    # Cannot rely on the command "which" here since it doesn't always work.
17931    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17932    if test -z "$is_absolute_path"; then
17933      # Path to executable is not absolute. Find it.
17934      IFS_save="$IFS"
17935      IFS=:
17936      for p in $PATH; do
17937        if test -f "$p/$path" && test -x "$p/$path"; then
17938          new_path="$p/$path"
17939          break
17940        fi
17941      done
17942      IFS="$IFS_save"
17943    else
17944      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17945$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17946      new_path="$path"
17947    fi
17948
17949    if test "x$new_path" = x; then
17950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17951$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17952        has_space=`$ECHO "$complete" | $GREP " "`
17953        if test "x$has_space" != x; then
17954          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17955$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17956        fi
17957        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17958      fi
17959  fi
17960
17961      # Now join together the path and the arguments once again
17962      if test "x$arguments" != xEOL; then
17963        new_complete="$new_path ${arguments% *}"
17964      else
17965        new_complete="$new_path"
17966      fi
17967
17968  if test "x$complete" != "x$new_complete"; then
17969      VS_ENV_CMD="$new_complete"
17970      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17971$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17972    fi
17973
17974
17975    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17976    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17977$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17978    cd $OUTPUT_ROOT
17979    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17980    # to autoconf standards.
17981
17982    #----
17983
17984    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17985    # but calculate the difference in Cygwin environment before/after running it and then
17986    # apply the diff.
17987
17988    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17989      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17990      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17991      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17992    else
17993      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17994      _dosbash=`cmd //c echo \`which bash\``
17995    fi
17996
17997    # generate the set of exported vars before/after the vs10 setup
17998    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17999    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
18000    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
18001    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
18002
18003    # Now execute the newly created bat file.
18004    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
18005    cmd /c localdevenvtmp.bat | cat
18006
18007    # apply the diff (less some non-vs10 vars named by "!")
18008    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
18009    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
18010    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
18011
18012    # cleanup
18013    $RM localdevenvtmp*
18014    #----
18015    cd $CURDIR
18016    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
18017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18018$as_echo "no" >&6; }
18019      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
18020$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
18021      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
18022$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
18023      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
18024$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
18025      as_fn_error $? "Cannot continue" "$LINENO" 5
18026    fi
18027
18028    # Now set all paths and other env variables. This will allow the rest of
18029    # the configure script to find and run the compiler in the proper way.
18030    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
18031$as_echo "$as_me: Setting extracted environment variables" >&6;}
18032    . $OUTPUT_ROOT/localdevenv.sh
18033  else
18034    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
18035    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
18036$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
18037  fi
18038
18039  # At this point, we should have corrent variables in the environment, or we can't continue.
18040  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
18041$as_echo_n "checking for Visual Studio variables... " >&6; }
18042
18043  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
18044    if test "x$INCLUDE" = x || test "x$LIB" = x; then
18045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
18046$as_echo "present but broken" >&6; }
18047      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
18048    else
18049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18050$as_echo "ok" >&6; }
18051      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
18052      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
18053      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
18054      VS_PATH="$PATH"
18055
18056
18057
18058    fi
18059  else
18060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18061$as_echo "not found" >&6; }
18062
18063    if test "x$VS_ENV_CMD" = x; then
18064      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
18065$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
18066      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
18067$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
18068    else
18069      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
18070$as_echo "$as_me: Running the extraction script failed." >&6;}
18071    fi
18072    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
18073$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
18074    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
18075$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
18076    as_fn_error $? "Cannot continue" "$LINENO" 5
18077  fi
18078
18079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
18080$as_echo_n "checking for msvcr100.dll... " >&6; }
18081
18082# Check whether --with-msvcr-dll was given.
18083if test "${with_msvcr_dll+set}" = set; then :
18084  withval=$with_msvcr_dll;
18085fi
18086
18087  if test "x$with_msvcr_dll" != x; then
18088    MSVCR_DLL="$with_msvcr_dll"
18089  else
18090    if test "x$VCINSTALLDIR" != x; then
18091      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
18092        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
18093      else
18094        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
18095        if test "x$MSVCR_DLL" = x; then
18096          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
18097        fi
18098      fi
18099      if test "x$MSVCR_DLL" != x; then
18100        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
18101$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
18102      else
18103        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
18104$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
18105      fi
18106    fi
18107    if test "x$MSVCR_DLL" = x; then
18108      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
18109        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
18110$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
18111        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
18112      fi
18113    fi
18114  fi
18115  if test "x$MSVCR_DLL" = x; then
18116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18117$as_echo "no" >&6; }
18118    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
18119  fi
18120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
18121$as_echo "$MSVCR_DLL" >&6; }
18122
18123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18124
18125  # Input might be given as Windows format, start by converting to
18126  # unix format.
18127  path="$MSVCR_DLL"
18128  new_path=`$CYGPATH -u "$path"`
18129
18130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18133  # "foo.exe" is OK but "foo" is an error.
18134  #
18135  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18136  # It is also a way to make sure we got the proper file name for the real test later on.
18137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18138  if test "x$test_shortpath" = x; then
18139    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18140$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18141    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
18142  fi
18143
18144  # Call helper function which possibly converts this using DOS-style short mode.
18145  # If so, the updated path is stored in $new_path.
18146
18147  input_path="$new_path"
18148  # Check if we need to convert this using DOS-style short mode. If the path
18149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18150  # take no chances and rewrite it.
18151  # Note: m4 eats our [], so we need to use [ and ] instead.
18152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18153  if test "x$has_forbidden_chars" != x; then
18154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18158      # Going to short mode and back again did indeed matter. Since short mode is
18159      # case insensitive, let's make it lowercase to improve readability.
18160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18161      # Now convert it back to Unix-stile (cygpath)
18162      input_path=`$CYGPATH -u "$shortmode_path"`
18163      new_path="$input_path"
18164    fi
18165  fi
18166
18167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18168  if test "x$test_cygdrive_prefix" = x; then
18169    # As a simple fix, exclude /usr/bin since it's not a real path.
18170    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
18171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18172      # a path prefixed by /cygdrive for fixpath to work.
18173      new_path="$CYGWIN_ROOT_PATH$input_path"
18174    fi
18175  fi
18176
18177
18178  if test "x$path" != "x$new_path"; then
18179    MSVCR_DLL="$new_path"
18180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18181$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18182  fi
18183
18184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18185
18186  path="$MSVCR_DLL"
18187  has_colon=`$ECHO $path | $GREP ^.:`
18188  new_path="$path"
18189  if test "x$has_colon" = x; then
18190    # Not in mixed or Windows style, start by that.
18191    new_path=`cmd //c echo $path`
18192  fi
18193
18194
18195  input_path="$new_path"
18196  # Check if we need to convert this using DOS-style short mode. If the path
18197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18198  # take no chances and rewrite it.
18199  # Note: m4 eats our [], so we need to use [ and ] instead.
18200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18201  if test "x$has_forbidden_chars" != x; then
18202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18204  fi
18205
18206
18207  windows_path="$new_path"
18208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18209    unix_path=`$CYGPATH -u "$windows_path"`
18210    new_path="$unix_path"
18211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18213    new_path="$unix_path"
18214  fi
18215
18216  if test "x$path" != "x$new_path"; then
18217    MSVCR_DLL="$new_path"
18218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18219$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18220  fi
18221
18222  # Save the first 10 bytes of this path to the storage, so fixpath can work.
18223  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18224
18225  else
18226    # We're on a posix platform. Hooray! :)
18227    path="$MSVCR_DLL"
18228
18229    if test ! -f "$path" && test ! -d "$path"; then
18230      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
18231    fi
18232
18233    has_space=`$ECHO "$path" | $GREP " "`
18234    if test "x$has_space" != x; then
18235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18236$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18237      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18238    fi
18239  fi
18240
18241
18242
18243
18244# Check whether --with-dxsdk was given.
18245if test "${with_dxsdk+set}" = set; then :
18246  withval=$with_dxsdk;
18247fi
18248
18249
18250# Check whether --with-dxsdk-lib was given.
18251if test "${with_dxsdk_lib+set}" = set; then :
18252  withval=$with_dxsdk_lib;
18253fi
18254
18255
18256# Check whether --with-dxsdk-include was given.
18257if test "${with_dxsdk_include+set}" = set; then :
18258  withval=$with_dxsdk_include;
18259fi
18260
18261
18262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
18263$as_echo_n "checking for DirectX SDK... " >&6; }
18264
18265  if test "x$with_dxsdk" != x; then
18266    dxsdk_path="$with_dxsdk"
18267  elif test "x$DXSDK_DIR" != x; then
18268    dxsdk_path="$DXSDK_DIR"
18269  elif test -d "C:/DXSDK"; then
18270    dxsdk_path="C:/DXSDK"
18271  else
18272    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
18273  fi
18274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
18275$as_echo "$dxsdk_path" >&6; }
18276
18277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18278
18279  # Input might be given as Windows format, start by converting to
18280  # unix format.
18281  path="$dxsdk_path"
18282  new_path=`$CYGPATH -u "$path"`
18283
18284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18287  # "foo.exe" is OK but "foo" is an error.
18288  #
18289  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18290  # It is also a way to make sure we got the proper file name for the real test later on.
18291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18292  if test "x$test_shortpath" = x; then
18293    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
18294$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
18295    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
18296  fi
18297
18298  # Call helper function which possibly converts this using DOS-style short mode.
18299  # If so, the updated path is stored in $new_path.
18300
18301  input_path="$new_path"
18302  # Check if we need to convert this using DOS-style short mode. If the path
18303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18304  # take no chances and rewrite it.
18305  # Note: m4 eats our [], so we need to use [ and ] instead.
18306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18307  if test "x$has_forbidden_chars" != x; then
18308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18312      # Going to short mode and back again did indeed matter. Since short mode is
18313      # case insensitive, let's make it lowercase to improve readability.
18314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18315      # Now convert it back to Unix-stile (cygpath)
18316      input_path=`$CYGPATH -u "$shortmode_path"`
18317      new_path="$input_path"
18318    fi
18319  fi
18320
18321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18322  if test "x$test_cygdrive_prefix" = x; then
18323    # As a simple fix, exclude /usr/bin since it's not a real path.
18324    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
18325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18326      # a path prefixed by /cygdrive for fixpath to work.
18327      new_path="$CYGWIN_ROOT_PATH$input_path"
18328    fi
18329  fi
18330
18331
18332  if test "x$path" != "x$new_path"; then
18333    dxsdk_path="$new_path"
18334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
18335$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
18336  fi
18337
18338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18339
18340  path="$dxsdk_path"
18341  has_colon=`$ECHO $path | $GREP ^.:`
18342  new_path="$path"
18343  if test "x$has_colon" = x; then
18344    # Not in mixed or Windows style, start by that.
18345    new_path=`cmd //c echo $path`
18346  fi
18347
18348
18349  input_path="$new_path"
18350  # Check if we need to convert this using DOS-style short mode. If the path
18351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18352  # take no chances and rewrite it.
18353  # Note: m4 eats our [], so we need to use [ and ] instead.
18354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18355  if test "x$has_forbidden_chars" != x; then
18356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18357    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18358  fi
18359
18360
18361  windows_path="$new_path"
18362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18363    unix_path=`$CYGPATH -u "$windows_path"`
18364    new_path="$unix_path"
18365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18367    new_path="$unix_path"
18368  fi
18369
18370  if test "x$path" != "x$new_path"; then
18371    dxsdk_path="$new_path"
18372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
18373$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
18374  fi
18375
18376  # Save the first 10 bytes of this path to the storage, so fixpath can work.
18377  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18378
18379  else
18380    # We're on a posix platform. Hooray! :)
18381    path="$dxsdk_path"
18382
18383    if test ! -f "$path" && test ! -d "$path"; then
18384      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
18385    fi
18386
18387    has_space=`$ECHO "$path" | $GREP " "`
18388    if test "x$has_space" != x; then
18389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
18390$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
18391      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18392    fi
18393  fi
18394
18395
18396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
18397$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
18398  if test "x$with_dxsdk_lib" != x; then
18399    DXSDK_LIB_PATH="$with_dxsdk_lib"
18400  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18401    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
18402  else
18403    DXSDK_LIB_PATH="$dxsdk_path/Lib"
18404  fi
18405  # dsound.lib is linked to in jsoundds
18406  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
18407    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
18408  fi
18409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
18410$as_echo "$DXSDK_LIB_PATH" >&6; }
18411
18412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18413
18414  # Input might be given as Windows format, start by converting to
18415  # unix format.
18416  path="$DXSDK_LIB_PATH"
18417  new_path=`$CYGPATH -u "$path"`
18418
18419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18422  # "foo.exe" is OK but "foo" is an error.
18423  #
18424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18425  # It is also a way to make sure we got the proper file name for the real test later on.
18426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18427  if test "x$test_shortpath" = x; then
18428    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
18429$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
18430    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
18431  fi
18432
18433  # Call helper function which possibly converts this using DOS-style short mode.
18434  # If so, the updated path is stored in $new_path.
18435
18436  input_path="$new_path"
18437  # Check if we need to convert this using DOS-style short mode. If the path
18438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18439  # take no chances and rewrite it.
18440  # Note: m4 eats our [], so we need to use [ and ] instead.
18441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18442  if test "x$has_forbidden_chars" != x; then
18443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18444    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18445    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18446    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18447      # Going to short mode and back again did indeed matter. Since short mode is
18448      # case insensitive, let's make it lowercase to improve readability.
18449      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18450      # Now convert it back to Unix-stile (cygpath)
18451      input_path=`$CYGPATH -u "$shortmode_path"`
18452      new_path="$input_path"
18453    fi
18454  fi
18455
18456  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18457  if test "x$test_cygdrive_prefix" = x; then
18458    # As a simple fix, exclude /usr/bin since it's not a real path.
18459    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
18460      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18461      # a path prefixed by /cygdrive for fixpath to work.
18462      new_path="$CYGWIN_ROOT_PATH$input_path"
18463    fi
18464  fi
18465
18466
18467  if test "x$path" != "x$new_path"; then
18468    DXSDK_LIB_PATH="$new_path"
18469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
18470$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
18471  fi
18472
18473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18474
18475  path="$DXSDK_LIB_PATH"
18476  has_colon=`$ECHO $path | $GREP ^.:`
18477  new_path="$path"
18478  if test "x$has_colon" = x; then
18479    # Not in mixed or Windows style, start by that.
18480    new_path=`cmd //c echo $path`
18481  fi
18482
18483
18484  input_path="$new_path"
18485  # Check if we need to convert this using DOS-style short mode. If the path
18486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18487  # take no chances and rewrite it.
18488  # Note: m4 eats our [], so we need to use [ and ] instead.
18489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18490  if test "x$has_forbidden_chars" != x; then
18491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18493  fi
18494
18495
18496  windows_path="$new_path"
18497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18498    unix_path=`$CYGPATH -u "$windows_path"`
18499    new_path="$unix_path"
18500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18502    new_path="$unix_path"
18503  fi
18504
18505  if test "x$path" != "x$new_path"; then
18506    DXSDK_LIB_PATH="$new_path"
18507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
18508$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
18509  fi
18510
18511  # Save the first 10 bytes of this path to the storage, so fixpath can work.
18512  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18513
18514  else
18515    # We're on a posix platform. Hooray! :)
18516    path="$DXSDK_LIB_PATH"
18517
18518    if test ! -f "$path" && test ! -d "$path"; then
18519      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
18520    fi
18521
18522    has_space=`$ECHO "$path" | $GREP " "`
18523    if test "x$has_space" != x; then
18524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
18525$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
18526      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18527    fi
18528  fi
18529
18530
18531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
18532$as_echo_n "checking for DirectX SDK include dir... " >&6; }
18533  if test "x$with_dxsdk_include" != x; then
18534    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
18535  else
18536    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
18537  fi
18538  # dsound.h is included in jsoundds
18539  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
18540    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
18541  fi
18542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
18543$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
18544
18545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18546
18547  # Input might be given as Windows format, start by converting to
18548  # unix format.
18549  path="$DXSDK_INCLUDE_PATH"
18550  new_path=`$CYGPATH -u "$path"`
18551
18552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18555  # "foo.exe" is OK but "foo" is an error.
18556  #
18557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18558  # It is also a way to make sure we got the proper file name for the real test later on.
18559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18560  if test "x$test_shortpath" = x; then
18561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
18562$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
18563    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
18564  fi
18565
18566  # Call helper function which possibly converts this using DOS-style short mode.
18567  # If so, the updated path is stored in $new_path.
18568
18569  input_path="$new_path"
18570  # Check if we need to convert this using DOS-style short mode. If the path
18571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18572  # take no chances and rewrite it.
18573  # Note: m4 eats our [], so we need to use [ and ] instead.
18574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18575  if test "x$has_forbidden_chars" != x; then
18576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18580      # Going to short mode and back again did indeed matter. Since short mode is
18581      # case insensitive, let's make it lowercase to improve readability.
18582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18583      # Now convert it back to Unix-stile (cygpath)
18584      input_path=`$CYGPATH -u "$shortmode_path"`
18585      new_path="$input_path"
18586    fi
18587  fi
18588
18589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18590  if test "x$test_cygdrive_prefix" = x; then
18591    # As a simple fix, exclude /usr/bin since it's not a real path.
18592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
18593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18594      # a path prefixed by /cygdrive for fixpath to work.
18595      new_path="$CYGWIN_ROOT_PATH$input_path"
18596    fi
18597  fi
18598
18599
18600  if test "x$path" != "x$new_path"; then
18601    DXSDK_INCLUDE_PATH="$new_path"
18602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
18603$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
18604  fi
18605
18606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18607
18608  path="$DXSDK_INCLUDE_PATH"
18609  has_colon=`$ECHO $path | $GREP ^.:`
18610  new_path="$path"
18611  if test "x$has_colon" = x; then
18612    # Not in mixed or Windows style, start by that.
18613    new_path=`cmd //c echo $path`
18614  fi
18615
18616
18617  input_path="$new_path"
18618  # Check if we need to convert this using DOS-style short mode. If the path
18619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18620  # take no chances and rewrite it.
18621  # Note: m4 eats our [], so we need to use [ and ] instead.
18622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18623  if test "x$has_forbidden_chars" != x; then
18624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18626  fi
18627
18628
18629  windows_path="$new_path"
18630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18631    unix_path=`$CYGPATH -u "$windows_path"`
18632    new_path="$unix_path"
18633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18635    new_path="$unix_path"
18636  fi
18637
18638  if test "x$path" != "x$new_path"; then
18639    DXSDK_INCLUDE_PATH="$new_path"
18640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
18641$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
18642  fi
18643
18644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
18645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18646
18647  else
18648    # We're on a posix platform. Hooray! :)
18649    path="$DXSDK_INCLUDE_PATH"
18650
18651    if test ! -f "$path" && test ! -d "$path"; then
18652      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
18653    fi
18654
18655    has_space=`$ECHO "$path" | $GREP " "`
18656    if test "x$has_space" != x; then
18657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
18658$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
18659      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18660    fi
18661  fi
18662
18663
18664
18665
18666  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
18667
18668fi
18669
18670
18671
18672# If --build AND --host is set, then the configure script will find any
18673# cross compilation tools in the PATH. Cross compilation tools
18674# follows the cross compilation standard where they are prefixed with ${host}.
18675# For example the binary i686-sun-solaris2.10-gcc
18676# will cross compile for i686-sun-solaris2.10
18677# If neither of build and host is not set, then build=host and the
18678# default compiler found in the path will be used.
18679# Setting only --host, does not seem to be really supported.
18680# Please set both --build and --host if you want to cross compile.
18681
18682if test "x$COMPILE_TYPE" = "xcross"; then
18683    # Now we to find a C/C++ compiler that can build executables for the build
18684    # platform. We can't use the AC_PROG_CC macro, since it can only be used
18685    # once. Also, we need to do this before adding a tools dir to the path,
18686    # otherwise we might pick up cross-compilers which don't use standard naming.
18687    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18688    # to wait until they are properly discovered.
18689    for ac_prog in cl cc gcc
18690do
18691  # Extract the first word of "$ac_prog", so it can be a program name with args.
18692set dummy $ac_prog; ac_word=$2
18693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18694$as_echo_n "checking for $ac_word... " >&6; }
18695if ${ac_cv_path_BUILD_CC+:} false; then :
18696  $as_echo_n "(cached) " >&6
18697else
18698  case $BUILD_CC in
18699  [\\/]* | ?:[\\/]*)
18700  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18701  ;;
18702  *)
18703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18704for as_dir in $PATH
18705do
18706  IFS=$as_save_IFS
18707  test -z "$as_dir" && as_dir=.
18708    for ac_exec_ext in '' $ac_executable_extensions; do
18709  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18710    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18712    break 2
18713  fi
18714done
18715  done
18716IFS=$as_save_IFS
18717
18718  ;;
18719esac
18720fi
18721BUILD_CC=$ac_cv_path_BUILD_CC
18722if test -n "$BUILD_CC"; then
18723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18724$as_echo "$BUILD_CC" >&6; }
18725else
18726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18727$as_echo "no" >&6; }
18728fi
18729
18730
18731  test -n "$BUILD_CC" && break
18732done
18733
18734
18735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18736
18737  # First separate the path from the arguments. This will split at the first
18738  # space.
18739  complete="$BUILD_CC"
18740  path="${complete%% *}"
18741  tmp="$complete EOL"
18742  arguments="${tmp#* }"
18743
18744  # Input might be given as Windows format, start by converting to
18745  # unix format.
18746  new_path=`$CYGPATH -u "$path"`
18747
18748  # Now try to locate executable using which
18749  new_path=`$WHICH "$new_path" 2> /dev/null`
18750  # bat and cmd files are not always considered executable in cygwin causing which
18751  # to not find them
18752  if test "x$new_path" = x \
18753           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18754           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18755    new_path=`$CYGPATH -u "$path"`
18756  fi
18757  if test "x$new_path" = x; then
18758    # Oops. Which didn't find the executable.
18759    # The splitting of arguments from the executable at a space might have been incorrect,
18760    # since paths with space are more likely in Windows. Give it another try with the whole
18761    # argument.
18762    path="$complete"
18763    arguments="EOL"
18764    new_path=`$CYGPATH -u "$path"`
18765    new_path=`$WHICH "$new_path" 2> /dev/null`
18766    # bat and cmd files are not always considered executable in cygwin causing which
18767    # to not find them
18768    if test "x$new_path" = x \
18769             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18770             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18771      new_path=`$CYGPATH -u "$path"`
18772    fi
18773    if test "x$new_path" = x; then
18774      # It's still not found. Now this is an unrecoverable error.
18775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18776$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18777      has_space=`$ECHO "$complete" | $GREP " "`
18778      if test "x$has_space" != x; then
18779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18781      fi
18782      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18783    fi
18784  fi
18785
18786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18789  # "foo.exe" is OK but "foo" is an error.
18790  #
18791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18792  # It is also a way to make sure we got the proper file name for the real test later on.
18793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18794  if test "x$test_shortpath" = x; then
18795    # Short path failed, file does not exist as specified.
18796    # Try adding .exe or .cmd
18797    if test -f "${new_path}.exe"; then
18798       input_to_shortpath="${new_path}.exe"
18799    elif test -f "${new_path}.cmd"; then
18800       input_to_shortpath="${new_path}.cmd"
18801    else
18802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18803$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18804      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18805$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18806      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18807    fi
18808  else
18809    input_to_shortpath="$new_path"
18810  fi
18811
18812  # Call helper function which possibly converts this using DOS-style short mode.
18813  # If so, the updated path is stored in $new_path.
18814  new_path="$input_to_shortpath"
18815
18816  input_path="$input_to_shortpath"
18817  # Check if we need to convert this using DOS-style short mode. If the path
18818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18819  # take no chances and rewrite it.
18820  # Note: m4 eats our [], so we need to use [ and ] instead.
18821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18822  if test "x$has_forbidden_chars" != x; then
18823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18827      # Going to short mode and back again did indeed matter. Since short mode is
18828      # case insensitive, let's make it lowercase to improve readability.
18829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18830      # Now convert it back to Unix-stile (cygpath)
18831      input_path=`$CYGPATH -u "$shortmode_path"`
18832      new_path="$input_path"
18833    fi
18834  fi
18835
18836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18837  if test "x$test_cygdrive_prefix" = x; then
18838    # As a simple fix, exclude /usr/bin since it's not a real path.
18839    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18841      # a path prefixed by /cygdrive for fixpath to work.
18842      new_path="$CYGWIN_ROOT_PATH$input_path"
18843    fi
18844  fi
18845
18846  # remove trailing .exe if any
18847  new_path="${new_path/%.exe/}"
18848
18849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18850
18851  # First separate the path from the arguments. This will split at the first
18852  # space.
18853  complete="$BUILD_CC"
18854  path="${complete%% *}"
18855  tmp="$complete EOL"
18856  arguments="${tmp#* }"
18857
18858  # Input might be given as Windows format, start by converting to
18859  # unix format.
18860  new_path="$path"
18861
18862  windows_path="$new_path"
18863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18864    unix_path=`$CYGPATH -u "$windows_path"`
18865    new_path="$unix_path"
18866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18868    new_path="$unix_path"
18869  fi
18870
18871
18872  # Now try to locate executable using which
18873  new_path=`$WHICH "$new_path" 2> /dev/null`
18874
18875  if test "x$new_path" = x; then
18876    # Oops. Which didn't find the executable.
18877    # The splitting of arguments from the executable at a space might have been incorrect,
18878    # since paths with space are more likely in Windows. Give it another try with the whole
18879    # argument.
18880    path="$complete"
18881    arguments="EOL"
18882    new_path="$path"
18883
18884  windows_path="$new_path"
18885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18886    unix_path=`$CYGPATH -u "$windows_path"`
18887    new_path="$unix_path"
18888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18890    new_path="$unix_path"
18891  fi
18892
18893
18894    new_path=`$WHICH "$new_path" 2> /dev/null`
18895
18896    if test "x$new_path" = x; then
18897      # It's still not found. Now this is an unrecoverable error.
18898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18899$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18900      has_space=`$ECHO "$complete" | $GREP " "`
18901      if test "x$has_space" != x; then
18902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18904      fi
18905      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18906    fi
18907  fi
18908
18909  # Now new_path has a complete unix path to the binary
18910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18911    # Keep paths in /bin as-is, but remove trailing .exe if any
18912    new_path="${new_path/%.exe/}"
18913    # Do not save /bin paths to all_fixpath_prefixes!
18914  else
18915    # Not in mixed or Windows style, start by that.
18916    new_path=`cmd //c echo $new_path`
18917
18918  input_path="$new_path"
18919  # Check if we need to convert this using DOS-style short mode. If the path
18920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18921  # take no chances and rewrite it.
18922  # Note: m4 eats our [], so we need to use [ and ] instead.
18923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18924  if test "x$has_forbidden_chars" != x; then
18925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18927  fi
18928
18929    # Output is in $new_path
18930
18931  windows_path="$new_path"
18932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18933    unix_path=`$CYGPATH -u "$windows_path"`
18934    new_path="$unix_path"
18935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18937    new_path="$unix_path"
18938  fi
18939
18940    # remove trailing .exe if any
18941    new_path="${new_path/%.exe/}"
18942
18943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18945  fi
18946
18947  else
18948    # We're on a posix platform. Hooray! :)
18949    # First separate the path from the arguments. This will split at the first
18950    # space.
18951    complete="$BUILD_CC"
18952    path="${complete%% *}"
18953    tmp="$complete EOL"
18954    arguments="${tmp#* }"
18955
18956    # Cannot rely on the command "which" here since it doesn't always work.
18957    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18958    if test -z "$is_absolute_path"; then
18959      # Path to executable is not absolute. Find it.
18960      IFS_save="$IFS"
18961      IFS=:
18962      for p in $PATH; do
18963        if test -f "$p/$path" && test -x "$p/$path"; then
18964          new_path="$p/$path"
18965          break
18966        fi
18967      done
18968      IFS="$IFS_save"
18969    else
18970      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18971$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18972      new_path="$path"
18973    fi
18974
18975    if test "x$new_path" = x; then
18976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18977$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18978        has_space=`$ECHO "$complete" | $GREP " "`
18979        if test "x$has_space" != x; then
18980          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18981$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18982        fi
18983        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18984      fi
18985  fi
18986
18987      # Now join together the path and the arguments once again
18988      if test "x$arguments" != xEOL; then
18989        new_complete="$new_path ${arguments% *}"
18990      else
18991        new_complete="$new_path"
18992      fi
18993
18994  if test "x$complete" != "x$new_complete"; then
18995      BUILD_CC="$new_complete"
18996      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18997$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18998    fi
18999
19000    for ac_prog in cl CC g++
19001do
19002  # Extract the first word of "$ac_prog", so it can be a program name with args.
19003set dummy $ac_prog; ac_word=$2
19004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19005$as_echo_n "checking for $ac_word... " >&6; }
19006if ${ac_cv_path_BUILD_CXX+:} false; then :
19007  $as_echo_n "(cached) " >&6
19008else
19009  case $BUILD_CXX in
19010  [\\/]* | ?:[\\/]*)
19011  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
19012  ;;
19013  *)
19014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19015for as_dir in $PATH
19016do
19017  IFS=$as_save_IFS
19018  test -z "$as_dir" && as_dir=.
19019    for ac_exec_ext in '' $ac_executable_extensions; do
19020  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19021    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
19022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19023    break 2
19024  fi
19025done
19026  done
19027IFS=$as_save_IFS
19028
19029  ;;
19030esac
19031fi
19032BUILD_CXX=$ac_cv_path_BUILD_CXX
19033if test -n "$BUILD_CXX"; then
19034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
19035$as_echo "$BUILD_CXX" >&6; }
19036else
19037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19038$as_echo "no" >&6; }
19039fi
19040
19041
19042  test -n "$BUILD_CXX" && break
19043done
19044
19045
19046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19047
19048  # First separate the path from the arguments. This will split at the first
19049  # space.
19050  complete="$BUILD_CXX"
19051  path="${complete%% *}"
19052  tmp="$complete EOL"
19053  arguments="${tmp#* }"
19054
19055  # Input might be given as Windows format, start by converting to
19056  # unix format.
19057  new_path=`$CYGPATH -u "$path"`
19058
19059  # Now try to locate executable using which
19060  new_path=`$WHICH "$new_path" 2> /dev/null`
19061  # bat and cmd files are not always considered executable in cygwin causing which
19062  # to not find them
19063  if test "x$new_path" = x \
19064           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19065           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19066    new_path=`$CYGPATH -u "$path"`
19067  fi
19068  if test "x$new_path" = x; then
19069    # Oops. Which didn't find the executable.
19070    # The splitting of arguments from the executable at a space might have been incorrect,
19071    # since paths with space are more likely in Windows. Give it another try with the whole
19072    # argument.
19073    path="$complete"
19074    arguments="EOL"
19075    new_path=`$CYGPATH -u "$path"`
19076    new_path=`$WHICH "$new_path" 2> /dev/null`
19077    # bat and cmd files are not always considered executable in cygwin causing which
19078    # to not find them
19079    if test "x$new_path" = x \
19080             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19081             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19082      new_path=`$CYGPATH -u "$path"`
19083    fi
19084    if test "x$new_path" = x; then
19085      # It's still not found. Now this is an unrecoverable error.
19086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
19087$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
19088      has_space=`$ECHO "$complete" | $GREP " "`
19089      if test "x$has_space" != x; then
19090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19092      fi
19093      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
19094    fi
19095  fi
19096
19097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19100  # "foo.exe" is OK but "foo" is an error.
19101  #
19102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19103  # It is also a way to make sure we got the proper file name for the real test later on.
19104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19105  if test "x$test_shortpath" = x; then
19106    # Short path failed, file does not exist as specified.
19107    # Try adding .exe or .cmd
19108    if test -f "${new_path}.exe"; then
19109       input_to_shortpath="${new_path}.exe"
19110    elif test -f "${new_path}.cmd"; then
19111       input_to_shortpath="${new_path}.cmd"
19112    else
19113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
19114$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19115      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19116$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19117      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
19118    fi
19119  else
19120    input_to_shortpath="$new_path"
19121  fi
19122
19123  # Call helper function which possibly converts this using DOS-style short mode.
19124  # If so, the updated path is stored in $new_path.
19125  new_path="$input_to_shortpath"
19126
19127  input_path="$input_to_shortpath"
19128  # Check if we need to convert this using DOS-style short mode. If the path
19129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19130  # take no chances and rewrite it.
19131  # Note: m4 eats our [], so we need to use [ and ] instead.
19132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19133  if test "x$has_forbidden_chars" != x; then
19134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19138      # Going to short mode and back again did indeed matter. Since short mode is
19139      # case insensitive, let's make it lowercase to improve readability.
19140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19141      # Now convert it back to Unix-stile (cygpath)
19142      input_path=`$CYGPATH -u "$shortmode_path"`
19143      new_path="$input_path"
19144    fi
19145  fi
19146
19147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19148  if test "x$test_cygdrive_prefix" = x; then
19149    # As a simple fix, exclude /usr/bin since it's not a real path.
19150    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19152      # a path prefixed by /cygdrive for fixpath to work.
19153      new_path="$CYGWIN_ROOT_PATH$input_path"
19154    fi
19155  fi
19156
19157  # remove trailing .exe if any
19158  new_path="${new_path/%.exe/}"
19159
19160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19161
19162  # First separate the path from the arguments. This will split at the first
19163  # space.
19164  complete="$BUILD_CXX"
19165  path="${complete%% *}"
19166  tmp="$complete EOL"
19167  arguments="${tmp#* }"
19168
19169  # Input might be given as Windows format, start by converting to
19170  # unix format.
19171  new_path="$path"
19172
19173  windows_path="$new_path"
19174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19175    unix_path=`$CYGPATH -u "$windows_path"`
19176    new_path="$unix_path"
19177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19179    new_path="$unix_path"
19180  fi
19181
19182
19183  # Now try to locate executable using which
19184  new_path=`$WHICH "$new_path" 2> /dev/null`
19185
19186  if test "x$new_path" = x; then
19187    # Oops. Which didn't find the executable.
19188    # The splitting of arguments from the executable at a space might have been incorrect,
19189    # since paths with space are more likely in Windows. Give it another try with the whole
19190    # argument.
19191    path="$complete"
19192    arguments="EOL"
19193    new_path="$path"
19194
19195  windows_path="$new_path"
19196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19197    unix_path=`$CYGPATH -u "$windows_path"`
19198    new_path="$unix_path"
19199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19201    new_path="$unix_path"
19202  fi
19203
19204
19205    new_path=`$WHICH "$new_path" 2> /dev/null`
19206
19207    if test "x$new_path" = x; then
19208      # It's still not found. Now this is an unrecoverable error.
19209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
19210$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
19211      has_space=`$ECHO "$complete" | $GREP " "`
19212      if test "x$has_space" != x; then
19213        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19214$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19215      fi
19216      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
19217    fi
19218  fi
19219
19220  # Now new_path has a complete unix path to the binary
19221  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19222    # Keep paths in /bin as-is, but remove trailing .exe if any
19223    new_path="${new_path/%.exe/}"
19224    # Do not save /bin paths to all_fixpath_prefixes!
19225  else
19226    # Not in mixed or Windows style, start by that.
19227    new_path=`cmd //c echo $new_path`
19228
19229  input_path="$new_path"
19230  # Check if we need to convert this using DOS-style short mode. If the path
19231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19232  # take no chances and rewrite it.
19233  # Note: m4 eats our [], so we need to use [ and ] instead.
19234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19235  if test "x$has_forbidden_chars" != x; then
19236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19238  fi
19239
19240    # Output is in $new_path
19241
19242  windows_path="$new_path"
19243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19244    unix_path=`$CYGPATH -u "$windows_path"`
19245    new_path="$unix_path"
19246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19248    new_path="$unix_path"
19249  fi
19250
19251    # remove trailing .exe if any
19252    new_path="${new_path/%.exe/}"
19253
19254    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19255    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19256  fi
19257
19258  else
19259    # We're on a posix platform. Hooray! :)
19260    # First separate the path from the arguments. This will split at the first
19261    # space.
19262    complete="$BUILD_CXX"
19263    path="${complete%% *}"
19264    tmp="$complete EOL"
19265    arguments="${tmp#* }"
19266
19267    # Cannot rely on the command "which" here since it doesn't always work.
19268    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19269    if test -z "$is_absolute_path"; then
19270      # Path to executable is not absolute. Find it.
19271      IFS_save="$IFS"
19272      IFS=:
19273      for p in $PATH; do
19274        if test -f "$p/$path" && test -x "$p/$path"; then
19275          new_path="$p/$path"
19276          break
19277        fi
19278      done
19279      IFS="$IFS_save"
19280    else
19281      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
19282$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
19283      new_path="$path"
19284    fi
19285
19286    if test "x$new_path" = x; then
19287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
19288$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
19289        has_space=`$ECHO "$complete" | $GREP " "`
19290        if test "x$has_space" != x; then
19291          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19292$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19293        fi
19294        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
19295      fi
19296  fi
19297
19298      # Now join together the path and the arguments once again
19299      if test "x$arguments" != xEOL; then
19300        new_complete="$new_path ${arguments% *}"
19301      else
19302        new_complete="$new_path"
19303      fi
19304
19305  if test "x$complete" != "x$new_complete"; then
19306      BUILD_CXX="$new_complete"
19307      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
19308$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
19309    fi
19310
19311    # Extract the first word of "ld", so it can be a program name with args.
19312set dummy ld; ac_word=$2
19313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19314$as_echo_n "checking for $ac_word... " >&6; }
19315if ${ac_cv_path_BUILD_LD+:} false; then :
19316  $as_echo_n "(cached) " >&6
19317else
19318  case $BUILD_LD in
19319  [\\/]* | ?:[\\/]*)
19320  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
19321  ;;
19322  *)
19323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19324for as_dir in $PATH
19325do
19326  IFS=$as_save_IFS
19327  test -z "$as_dir" && as_dir=.
19328    for ac_exec_ext in '' $ac_executable_extensions; do
19329  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19330    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
19331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19332    break 2
19333  fi
19334done
19335  done
19336IFS=$as_save_IFS
19337
19338  ;;
19339esac
19340fi
19341BUILD_LD=$ac_cv_path_BUILD_LD
19342if test -n "$BUILD_LD"; then
19343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
19344$as_echo "$BUILD_LD" >&6; }
19345else
19346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19347$as_echo "no" >&6; }
19348fi
19349
19350
19351
19352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19353
19354  # First separate the path from the arguments. This will split at the first
19355  # space.
19356  complete="$BUILD_LD"
19357  path="${complete%% *}"
19358  tmp="$complete EOL"
19359  arguments="${tmp#* }"
19360
19361  # Input might be given as Windows format, start by converting to
19362  # unix format.
19363  new_path=`$CYGPATH -u "$path"`
19364
19365  # Now try to locate executable using which
19366  new_path=`$WHICH "$new_path" 2> /dev/null`
19367  # bat and cmd files are not always considered executable in cygwin causing which
19368  # to not find them
19369  if test "x$new_path" = x \
19370           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19371           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19372    new_path=`$CYGPATH -u "$path"`
19373  fi
19374  if test "x$new_path" = x; then
19375    # Oops. Which didn't find the executable.
19376    # The splitting of arguments from the executable at a space might have been incorrect,
19377    # since paths with space are more likely in Windows. Give it another try with the whole
19378    # argument.
19379    path="$complete"
19380    arguments="EOL"
19381    new_path=`$CYGPATH -u "$path"`
19382    new_path=`$WHICH "$new_path" 2> /dev/null`
19383    # bat and cmd files are not always considered executable in cygwin causing which
19384    # to not find them
19385    if test "x$new_path" = x \
19386             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19387             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19388      new_path=`$CYGPATH -u "$path"`
19389    fi
19390    if test "x$new_path" = x; then
19391      # It's still not found. Now this is an unrecoverable error.
19392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19393$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19394      has_space=`$ECHO "$complete" | $GREP " "`
19395      if test "x$has_space" != x; then
19396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19398      fi
19399      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19400    fi
19401  fi
19402
19403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19406  # "foo.exe" is OK but "foo" is an error.
19407  #
19408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19409  # It is also a way to make sure we got the proper file name for the real test later on.
19410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19411  if test "x$test_shortpath" = x; then
19412    # Short path failed, file does not exist as specified.
19413    # Try adding .exe or .cmd
19414    if test -f "${new_path}.exe"; then
19415       input_to_shortpath="${new_path}.exe"
19416    elif test -f "${new_path}.cmd"; then
19417       input_to_shortpath="${new_path}.cmd"
19418    else
19419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
19420$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
19421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19423      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19424    fi
19425  else
19426    input_to_shortpath="$new_path"
19427  fi
19428
19429  # Call helper function which possibly converts this using DOS-style short mode.
19430  # If so, the updated path is stored in $new_path.
19431  new_path="$input_to_shortpath"
19432
19433  input_path="$input_to_shortpath"
19434  # Check if we need to convert this using DOS-style short mode. If the path
19435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19436  # take no chances and rewrite it.
19437  # Note: m4 eats our [], so we need to use [ and ] instead.
19438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19439  if test "x$has_forbidden_chars" != x; then
19440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19444      # Going to short mode and back again did indeed matter. Since short mode is
19445      # case insensitive, let's make it lowercase to improve readability.
19446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19447      # Now convert it back to Unix-stile (cygpath)
19448      input_path=`$CYGPATH -u "$shortmode_path"`
19449      new_path="$input_path"
19450    fi
19451  fi
19452
19453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19454  if test "x$test_cygdrive_prefix" = x; then
19455    # As a simple fix, exclude /usr/bin since it's not a real path.
19456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19458      # a path prefixed by /cygdrive for fixpath to work.
19459      new_path="$CYGWIN_ROOT_PATH$input_path"
19460    fi
19461  fi
19462
19463  # remove trailing .exe if any
19464  new_path="${new_path/%.exe/}"
19465
19466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19467
19468  # First separate the path from the arguments. This will split at the first
19469  # space.
19470  complete="$BUILD_LD"
19471  path="${complete%% *}"
19472  tmp="$complete EOL"
19473  arguments="${tmp#* }"
19474
19475  # Input might be given as Windows format, start by converting to
19476  # unix format.
19477  new_path="$path"
19478
19479  windows_path="$new_path"
19480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19481    unix_path=`$CYGPATH -u "$windows_path"`
19482    new_path="$unix_path"
19483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19485    new_path="$unix_path"
19486  fi
19487
19488
19489  # Now try to locate executable using which
19490  new_path=`$WHICH "$new_path" 2> /dev/null`
19491
19492  if test "x$new_path" = x; then
19493    # Oops. Which didn't find the executable.
19494    # The splitting of arguments from the executable at a space might have been incorrect,
19495    # since paths with space are more likely in Windows. Give it another try with the whole
19496    # argument.
19497    path="$complete"
19498    arguments="EOL"
19499    new_path="$path"
19500
19501  windows_path="$new_path"
19502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19503    unix_path=`$CYGPATH -u "$windows_path"`
19504    new_path="$unix_path"
19505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19507    new_path="$unix_path"
19508  fi
19509
19510
19511    new_path=`$WHICH "$new_path" 2> /dev/null`
19512
19513    if test "x$new_path" = x; then
19514      # It's still not found. Now this is an unrecoverable error.
19515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19516$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19517      has_space=`$ECHO "$complete" | $GREP " "`
19518      if test "x$has_space" != x; then
19519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19521      fi
19522      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19523    fi
19524  fi
19525
19526  # Now new_path has a complete unix path to the binary
19527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19528    # Keep paths in /bin as-is, but remove trailing .exe if any
19529    new_path="${new_path/%.exe/}"
19530    # Do not save /bin paths to all_fixpath_prefixes!
19531  else
19532    # Not in mixed or Windows style, start by that.
19533    new_path=`cmd //c echo $new_path`
19534
19535  input_path="$new_path"
19536  # Check if we need to convert this using DOS-style short mode. If the path
19537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19538  # take no chances and rewrite it.
19539  # Note: m4 eats our [], so we need to use [ and ] instead.
19540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19541  if test "x$has_forbidden_chars" != x; then
19542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19544  fi
19545
19546    # Output is in $new_path
19547
19548  windows_path="$new_path"
19549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19550    unix_path=`$CYGPATH -u "$windows_path"`
19551    new_path="$unix_path"
19552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19554    new_path="$unix_path"
19555  fi
19556
19557    # remove trailing .exe if any
19558    new_path="${new_path/%.exe/}"
19559
19560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19562  fi
19563
19564  else
19565    # We're on a posix platform. Hooray! :)
19566    # First separate the path from the arguments. This will split at the first
19567    # space.
19568    complete="$BUILD_LD"
19569    path="${complete%% *}"
19570    tmp="$complete EOL"
19571    arguments="${tmp#* }"
19572
19573    # Cannot rely on the command "which" here since it doesn't always work.
19574    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19575    if test -z "$is_absolute_path"; then
19576      # Path to executable is not absolute. Find it.
19577      IFS_save="$IFS"
19578      IFS=:
19579      for p in $PATH; do
19580        if test -f "$p/$path" && test -x "$p/$path"; then
19581          new_path="$p/$path"
19582          break
19583        fi
19584      done
19585      IFS="$IFS_save"
19586    else
19587      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
19588$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
19589      new_path="$path"
19590    fi
19591
19592    if test "x$new_path" = x; then
19593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19594$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19595        has_space=`$ECHO "$complete" | $GREP " "`
19596        if test "x$has_space" != x; then
19597          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19599        fi
19600        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19601      fi
19602  fi
19603
19604      # Now join together the path and the arguments once again
19605      if test "x$arguments" != xEOL; then
19606        new_complete="$new_path ${arguments% *}"
19607      else
19608        new_complete="$new_path"
19609      fi
19610
19611  if test "x$complete" != "x$new_complete"; then
19612      BUILD_LD="$new_complete"
19613      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
19614$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
19615    fi
19616
19617fi
19618
19619
19620
19621
19622# If a devkit is found on the builddeps server, then prepend its path to the
19623# PATH variable. If there are cross compilers available in the devkit, these
19624# will be found by AC_PROG_CC et al.
19625DEVKIT=
19626
19627
19628    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19629        # Source the builddeps file again, to make sure it uses the latest variables!
19630        . $builddepsfile
19631        # Look for a target and build machine specific resource!
19632        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19633        if test "x$resource" = x; then
19634            # Ok, lets instead look for a target specific resource
19635            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19636        fi
19637        if test "x$resource" = x; then
19638            # Ok, lets instead look for a build specific resource
19639            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19640        fi
19641        if test "x$resource" = x; then
19642            # Ok, lets instead look for a generic resource
19643            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19644            resource=${builddep_devkit}
19645        fi
19646        if test "x$resource" != x; then
19647            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19648$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19649	    # If the resource in the builddeps.conf file is an existing directory,
19650	    # for example /java/linux/cups
19651	    if test -d ${resource}; then
19652	       depdir=${resource}
19653	    else
19654
19655# devkit is for example mymodule
19656# $resource is for example libs/general/libmymod_1_2_3.zip
19657# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19658# $with_builddeps_dir is for example /localhome/builddeps
19659# depdir is the name of the variable into which we store the depdir, eg MYMOD
19660# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19661# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19662    filename=`basename $resource`
19663    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19664    filebase=${filename%%.*}
19665    extension=${filename#*.}
19666    installdir=$with_builddeps_dir/$filebase
19667    if test ! -f $installdir/$filename.unpacked; then
19668        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19669$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19670        if test ! -d $installdir; then
19671            mkdir -p $installdir
19672        fi
19673        if test ! -d $installdir; then
19674            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19675        fi
19676        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19677        touch $tmpfile
19678        if test ! -f $tmpfile; then
19679            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19680        fi
19681
19682    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19683    # $tmpfile is the local file name for the downloaded file.
19684    VALID_TOOL=no
19685    if test "x$BDEPS_FTP" = xwget; then
19686       VALID_TOOL=yes
19687       wget -O $tmpfile $with_builddeps_server/$resource
19688    fi
19689    if test "x$BDEPS_FTP" = xlftp; then
19690       VALID_TOOL=yes
19691       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19692    fi
19693    if test "x$BDEPS_FTP" = xftp; then
19694        VALID_TOOL=yes
19695        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19696        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19697        FTPUSERPWD=${FTPSERVER%%@*}
19698        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19699            FTPUSER=${userpwd%%:*}
19700            FTPPWD=${userpwd#*@}
19701            FTPSERVER=${FTPSERVER#*@}
19702        else
19703            FTPUSER=ftp
19704            FTPPWD=ftp
19705        fi
19706        # the "pass" command does not work on some
19707        # ftp clients (read ftp.exe) but if it works,
19708        # passive mode is better!
19709        (\
19710            echo "user $FTPUSER $FTPPWD"        ;\
19711            echo "pass"                         ;\
19712            echo "bin"                          ;\
19713            echo "get $FTPPATH $tmpfile"              ;\
19714        ) | ftp -in $FTPSERVER
19715    fi
19716    if test "x$VALID_TOOL" != xyes; then
19717       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19718    fi
19719
19720        mv $tmpfile $installdir/$filename
19721        if test ! -s $installdir/$filename; then
19722            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19723        fi
19724        case "$extension" in
19725            zip)  echo "Unzipping $installdir/$filename..."
19726               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19727            ;;
19728            tar.gz) echo "Untaring $installdir/$filename..."
19729               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19730            ;;
19731            tgz) echo "Untaring $installdir/$filename..."
19732               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19733            ;;
19734            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19735            ;;
19736        esac
19737    fi
19738    if test -f $installdir/$filename.unpacked; then
19739        depdir=$installdir
19740    fi
19741
19742	    fi
19743            # Source the builddeps file again, because in the previous command, the depdir
19744            # was updated to point at the current build dependency install directory.
19745            . $builddepsfile
19746            # Now extract variables from the builddeps.conf files.
19747            theroot=${builddep_devkit_ROOT}
19748            thecflags=${builddep_devkit_CFLAGS}
19749            thelibs=${builddep_devkit_LIBS}
19750            if test "x$depdir" = x; then
19751                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19752            fi
19753            DEVKIT=$depdir
19754            if test "x$theroot" != x; then
19755               DEVKIT="$theroot"
19756            fi
19757            if test "x$thecflags" != x; then
19758               DEVKIT_CFLAGS="$thecflags"
19759            fi
19760            if test "x$thelibs" != x; then
19761               DEVKIT_LIBS="$thelibs"
19762            fi
19763            # Found devkit
19764                     PATH="$DEVKIT/bin:$PATH"
19765                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19766                     if test "x$x_includes" = "xNONE"; then
19767                         x_includes="$SYS_ROOT/usr/include/X11"
19768                     fi
19769                     if test "x$x_libraries" = "xNONE"; then
19770                         x_libraries="$SYS_ROOT/usr/lib"
19771                     fi
19772
19773
19774        fi
19775
19776    fi
19777
19778
19779if test "x$SYS_ROOT" != "x/" ; then
19780    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
19781    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
19782    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
19783    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
19784    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
19785    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
19786fi
19787
19788# Store the CFLAGS etal passed to the configure script.
19789ORG_CFLAGS="$CFLAGS"
19790ORG_CXXFLAGS="$CXXFLAGS"
19791ORG_OBJCFLAGS="$OBJCFLAGS"
19792
19793# autoconf magic only relies on PATH, so update it if tools dir is specified
19794OLD_PATH="$PATH"
19795if test "x$TOOLS_DIR" != x; then
19796  PATH=$TOOLS_DIR:$PATH
19797fi
19798
19799
19800### Locate C compiler (CC)
19801
19802# On windows, only cl.exe is supported.
19803# On Solaris, cc is preferred to gcc.
19804# Elsewhere, gcc is preferred to cc.
19805
19806if test "x$CC" != x; then
19807  COMPILER_CHECK_LIST="$CC"
19808elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19809  COMPILER_CHECK_LIST="cl"
19810elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19811  COMPILER_CHECK_LIST="cc gcc"
19812else
19813  COMPILER_CHECK_LIST="gcc cc"
19814fi
19815
19816
19817  COMPILER_NAME=C
19818
19819  CC=
19820  # If TOOLS_DIR is set, check for all compiler names in there first
19821  # before checking the rest of the PATH.
19822  if test -n "$TOOLS_DIR"; then
19823    PATH_save="$PATH"
19824    PATH="$TOOLS_DIR"
19825    for ac_prog in $COMPILER_CHECK_LIST
19826do
19827  # Extract the first word of "$ac_prog", so it can be a program name with args.
19828set dummy $ac_prog; ac_word=$2
19829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19830$as_echo_n "checking for $ac_word... " >&6; }
19831if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19832  $as_echo_n "(cached) " >&6
19833else
19834  case $TOOLS_DIR_CC in
19835  [\\/]* | ?:[\\/]*)
19836  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19837  ;;
19838  *)
19839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19840for as_dir in $PATH
19841do
19842  IFS=$as_save_IFS
19843  test -z "$as_dir" && as_dir=.
19844    for ac_exec_ext in '' $ac_executable_extensions; do
19845  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19846    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19848    break 2
19849  fi
19850done
19851  done
19852IFS=$as_save_IFS
19853
19854  ;;
19855esac
19856fi
19857TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19858if test -n "$TOOLS_DIR_CC"; then
19859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19860$as_echo "$TOOLS_DIR_CC" >&6; }
19861else
19862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19863$as_echo "no" >&6; }
19864fi
19865
19866
19867  test -n "$TOOLS_DIR_CC" && break
19868done
19869
19870    CC=$TOOLS_DIR_CC
19871    PATH="$PATH_save"
19872  fi
19873
19874  # AC_PATH_PROGS can't be run multiple times with the same variable,
19875  # so create a new name for this run.
19876  if test "x$CC" = x; then
19877    for ac_prog in $COMPILER_CHECK_LIST
19878do
19879  # Extract the first word of "$ac_prog", so it can be a program name with args.
19880set dummy $ac_prog; ac_word=$2
19881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19882$as_echo_n "checking for $ac_word... " >&6; }
19883if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19884  $as_echo_n "(cached) " >&6
19885else
19886  case $POTENTIAL_CC in
19887  [\\/]* | ?:[\\/]*)
19888  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19889  ;;
19890  *)
19891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19892for as_dir in $PATH
19893do
19894  IFS=$as_save_IFS
19895  test -z "$as_dir" && as_dir=.
19896    for ac_exec_ext in '' $ac_executable_extensions; do
19897  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19898    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19900    break 2
19901  fi
19902done
19903  done
19904IFS=$as_save_IFS
19905
19906  ;;
19907esac
19908fi
19909POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19910if test -n "$POTENTIAL_CC"; then
19911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19912$as_echo "$POTENTIAL_CC" >&6; }
19913else
19914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19915$as_echo "no" >&6; }
19916fi
19917
19918
19919  test -n "$POTENTIAL_CC" && break
19920done
19921
19922    CC=$POTENTIAL_CC
19923  fi
19924
19925  if test "x$CC" = x; then
19926
19927    # Print a helpful message on how to acquire the necessary build dependency.
19928    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19929    MISSING_DEPENDENCY=devkit
19930    PKGHANDLER_COMMAND=
19931
19932    case $PKGHANDLER in
19933	apt-get)
19934                apt_help     $MISSING_DEPENDENCY ;;
19935    yum)
19936                yum_help     $MISSING_DEPENDENCY ;;
19937	port)
19938                port_help    $MISSING_DEPENDENCY ;;
19939	pkgutil)
19940                pkgutil_help $MISSING_DEPENDENCY ;;
19941	pkgadd)
19942                pkgadd_help  $MISSING_DEPENDENCY ;;
19943    * )
19944      break ;;
19945    esac
19946
19947    if test "x$PKGHANDLER_COMMAND" != x; then
19948        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19949    fi
19950
19951      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19952  fi
19953
19954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19955
19956  # First separate the path from the arguments. This will split at the first
19957  # space.
19958  complete="$CC"
19959  path="${complete%% *}"
19960  tmp="$complete EOL"
19961  arguments="${tmp#* }"
19962
19963  # Input might be given as Windows format, start by converting to
19964  # unix format.
19965  new_path=`$CYGPATH -u "$path"`
19966
19967  # Now try to locate executable using which
19968  new_path=`$WHICH "$new_path" 2> /dev/null`
19969  # bat and cmd files are not always considered executable in cygwin causing which
19970  # to not find them
19971  if test "x$new_path" = x \
19972           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19973           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19974    new_path=`$CYGPATH -u "$path"`
19975  fi
19976  if test "x$new_path" = x; then
19977    # Oops. Which didn't find the executable.
19978    # The splitting of arguments from the executable at a space might have been incorrect,
19979    # since paths with space are more likely in Windows. Give it another try with the whole
19980    # argument.
19981    path="$complete"
19982    arguments="EOL"
19983    new_path=`$CYGPATH -u "$path"`
19984    new_path=`$WHICH "$new_path" 2> /dev/null`
19985    # bat and cmd files are not always considered executable in cygwin causing which
19986    # to not find them
19987    if test "x$new_path" = x \
19988             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19989             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19990      new_path=`$CYGPATH -u "$path"`
19991    fi
19992    if test "x$new_path" = x; then
19993      # It's still not found. Now this is an unrecoverable error.
19994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19995$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19996      has_space=`$ECHO "$complete" | $GREP " "`
19997      if test "x$has_space" != x; then
19998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20000      fi
20001      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
20002    fi
20003  fi
20004
20005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20008  # "foo.exe" is OK but "foo" is an error.
20009  #
20010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20011  # It is also a way to make sure we got the proper file name for the real test later on.
20012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20013  if test "x$test_shortpath" = x; then
20014    # Short path failed, file does not exist as specified.
20015    # Try adding .exe or .cmd
20016    if test -f "${new_path}.exe"; then
20017       input_to_shortpath="${new_path}.exe"
20018    elif test -f "${new_path}.cmd"; then
20019       input_to_shortpath="${new_path}.cmd"
20020    else
20021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
20022$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
20023      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20024$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20025      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
20026    fi
20027  else
20028    input_to_shortpath="$new_path"
20029  fi
20030
20031  # Call helper function which possibly converts this using DOS-style short mode.
20032  # If so, the updated path is stored in $new_path.
20033  new_path="$input_to_shortpath"
20034
20035  input_path="$input_to_shortpath"
20036  # Check if we need to convert this using DOS-style short mode. If the path
20037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20038  # take no chances and rewrite it.
20039  # Note: m4 eats our [], so we need to use [ and ] instead.
20040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20041  if test "x$has_forbidden_chars" != x; then
20042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20046      # Going to short mode and back again did indeed matter. Since short mode is
20047      # case insensitive, let's make it lowercase to improve readability.
20048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20049      # Now convert it back to Unix-stile (cygpath)
20050      input_path=`$CYGPATH -u "$shortmode_path"`
20051      new_path="$input_path"
20052    fi
20053  fi
20054
20055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20056  if test "x$test_cygdrive_prefix" = x; then
20057    # As a simple fix, exclude /usr/bin since it's not a real path.
20058    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20060      # a path prefixed by /cygdrive for fixpath to work.
20061      new_path="$CYGWIN_ROOT_PATH$input_path"
20062    fi
20063  fi
20064
20065  # remove trailing .exe if any
20066  new_path="${new_path/%.exe/}"
20067
20068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20069
20070  # First separate the path from the arguments. This will split at the first
20071  # space.
20072  complete="$CC"
20073  path="${complete%% *}"
20074  tmp="$complete EOL"
20075  arguments="${tmp#* }"
20076
20077  # Input might be given as Windows format, start by converting to
20078  # unix format.
20079  new_path="$path"
20080
20081  windows_path="$new_path"
20082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20083    unix_path=`$CYGPATH -u "$windows_path"`
20084    new_path="$unix_path"
20085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20087    new_path="$unix_path"
20088  fi
20089
20090
20091  # Now try to locate executable using which
20092  new_path=`$WHICH "$new_path" 2> /dev/null`
20093
20094  if test "x$new_path" = x; then
20095    # Oops. Which didn't find the executable.
20096    # The splitting of arguments from the executable at a space might have been incorrect,
20097    # since paths with space are more likely in Windows. Give it another try with the whole
20098    # argument.
20099    path="$complete"
20100    arguments="EOL"
20101    new_path="$path"
20102
20103  windows_path="$new_path"
20104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20105    unix_path=`$CYGPATH -u "$windows_path"`
20106    new_path="$unix_path"
20107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20109    new_path="$unix_path"
20110  fi
20111
20112
20113    new_path=`$WHICH "$new_path" 2> /dev/null`
20114
20115    if test "x$new_path" = x; then
20116      # It's still not found. Now this is an unrecoverable error.
20117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
20118$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
20119      has_space=`$ECHO "$complete" | $GREP " "`
20120      if test "x$has_space" != x; then
20121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20123      fi
20124      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
20125    fi
20126  fi
20127
20128  # Now new_path has a complete unix path to the binary
20129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20130    # Keep paths in /bin as-is, but remove trailing .exe if any
20131    new_path="${new_path/%.exe/}"
20132    # Do not save /bin paths to all_fixpath_prefixes!
20133  else
20134    # Not in mixed or Windows style, start by that.
20135    new_path=`cmd //c echo $new_path`
20136
20137  input_path="$new_path"
20138  # Check if we need to convert this using DOS-style short mode. If the path
20139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20140  # take no chances and rewrite it.
20141  # Note: m4 eats our [], so we need to use [ and ] instead.
20142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20143  if test "x$has_forbidden_chars" != x; then
20144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20146  fi
20147
20148    # Output is in $new_path
20149
20150  windows_path="$new_path"
20151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20152    unix_path=`$CYGPATH -u "$windows_path"`
20153    new_path="$unix_path"
20154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20156    new_path="$unix_path"
20157  fi
20158
20159    # remove trailing .exe if any
20160    new_path="${new_path/%.exe/}"
20161
20162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20164  fi
20165
20166  else
20167    # We're on a posix platform. Hooray! :)
20168    # First separate the path from the arguments. This will split at the first
20169    # space.
20170    complete="$CC"
20171    path="${complete%% *}"
20172    tmp="$complete EOL"
20173    arguments="${tmp#* }"
20174
20175    # Cannot rely on the command "which" here since it doesn't always work.
20176    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20177    if test -z "$is_absolute_path"; then
20178      # Path to executable is not absolute. Find it.
20179      IFS_save="$IFS"
20180      IFS=:
20181      for p in $PATH; do
20182        if test -f "$p/$path" && test -x "$p/$path"; then
20183          new_path="$p/$path"
20184          break
20185        fi
20186      done
20187      IFS="$IFS_save"
20188    else
20189      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
20190$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
20191      new_path="$path"
20192    fi
20193
20194    if test "x$new_path" = x; then
20195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
20196$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
20197        has_space=`$ECHO "$complete" | $GREP " "`
20198        if test "x$has_space" != x; then
20199          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20200$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20201        fi
20202        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
20203      fi
20204  fi
20205
20206      # Now join together the path and the arguments once again
20207      if test "x$arguments" != xEOL; then
20208        new_complete="$new_path ${arguments% *}"
20209      else
20210        new_complete="$new_path"
20211      fi
20212
20213  if test "x$complete" != "x$new_complete"; then
20214      CC="$new_complete"
20215      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
20216$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
20217    fi
20218
20219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
20220$as_echo_n "checking resolved symbolic links for CC... " >&6; }
20221  TEST_COMPILER="$CC"
20222
20223    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20224        # Follow a chain of symbolic links. Use readlink
20225        # where it exists, else fall back to horribly
20226        # complicated shell code.
20227        if test "x$READLINK_TESTED" != yes; then
20228            # On MacOSX there is a readlink tool with a different
20229            # purpose than the GNU readlink tool. Check the found readlink.
20230            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20231            if test "x$ISGNU" = x; then
20232                 # A readlink that we do not know how to use.
20233                 # Are there other non-GNU readlinks out there?
20234                 READLINK_TESTED=yes
20235                 READLINK=
20236            fi
20237        fi
20238
20239        if test "x$READLINK" != x; then
20240            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20241        else
20242            # Save the current directory for restoring afterwards
20243            STARTDIR=$PWD
20244            COUNTER=0
20245            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20246            sym_link_file=`$BASENAME $TEST_COMPILER`
20247            # Use the system pwd and not the shell builtin to resolve directory symlinks
20248            cd $sym_link_dir
20249            cd `$THEPWDCMD`
20250            sym_link_dir=`$THEPWDCMD`
20251            # Resolve file symlinks
20252            while test $COUNTER -lt 20; do
20253                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20254                if test "x$ISLINK" == x; then
20255                    # This is not a symbolic link! We are done!
20256                    break
20257                fi
20258                # Again resolve directory symlinks since the target of the just found
20259                # link could be in a different directory
20260                cd `$DIRNAME $ISLINK`
20261                sym_link_dir=`$THEPWDCMD`
20262                sym_link_file=`$BASENAME $ISLINK`
20263                let COUNTER=COUNTER+1
20264            done
20265            cd $STARTDIR
20266            TEST_COMPILER=$sym_link_dir/$sym_link_file
20267        fi
20268    fi
20269
20270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20271$as_echo "$TEST_COMPILER" >&6; }
20272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
20273$as_echo_n "checking if CC is disguised ccache... " >&6; }
20274
20275  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20276  if test "x$COMPILER_BASENAME" = "xccache"; then
20277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20278$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20279    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20280    # We want to control ccache invocation ourselves, so ignore this cc and try
20281    # searching again.
20282
20283    # Remove the path to the fake ccache cc from the PATH
20284    RETRY_COMPILER_SAVED_PATH="$PATH"
20285    COMPILER_DIRNAME=`$DIRNAME $CC`
20286    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20287
20288    # Try again looking for our compiler
20289    if test -n "$ac_tool_prefix"; then
20290  for ac_prog in $COMPILER_CHECK_LIST
20291  do
20292    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20293set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20295$as_echo_n "checking for $ac_word... " >&6; }
20296if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
20297  $as_echo_n "(cached) " >&6
20298else
20299  if test -n "$PROPER_COMPILER_CC"; then
20300  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
20301else
20302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20303for as_dir in $PATH
20304do
20305  IFS=$as_save_IFS
20306  test -z "$as_dir" && as_dir=.
20307    for ac_exec_ext in '' $ac_executable_extensions; do
20308  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20309    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
20310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20311    break 2
20312  fi
20313done
20314  done
20315IFS=$as_save_IFS
20316
20317fi
20318fi
20319PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
20320if test -n "$PROPER_COMPILER_CC"; then
20321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20322$as_echo "$PROPER_COMPILER_CC" >&6; }
20323else
20324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20325$as_echo "no" >&6; }
20326fi
20327
20328
20329    test -n "$PROPER_COMPILER_CC" && break
20330  done
20331fi
20332if test -z "$PROPER_COMPILER_CC"; then
20333  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
20334  for ac_prog in $COMPILER_CHECK_LIST
20335do
20336  # Extract the first word of "$ac_prog", so it can be a program name with args.
20337set dummy $ac_prog; ac_word=$2
20338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20339$as_echo_n "checking for $ac_word... " >&6; }
20340if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
20341  $as_echo_n "(cached) " >&6
20342else
20343  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
20344  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
20345else
20346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20347for as_dir in $PATH
20348do
20349  IFS=$as_save_IFS
20350  test -z "$as_dir" && as_dir=.
20351    for ac_exec_ext in '' $ac_executable_extensions; do
20352  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20353    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
20354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20355    break 2
20356  fi
20357done
20358  done
20359IFS=$as_save_IFS
20360
20361fi
20362fi
20363ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
20364if test -n "$ac_ct_PROPER_COMPILER_CC"; then
20365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
20366$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
20367else
20368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20369$as_echo "no" >&6; }
20370fi
20371
20372
20373  test -n "$ac_ct_PROPER_COMPILER_CC" && break
20374done
20375
20376  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
20377    PROPER_COMPILER_CC=""
20378  else
20379    case $cross_compiling:$ac_tool_warned in
20380yes:)
20381{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20382$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20383ac_tool_warned=yes ;;
20384esac
20385    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
20386  fi
20387fi
20388
20389
20390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20391
20392  # First separate the path from the arguments. This will split at the first
20393  # space.
20394  complete="$PROPER_COMPILER_CC"
20395  path="${complete%% *}"
20396  tmp="$complete EOL"
20397  arguments="${tmp#* }"
20398
20399  # Input might be given as Windows format, start by converting to
20400  # unix format.
20401  new_path=`$CYGPATH -u "$path"`
20402
20403  # Now try to locate executable using which
20404  new_path=`$WHICH "$new_path" 2> /dev/null`
20405  # bat and cmd files are not always considered executable in cygwin causing which
20406  # to not find them
20407  if test "x$new_path" = x \
20408           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20409           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20410    new_path=`$CYGPATH -u "$path"`
20411  fi
20412  if test "x$new_path" = x; then
20413    # Oops. Which didn't find the executable.
20414    # The splitting of arguments from the executable at a space might have been incorrect,
20415    # since paths with space are more likely in Windows. Give it another try with the whole
20416    # argument.
20417    path="$complete"
20418    arguments="EOL"
20419    new_path=`$CYGPATH -u "$path"`
20420    new_path=`$WHICH "$new_path" 2> /dev/null`
20421    # bat and cmd files are not always considered executable in cygwin causing which
20422    # to not find them
20423    if test "x$new_path" = x \
20424             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20425             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20426      new_path=`$CYGPATH -u "$path"`
20427    fi
20428    if test "x$new_path" = x; then
20429      # It's still not found. Now this is an unrecoverable error.
20430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20431$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20432      has_space=`$ECHO "$complete" | $GREP " "`
20433      if test "x$has_space" != x; then
20434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20436      fi
20437      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20438    fi
20439  fi
20440
20441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20444  # "foo.exe" is OK but "foo" is an error.
20445  #
20446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20447  # It is also a way to make sure we got the proper file name for the real test later on.
20448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20449  if test "x$test_shortpath" = x; then
20450    # Short path failed, file does not exist as specified.
20451    # Try adding .exe or .cmd
20452    if test -f "${new_path}.exe"; then
20453       input_to_shortpath="${new_path}.exe"
20454    elif test -f "${new_path}.cmd"; then
20455       input_to_shortpath="${new_path}.cmd"
20456    else
20457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
20458$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
20459      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20460$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20461      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20462    fi
20463  else
20464    input_to_shortpath="$new_path"
20465  fi
20466
20467  # Call helper function which possibly converts this using DOS-style short mode.
20468  # If so, the updated path is stored in $new_path.
20469  new_path="$input_to_shortpath"
20470
20471  input_path="$input_to_shortpath"
20472  # Check if we need to convert this using DOS-style short mode. If the path
20473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20474  # take no chances and rewrite it.
20475  # Note: m4 eats our [], so we need to use [ and ] instead.
20476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20477  if test "x$has_forbidden_chars" != x; then
20478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20482      # Going to short mode and back again did indeed matter. Since short mode is
20483      # case insensitive, let's make it lowercase to improve readability.
20484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20485      # Now convert it back to Unix-stile (cygpath)
20486      input_path=`$CYGPATH -u "$shortmode_path"`
20487      new_path="$input_path"
20488    fi
20489  fi
20490
20491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20492  if test "x$test_cygdrive_prefix" = x; then
20493    # As a simple fix, exclude /usr/bin since it's not a real path.
20494    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20496      # a path prefixed by /cygdrive for fixpath to work.
20497      new_path="$CYGWIN_ROOT_PATH$input_path"
20498    fi
20499  fi
20500
20501  # remove trailing .exe if any
20502  new_path="${new_path/%.exe/}"
20503
20504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20505
20506  # First separate the path from the arguments. This will split at the first
20507  # space.
20508  complete="$PROPER_COMPILER_CC"
20509  path="${complete%% *}"
20510  tmp="$complete EOL"
20511  arguments="${tmp#* }"
20512
20513  # Input might be given as Windows format, start by converting to
20514  # unix format.
20515  new_path="$path"
20516
20517  windows_path="$new_path"
20518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20519    unix_path=`$CYGPATH -u "$windows_path"`
20520    new_path="$unix_path"
20521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20523    new_path="$unix_path"
20524  fi
20525
20526
20527  # Now try to locate executable using which
20528  new_path=`$WHICH "$new_path" 2> /dev/null`
20529
20530  if test "x$new_path" = x; then
20531    # Oops. Which didn't find the executable.
20532    # The splitting of arguments from the executable at a space might have been incorrect,
20533    # since paths with space are more likely in Windows. Give it another try with the whole
20534    # argument.
20535    path="$complete"
20536    arguments="EOL"
20537    new_path="$path"
20538
20539  windows_path="$new_path"
20540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20541    unix_path=`$CYGPATH -u "$windows_path"`
20542    new_path="$unix_path"
20543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20545    new_path="$unix_path"
20546  fi
20547
20548
20549    new_path=`$WHICH "$new_path" 2> /dev/null`
20550
20551    if test "x$new_path" = x; then
20552      # It's still not found. Now this is an unrecoverable error.
20553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20554$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20555      has_space=`$ECHO "$complete" | $GREP " "`
20556      if test "x$has_space" != x; then
20557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20559      fi
20560      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20561    fi
20562  fi
20563
20564  # Now new_path has a complete unix path to the binary
20565  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20566    # Keep paths in /bin as-is, but remove trailing .exe if any
20567    new_path="${new_path/%.exe/}"
20568    # Do not save /bin paths to all_fixpath_prefixes!
20569  else
20570    # Not in mixed or Windows style, start by that.
20571    new_path=`cmd //c echo $new_path`
20572
20573  input_path="$new_path"
20574  # Check if we need to convert this using DOS-style short mode. If the path
20575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20576  # take no chances and rewrite it.
20577  # Note: m4 eats our [], so we need to use [ and ] instead.
20578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20579  if test "x$has_forbidden_chars" != x; then
20580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20582  fi
20583
20584    # Output is in $new_path
20585
20586  windows_path="$new_path"
20587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20588    unix_path=`$CYGPATH -u "$windows_path"`
20589    new_path="$unix_path"
20590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20592    new_path="$unix_path"
20593  fi
20594
20595    # remove trailing .exe if any
20596    new_path="${new_path/%.exe/}"
20597
20598    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20599    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20600  fi
20601
20602  else
20603    # We're on a posix platform. Hooray! :)
20604    # First separate the path from the arguments. This will split at the first
20605    # space.
20606    complete="$PROPER_COMPILER_CC"
20607    path="${complete%% *}"
20608    tmp="$complete EOL"
20609    arguments="${tmp#* }"
20610
20611    # Cannot rely on the command "which" here since it doesn't always work.
20612    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20613    if test -z "$is_absolute_path"; then
20614      # Path to executable is not absolute. Find it.
20615      IFS_save="$IFS"
20616      IFS=:
20617      for p in $PATH; do
20618        if test -f "$p/$path" && test -x "$p/$path"; then
20619          new_path="$p/$path"
20620          break
20621        fi
20622      done
20623      IFS="$IFS_save"
20624    else
20625      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20626$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20627      new_path="$path"
20628    fi
20629
20630    if test "x$new_path" = x; then
20631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20632$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20633        has_space=`$ECHO "$complete" | $GREP " "`
20634        if test "x$has_space" != x; then
20635          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20636$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20637        fi
20638        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20639      fi
20640  fi
20641
20642      # Now join together the path and the arguments once again
20643      if test "x$arguments" != xEOL; then
20644        new_complete="$new_path ${arguments% *}"
20645      else
20646        new_complete="$new_path"
20647      fi
20648
20649  if test "x$complete" != "x$new_complete"; then
20650      PROPER_COMPILER_CC="$new_complete"
20651      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20652$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20653    fi
20654
20655    PATH="$RETRY_COMPILER_SAVED_PATH"
20656
20657    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20658$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20659
20660    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20661        # Follow a chain of symbolic links. Use readlink
20662        # where it exists, else fall back to horribly
20663        # complicated shell code.
20664        if test "x$READLINK_TESTED" != yes; then
20665            # On MacOSX there is a readlink tool with a different
20666            # purpose than the GNU readlink tool. Check the found readlink.
20667            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20668            if test "x$ISGNU" = x; then
20669                 # A readlink that we do not know how to use.
20670                 # Are there other non-GNU readlinks out there?
20671                 READLINK_TESTED=yes
20672                 READLINK=
20673            fi
20674        fi
20675
20676        if test "x$READLINK" != x; then
20677            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20678        else
20679            # Save the current directory for restoring afterwards
20680            STARTDIR=$PWD
20681            COUNTER=0
20682            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20683            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20684            # Use the system pwd and not the shell builtin to resolve directory symlinks
20685            cd $sym_link_dir
20686            cd `$THEPWDCMD`
20687            sym_link_dir=`$THEPWDCMD`
20688            # Resolve file symlinks
20689            while test $COUNTER -lt 20; do
20690                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20691                if test "x$ISLINK" == x; then
20692                    # This is not a symbolic link! We are done!
20693                    break
20694                fi
20695                # Again resolve directory symlinks since the target of the just found
20696                # link could be in a different directory
20697                cd `$DIRNAME $ISLINK`
20698                sym_link_dir=`$THEPWDCMD`
20699                sym_link_file=`$BASENAME $ISLINK`
20700                let COUNTER=COUNTER+1
20701            done
20702            cd $STARTDIR
20703            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20704        fi
20705    fi
20706
20707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20708$as_echo "$PROPER_COMPILER_CC" >&6; }
20709    CC="$PROPER_COMPILER_CC"
20710  else
20711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20712$as_echo "no, keeping CC" >&6; }
20713    CC="$TEST_COMPILER"
20714  fi
20715
20716  COMPILER=$CC
20717  COMPILER_NAME=$COMPILER_NAME
20718
20719  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20720    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20721    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20722    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20723    if test $? -ne 0; then
20724      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20725
20726      { $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
20727$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20728      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20729$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20730      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20731    else
20732      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20733      COMPILER_VENDOR="Sun Studio"
20734    fi
20735  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20736    # First line typically looks something like:
20737    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20738    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20739    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20740    COMPILER_VENDOR="Microsoft CL.EXE"
20741    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20742    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20743      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20744        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20745      fi
20746    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20747      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20748        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20749      fi
20750    fi
20751  else
20752    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20753    # Check that this is likely to be GCC.
20754    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20755    if test $? -ne 0; then
20756      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20757$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20758      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20759$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20760      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20761    fi
20762
20763    # First line typically looks something like:
20764    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20765    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20766    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20767  fi
20768  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20769  CC_VERSION="$COMPILER_VERSION"
20770  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20771  CC_VENDOR="$COMPILER_VENDOR"
20772
20773  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20774$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20775
20776
20777# Now that we have resolved CC ourself, let autoconf have its go at it
20778ac_ext=c
20779ac_cpp='$CPP $CPPFLAGS'
20780ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20781ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20782ac_compiler_gnu=$ac_cv_c_compiler_gnu
20783if test -n "$ac_tool_prefix"; then
20784  for ac_prog in $CC
20785  do
20786    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20787set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20789$as_echo_n "checking for $ac_word... " >&6; }
20790if ${ac_cv_prog_CC+:} false; then :
20791  $as_echo_n "(cached) " >&6
20792else
20793  if test -n "$CC"; then
20794  ac_cv_prog_CC="$CC" # Let the user override the test.
20795else
20796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20797for as_dir in $PATH
20798do
20799  IFS=$as_save_IFS
20800  test -z "$as_dir" && as_dir=.
20801    for ac_exec_ext in '' $ac_executable_extensions; do
20802  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20803    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20805    break 2
20806  fi
20807done
20808  done
20809IFS=$as_save_IFS
20810
20811fi
20812fi
20813CC=$ac_cv_prog_CC
20814if test -n "$CC"; then
20815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20816$as_echo "$CC" >&6; }
20817else
20818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20819$as_echo "no" >&6; }
20820fi
20821
20822
20823    test -n "$CC" && break
20824  done
20825fi
20826if test -z "$CC"; then
20827  ac_ct_CC=$CC
20828  for ac_prog in $CC
20829do
20830  # Extract the first word of "$ac_prog", so it can be a program name with args.
20831set dummy $ac_prog; ac_word=$2
20832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20833$as_echo_n "checking for $ac_word... " >&6; }
20834if ${ac_cv_prog_ac_ct_CC+:} false; then :
20835  $as_echo_n "(cached) " >&6
20836else
20837  if test -n "$ac_ct_CC"; then
20838  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20839else
20840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20841for as_dir in $PATH
20842do
20843  IFS=$as_save_IFS
20844  test -z "$as_dir" && as_dir=.
20845    for ac_exec_ext in '' $ac_executable_extensions; do
20846  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20847    ac_cv_prog_ac_ct_CC="$ac_prog"
20848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20849    break 2
20850  fi
20851done
20852  done
20853IFS=$as_save_IFS
20854
20855fi
20856fi
20857ac_ct_CC=$ac_cv_prog_ac_ct_CC
20858if test -n "$ac_ct_CC"; then
20859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20860$as_echo "$ac_ct_CC" >&6; }
20861else
20862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20863$as_echo "no" >&6; }
20864fi
20865
20866
20867  test -n "$ac_ct_CC" && break
20868done
20869
20870  if test "x$ac_ct_CC" = x; then
20871    CC=""
20872  else
20873    case $cross_compiling:$ac_tool_warned in
20874yes:)
20875{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20876$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20877ac_tool_warned=yes ;;
20878esac
20879    CC=$ac_ct_CC
20880  fi
20881fi
20882
20883
20884test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20886as_fn_error $? "no acceptable C compiler found in \$PATH
20887See \`config.log' for more details" "$LINENO" 5; }
20888
20889# Provide some information about the compiler.
20890$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20891set X $ac_compile
20892ac_compiler=$2
20893for ac_option in --version -v -V -qversion; do
20894  { { ac_try="$ac_compiler $ac_option >&5"
20895case "(($ac_try" in
20896  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20897  *) ac_try_echo=$ac_try;;
20898esac
20899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20900$as_echo "$ac_try_echo"; } >&5
20901  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20902  ac_status=$?
20903  if test -s conftest.err; then
20904    sed '10a\
20905... rest of stderr output deleted ...
20906         10q' conftest.err >conftest.er1
20907    cat conftest.er1 >&5
20908  fi
20909  rm -f conftest.er1 conftest.err
20910  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20911  test $ac_status = 0; }
20912done
20913
20914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20915$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20916if ${ac_cv_c_compiler_gnu+:} false; then :
20917  $as_echo_n "(cached) " >&6
20918else
20919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20920/* end confdefs.h.  */
20921
20922int
20923main ()
20924{
20925#ifndef __GNUC__
20926       choke me
20927#endif
20928
20929  ;
20930  return 0;
20931}
20932_ACEOF
20933if ac_fn_c_try_compile "$LINENO"; then :
20934  ac_compiler_gnu=yes
20935else
20936  ac_compiler_gnu=no
20937fi
20938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20939ac_cv_c_compiler_gnu=$ac_compiler_gnu
20940
20941fi
20942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20943$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20944if test $ac_compiler_gnu = yes; then
20945  GCC=yes
20946else
20947  GCC=
20948fi
20949ac_test_CFLAGS=${CFLAGS+set}
20950ac_save_CFLAGS=$CFLAGS
20951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20952$as_echo_n "checking whether $CC accepts -g... " >&6; }
20953if ${ac_cv_prog_cc_g+:} false; then :
20954  $as_echo_n "(cached) " >&6
20955else
20956  ac_save_c_werror_flag=$ac_c_werror_flag
20957   ac_c_werror_flag=yes
20958   ac_cv_prog_cc_g=no
20959   CFLAGS="-g"
20960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20961/* end confdefs.h.  */
20962
20963int
20964main ()
20965{
20966
20967  ;
20968  return 0;
20969}
20970_ACEOF
20971if ac_fn_c_try_compile "$LINENO"; then :
20972  ac_cv_prog_cc_g=yes
20973else
20974  CFLAGS=""
20975      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20976/* end confdefs.h.  */
20977
20978int
20979main ()
20980{
20981
20982  ;
20983  return 0;
20984}
20985_ACEOF
20986if ac_fn_c_try_compile "$LINENO"; then :
20987
20988else
20989  ac_c_werror_flag=$ac_save_c_werror_flag
20990	 CFLAGS="-g"
20991	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20992/* end confdefs.h.  */
20993
20994int
20995main ()
20996{
20997
20998  ;
20999  return 0;
21000}
21001_ACEOF
21002if ac_fn_c_try_compile "$LINENO"; then :
21003  ac_cv_prog_cc_g=yes
21004fi
21005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21006fi
21007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21008fi
21009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21010   ac_c_werror_flag=$ac_save_c_werror_flag
21011fi
21012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
21013$as_echo "$ac_cv_prog_cc_g" >&6; }
21014if test "$ac_test_CFLAGS" = set; then
21015  CFLAGS=$ac_save_CFLAGS
21016elif test $ac_cv_prog_cc_g = yes; then
21017  if test "$GCC" = yes; then
21018    CFLAGS="-g -O2"
21019  else
21020    CFLAGS="-g"
21021  fi
21022else
21023  if test "$GCC" = yes; then
21024    CFLAGS="-O2"
21025  else
21026    CFLAGS=
21027  fi
21028fi
21029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
21030$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
21031if ${ac_cv_prog_cc_c89+:} false; then :
21032  $as_echo_n "(cached) " >&6
21033else
21034  ac_cv_prog_cc_c89=no
21035ac_save_CC=$CC
21036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21037/* end confdefs.h.  */
21038#include <stdarg.h>
21039#include <stdio.h>
21040#include <sys/types.h>
21041#include <sys/stat.h>
21042/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
21043struct buf { int x; };
21044FILE * (*rcsopen) (struct buf *, struct stat *, int);
21045static char *e (p, i)
21046     char **p;
21047     int i;
21048{
21049  return p[i];
21050}
21051static char *f (char * (*g) (char **, int), char **p, ...)
21052{
21053  char *s;
21054  va_list v;
21055  va_start (v,p);
21056  s = g (p, va_arg (v,int));
21057  va_end (v);
21058  return s;
21059}
21060
21061/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
21062   function prototypes and stuff, but not '\xHH' hex character constants.
21063   These don't provoke an error unfortunately, instead are silently treated
21064   as 'x'.  The following induces an error, until -std is added to get
21065   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
21066   array size at least.  It's necessary to write '\x00'==0 to get something
21067   that's true only with -std.  */
21068int osf4_cc_array ['\x00' == 0 ? 1 : -1];
21069
21070/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
21071   inside strings and character constants.  */
21072#define FOO(x) 'x'
21073int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
21074
21075int test (int i, double x);
21076struct s1 {int (*f) (int a);};
21077struct s2 {int (*f) (double a);};
21078int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
21079int argc;
21080char **argv;
21081int
21082main ()
21083{
21084return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
21085  ;
21086  return 0;
21087}
21088_ACEOF
21089for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
21090	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
21091do
21092  CC="$ac_save_CC $ac_arg"
21093  if ac_fn_c_try_compile "$LINENO"; then :
21094  ac_cv_prog_cc_c89=$ac_arg
21095fi
21096rm -f core conftest.err conftest.$ac_objext
21097  test "x$ac_cv_prog_cc_c89" != "xno" && break
21098done
21099rm -f conftest.$ac_ext
21100CC=$ac_save_CC
21101
21102fi
21103# AC_CACHE_VAL
21104case "x$ac_cv_prog_cc_c89" in
21105  x)
21106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
21107$as_echo "none needed" >&6; } ;;
21108  xno)
21109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
21110$as_echo "unsupported" >&6; } ;;
21111  *)
21112    CC="$CC $ac_cv_prog_cc_c89"
21113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
21114$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
21115esac
21116if test "x$ac_cv_prog_cc_c89" != xno; then :
21117
21118fi
21119
21120ac_ext=cpp
21121ac_cpp='$CXXCPP $CPPFLAGS'
21122ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21123ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21124ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21125
21126
21127### Locate C++ compiler (CXX)
21128
21129if test "x$CXX" != x; then
21130  COMPILER_CHECK_LIST="$CXX"
21131elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
21132  COMPILER_CHECK_LIST="cl"
21133elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21134  COMPILER_CHECK_LIST="CC g++"
21135else
21136  COMPILER_CHECK_LIST="g++ CC"
21137fi
21138
21139
21140  COMPILER_NAME=C++
21141
21142  CXX=
21143  # If TOOLS_DIR is set, check for all compiler names in there first
21144  # before checking the rest of the PATH.
21145  if test -n "$TOOLS_DIR"; then
21146    PATH_save="$PATH"
21147    PATH="$TOOLS_DIR"
21148    for ac_prog in $COMPILER_CHECK_LIST
21149do
21150  # Extract the first word of "$ac_prog", so it can be a program name with args.
21151set dummy $ac_prog; ac_word=$2
21152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21153$as_echo_n "checking for $ac_word... " >&6; }
21154if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
21155  $as_echo_n "(cached) " >&6
21156else
21157  case $TOOLS_DIR_CXX in
21158  [\\/]* | ?:[\\/]*)
21159  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
21160  ;;
21161  *)
21162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21163for as_dir in $PATH
21164do
21165  IFS=$as_save_IFS
21166  test -z "$as_dir" && as_dir=.
21167    for ac_exec_ext in '' $ac_executable_extensions; do
21168  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21169    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
21170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21171    break 2
21172  fi
21173done
21174  done
21175IFS=$as_save_IFS
21176
21177  ;;
21178esac
21179fi
21180TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
21181if test -n "$TOOLS_DIR_CXX"; then
21182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
21183$as_echo "$TOOLS_DIR_CXX" >&6; }
21184else
21185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21186$as_echo "no" >&6; }
21187fi
21188
21189
21190  test -n "$TOOLS_DIR_CXX" && break
21191done
21192
21193    CXX=$TOOLS_DIR_CXX
21194    PATH="$PATH_save"
21195  fi
21196
21197  # AC_PATH_PROGS can't be run multiple times with the same variable,
21198  # so create a new name for this run.
21199  if test "x$CXX" = x; then
21200    for ac_prog in $COMPILER_CHECK_LIST
21201do
21202  # Extract the first word of "$ac_prog", so it can be a program name with args.
21203set dummy $ac_prog; ac_word=$2
21204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21205$as_echo_n "checking for $ac_word... " >&6; }
21206if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
21207  $as_echo_n "(cached) " >&6
21208else
21209  case $POTENTIAL_CXX in
21210  [\\/]* | ?:[\\/]*)
21211  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
21212  ;;
21213  *)
21214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21215for as_dir in $PATH
21216do
21217  IFS=$as_save_IFS
21218  test -z "$as_dir" && as_dir=.
21219    for ac_exec_ext in '' $ac_executable_extensions; do
21220  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21221    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
21222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21223    break 2
21224  fi
21225done
21226  done
21227IFS=$as_save_IFS
21228
21229  ;;
21230esac
21231fi
21232POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
21233if test -n "$POTENTIAL_CXX"; then
21234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
21235$as_echo "$POTENTIAL_CXX" >&6; }
21236else
21237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21238$as_echo "no" >&6; }
21239fi
21240
21241
21242  test -n "$POTENTIAL_CXX" && break
21243done
21244
21245    CXX=$POTENTIAL_CXX
21246  fi
21247
21248  if test "x$CXX" = x; then
21249
21250    # Print a helpful message on how to acquire the necessary build dependency.
21251    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
21252    MISSING_DEPENDENCY=devkit
21253    PKGHANDLER_COMMAND=
21254
21255    case $PKGHANDLER in
21256	apt-get)
21257                apt_help     $MISSING_DEPENDENCY ;;
21258    yum)
21259                yum_help     $MISSING_DEPENDENCY ;;
21260	port)
21261                port_help    $MISSING_DEPENDENCY ;;
21262	pkgutil)
21263                pkgutil_help $MISSING_DEPENDENCY ;;
21264	pkgadd)
21265                pkgadd_help  $MISSING_DEPENDENCY ;;
21266    * )
21267      break ;;
21268    esac
21269
21270    if test "x$PKGHANDLER_COMMAND" != x; then
21271        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
21272    fi
21273
21274      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
21275  fi
21276
21277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21278
21279  # First separate the path from the arguments. This will split at the first
21280  # space.
21281  complete="$CXX"
21282  path="${complete%% *}"
21283  tmp="$complete EOL"
21284  arguments="${tmp#* }"
21285
21286  # Input might be given as Windows format, start by converting to
21287  # unix format.
21288  new_path=`$CYGPATH -u "$path"`
21289
21290  # Now try to locate executable using which
21291  new_path=`$WHICH "$new_path" 2> /dev/null`
21292  # bat and cmd files are not always considered executable in cygwin causing which
21293  # to not find them
21294  if test "x$new_path" = x \
21295           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21296           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21297    new_path=`$CYGPATH -u "$path"`
21298  fi
21299  if test "x$new_path" = x; then
21300    # Oops. Which didn't find the executable.
21301    # The splitting of arguments from the executable at a space might have been incorrect,
21302    # since paths with space are more likely in Windows. Give it another try with the whole
21303    # argument.
21304    path="$complete"
21305    arguments="EOL"
21306    new_path=`$CYGPATH -u "$path"`
21307    new_path=`$WHICH "$new_path" 2> /dev/null`
21308    # bat and cmd files are not always considered executable in cygwin causing which
21309    # to not find them
21310    if test "x$new_path" = x \
21311             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21312             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21313      new_path=`$CYGPATH -u "$path"`
21314    fi
21315    if test "x$new_path" = x; then
21316      # It's still not found. Now this is an unrecoverable error.
21317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21318$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21319      has_space=`$ECHO "$complete" | $GREP " "`
21320      if test "x$has_space" != x; then
21321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21323      fi
21324      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21325    fi
21326  fi
21327
21328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21331  # "foo.exe" is OK but "foo" is an error.
21332  #
21333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21334  # It is also a way to make sure we got the proper file name for the real test later on.
21335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21336  if test "x$test_shortpath" = x; then
21337    # Short path failed, file does not exist as specified.
21338    # Try adding .exe or .cmd
21339    if test -f "${new_path}.exe"; then
21340       input_to_shortpath="${new_path}.exe"
21341    elif test -f "${new_path}.cmd"; then
21342       input_to_shortpath="${new_path}.cmd"
21343    else
21344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21345$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21346      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21347$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21348      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21349    fi
21350  else
21351    input_to_shortpath="$new_path"
21352  fi
21353
21354  # Call helper function which possibly converts this using DOS-style short mode.
21355  # If so, the updated path is stored in $new_path.
21356  new_path="$input_to_shortpath"
21357
21358  input_path="$input_to_shortpath"
21359  # Check if we need to convert this using DOS-style short mode. If the path
21360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21361  # take no chances and rewrite it.
21362  # Note: m4 eats our [], so we need to use [ and ] instead.
21363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21364  if test "x$has_forbidden_chars" != x; then
21365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21369      # Going to short mode and back again did indeed matter. Since short mode is
21370      # case insensitive, let's make it lowercase to improve readability.
21371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21372      # Now convert it back to Unix-stile (cygpath)
21373      input_path=`$CYGPATH -u "$shortmode_path"`
21374      new_path="$input_path"
21375    fi
21376  fi
21377
21378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21379  if test "x$test_cygdrive_prefix" = x; then
21380    # As a simple fix, exclude /usr/bin since it's not a real path.
21381    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21383      # a path prefixed by /cygdrive for fixpath to work.
21384      new_path="$CYGWIN_ROOT_PATH$input_path"
21385    fi
21386  fi
21387
21388  # remove trailing .exe if any
21389  new_path="${new_path/%.exe/}"
21390
21391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21392
21393  # First separate the path from the arguments. This will split at the first
21394  # space.
21395  complete="$CXX"
21396  path="${complete%% *}"
21397  tmp="$complete EOL"
21398  arguments="${tmp#* }"
21399
21400  # Input might be given as Windows format, start by converting to
21401  # unix format.
21402  new_path="$path"
21403
21404  windows_path="$new_path"
21405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21406    unix_path=`$CYGPATH -u "$windows_path"`
21407    new_path="$unix_path"
21408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21410    new_path="$unix_path"
21411  fi
21412
21413
21414  # Now try to locate executable using which
21415  new_path=`$WHICH "$new_path" 2> /dev/null`
21416
21417  if test "x$new_path" = x; then
21418    # Oops. Which didn't find the executable.
21419    # The splitting of arguments from the executable at a space might have been incorrect,
21420    # since paths with space are more likely in Windows. Give it another try with the whole
21421    # argument.
21422    path="$complete"
21423    arguments="EOL"
21424    new_path="$path"
21425
21426  windows_path="$new_path"
21427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21428    unix_path=`$CYGPATH -u "$windows_path"`
21429    new_path="$unix_path"
21430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21432    new_path="$unix_path"
21433  fi
21434
21435
21436    new_path=`$WHICH "$new_path" 2> /dev/null`
21437
21438    if test "x$new_path" = x; then
21439      # It's still not found. Now this is an unrecoverable error.
21440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21441$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21442      has_space=`$ECHO "$complete" | $GREP " "`
21443      if test "x$has_space" != x; then
21444        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21445$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21446      fi
21447      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21448    fi
21449  fi
21450
21451  # Now new_path has a complete unix path to the binary
21452  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21453    # Keep paths in /bin as-is, but remove trailing .exe if any
21454    new_path="${new_path/%.exe/}"
21455    # Do not save /bin paths to all_fixpath_prefixes!
21456  else
21457    # Not in mixed or Windows style, start by that.
21458    new_path=`cmd //c echo $new_path`
21459
21460  input_path="$new_path"
21461  # Check if we need to convert this using DOS-style short mode. If the path
21462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21463  # take no chances and rewrite it.
21464  # Note: m4 eats our [], so we need to use [ and ] instead.
21465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21466  if test "x$has_forbidden_chars" != x; then
21467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21469  fi
21470
21471    # Output is in $new_path
21472
21473  windows_path="$new_path"
21474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21475    unix_path=`$CYGPATH -u "$windows_path"`
21476    new_path="$unix_path"
21477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21479    new_path="$unix_path"
21480  fi
21481
21482    # remove trailing .exe if any
21483    new_path="${new_path/%.exe/}"
21484
21485    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21486    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21487  fi
21488
21489  else
21490    # We're on a posix platform. Hooray! :)
21491    # First separate the path from the arguments. This will split at the first
21492    # space.
21493    complete="$CXX"
21494    path="${complete%% *}"
21495    tmp="$complete EOL"
21496    arguments="${tmp#* }"
21497
21498    # Cannot rely on the command "which" here since it doesn't always work.
21499    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21500    if test -z "$is_absolute_path"; then
21501      # Path to executable is not absolute. Find it.
21502      IFS_save="$IFS"
21503      IFS=:
21504      for p in $PATH; do
21505        if test -f "$p/$path" && test -x "$p/$path"; then
21506          new_path="$p/$path"
21507          break
21508        fi
21509      done
21510      IFS="$IFS_save"
21511    else
21512      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21513$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21514      new_path="$path"
21515    fi
21516
21517    if test "x$new_path" = x; then
21518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21519$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21520        has_space=`$ECHO "$complete" | $GREP " "`
21521        if test "x$has_space" != x; then
21522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21524        fi
21525        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21526      fi
21527  fi
21528
21529      # Now join together the path and the arguments once again
21530      if test "x$arguments" != xEOL; then
21531        new_complete="$new_path ${arguments% *}"
21532      else
21533        new_complete="$new_path"
21534      fi
21535
21536  if test "x$complete" != "x$new_complete"; then
21537      CXX="$new_complete"
21538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21539$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21540    fi
21541
21542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21543$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21544  TEST_COMPILER="$CXX"
21545
21546    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21547        # Follow a chain of symbolic links. Use readlink
21548        # where it exists, else fall back to horribly
21549        # complicated shell code.
21550        if test "x$READLINK_TESTED" != yes; then
21551            # On MacOSX there is a readlink tool with a different
21552            # purpose than the GNU readlink tool. Check the found readlink.
21553            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21554            if test "x$ISGNU" = x; then
21555                 # A readlink that we do not know how to use.
21556                 # Are there other non-GNU readlinks out there?
21557                 READLINK_TESTED=yes
21558                 READLINK=
21559            fi
21560        fi
21561
21562        if test "x$READLINK" != x; then
21563            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21564        else
21565            # Save the current directory for restoring afterwards
21566            STARTDIR=$PWD
21567            COUNTER=0
21568            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21569            sym_link_file=`$BASENAME $TEST_COMPILER`
21570            # Use the system pwd and not the shell builtin to resolve directory symlinks
21571            cd $sym_link_dir
21572            cd `$THEPWDCMD`
21573            sym_link_dir=`$THEPWDCMD`
21574            # Resolve file symlinks
21575            while test $COUNTER -lt 20; do
21576                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21577                if test "x$ISLINK" == x; then
21578                    # This is not a symbolic link! We are done!
21579                    break
21580                fi
21581                # Again resolve directory symlinks since the target of the just found
21582                # link could be in a different directory
21583                cd `$DIRNAME $ISLINK`
21584                sym_link_dir=`$THEPWDCMD`
21585                sym_link_file=`$BASENAME $ISLINK`
21586                let COUNTER=COUNTER+1
21587            done
21588            cd $STARTDIR
21589            TEST_COMPILER=$sym_link_dir/$sym_link_file
21590        fi
21591    fi
21592
21593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21594$as_echo "$TEST_COMPILER" >&6; }
21595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21596$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21597
21598  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21599  if test "x$COMPILER_BASENAME" = "xccache"; then
21600    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21601$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21602    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21603    # We want to control ccache invocation ourselves, so ignore this cc and try
21604    # searching again.
21605
21606    # Remove the path to the fake ccache cc from the PATH
21607    RETRY_COMPILER_SAVED_PATH="$PATH"
21608    COMPILER_DIRNAME=`$DIRNAME $CXX`
21609    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21610
21611    # Try again looking for our compiler
21612    if test -n "$ac_tool_prefix"; then
21613  for ac_prog in $COMPILER_CHECK_LIST
21614  do
21615    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21616set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21618$as_echo_n "checking for $ac_word... " >&6; }
21619if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21620  $as_echo_n "(cached) " >&6
21621else
21622  if test -n "$PROPER_COMPILER_CXX"; then
21623  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21624else
21625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21626for as_dir in $PATH
21627do
21628  IFS=$as_save_IFS
21629  test -z "$as_dir" && as_dir=.
21630    for ac_exec_ext in '' $ac_executable_extensions; do
21631  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21632    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21634    break 2
21635  fi
21636done
21637  done
21638IFS=$as_save_IFS
21639
21640fi
21641fi
21642PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21643if test -n "$PROPER_COMPILER_CXX"; then
21644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21645$as_echo "$PROPER_COMPILER_CXX" >&6; }
21646else
21647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21648$as_echo "no" >&6; }
21649fi
21650
21651
21652    test -n "$PROPER_COMPILER_CXX" && break
21653  done
21654fi
21655if test -z "$PROPER_COMPILER_CXX"; then
21656  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21657  for ac_prog in $COMPILER_CHECK_LIST
21658do
21659  # Extract the first word of "$ac_prog", so it can be a program name with args.
21660set dummy $ac_prog; ac_word=$2
21661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21662$as_echo_n "checking for $ac_word... " >&6; }
21663if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21664  $as_echo_n "(cached) " >&6
21665else
21666  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21667  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21668else
21669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21670for as_dir in $PATH
21671do
21672  IFS=$as_save_IFS
21673  test -z "$as_dir" && as_dir=.
21674    for ac_exec_ext in '' $ac_executable_extensions; do
21675  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21676    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21678    break 2
21679  fi
21680done
21681  done
21682IFS=$as_save_IFS
21683
21684fi
21685fi
21686ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21687if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21689$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21690else
21691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21692$as_echo "no" >&6; }
21693fi
21694
21695
21696  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21697done
21698
21699  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21700    PROPER_COMPILER_CXX=""
21701  else
21702    case $cross_compiling:$ac_tool_warned in
21703yes:)
21704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21706ac_tool_warned=yes ;;
21707esac
21708    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21709  fi
21710fi
21711
21712
21713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21714
21715  # First separate the path from the arguments. This will split at the first
21716  # space.
21717  complete="$PROPER_COMPILER_CXX"
21718  path="${complete%% *}"
21719  tmp="$complete EOL"
21720  arguments="${tmp#* }"
21721
21722  # Input might be given as Windows format, start by converting to
21723  # unix format.
21724  new_path=`$CYGPATH -u "$path"`
21725
21726  # Now try to locate executable using which
21727  new_path=`$WHICH "$new_path" 2> /dev/null`
21728  # bat and cmd files are not always considered executable in cygwin causing which
21729  # to not find them
21730  if test "x$new_path" = x \
21731           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21732           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21733    new_path=`$CYGPATH -u "$path"`
21734  fi
21735  if test "x$new_path" = x; then
21736    # Oops. Which didn't find the executable.
21737    # The splitting of arguments from the executable at a space might have been incorrect,
21738    # since paths with space are more likely in Windows. Give it another try with the whole
21739    # argument.
21740    path="$complete"
21741    arguments="EOL"
21742    new_path=`$CYGPATH -u "$path"`
21743    new_path=`$WHICH "$new_path" 2> /dev/null`
21744    # bat and cmd files are not always considered executable in cygwin causing which
21745    # to not find them
21746    if test "x$new_path" = x \
21747             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21748             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21749      new_path=`$CYGPATH -u "$path"`
21750    fi
21751    if test "x$new_path" = x; then
21752      # It's still not found. Now this is an unrecoverable error.
21753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21754$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21755      has_space=`$ECHO "$complete" | $GREP " "`
21756      if test "x$has_space" != x; then
21757        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21758$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21759      fi
21760      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21761    fi
21762  fi
21763
21764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21767  # "foo.exe" is OK but "foo" is an error.
21768  #
21769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21770  # It is also a way to make sure we got the proper file name for the real test later on.
21771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21772  if test "x$test_shortpath" = x; then
21773    # Short path failed, file does not exist as specified.
21774    # Try adding .exe or .cmd
21775    if test -f "${new_path}.exe"; then
21776       input_to_shortpath="${new_path}.exe"
21777    elif test -f "${new_path}.cmd"; then
21778       input_to_shortpath="${new_path}.cmd"
21779    else
21780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21781$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21782      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21783$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21784      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21785    fi
21786  else
21787    input_to_shortpath="$new_path"
21788  fi
21789
21790  # Call helper function which possibly converts this using DOS-style short mode.
21791  # If so, the updated path is stored in $new_path.
21792  new_path="$input_to_shortpath"
21793
21794  input_path="$input_to_shortpath"
21795  # Check if we need to convert this using DOS-style short mode. If the path
21796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21797  # take no chances and rewrite it.
21798  # Note: m4 eats our [], so we need to use [ and ] instead.
21799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21800  if test "x$has_forbidden_chars" != x; then
21801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21805      # Going to short mode and back again did indeed matter. Since short mode is
21806      # case insensitive, let's make it lowercase to improve readability.
21807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21808      # Now convert it back to Unix-stile (cygpath)
21809      input_path=`$CYGPATH -u "$shortmode_path"`
21810      new_path="$input_path"
21811    fi
21812  fi
21813
21814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21815  if test "x$test_cygdrive_prefix" = x; then
21816    # As a simple fix, exclude /usr/bin since it's not a real path.
21817    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21819      # a path prefixed by /cygdrive for fixpath to work.
21820      new_path="$CYGWIN_ROOT_PATH$input_path"
21821    fi
21822  fi
21823
21824  # remove trailing .exe if any
21825  new_path="${new_path/%.exe/}"
21826
21827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21828
21829  # First separate the path from the arguments. This will split at the first
21830  # space.
21831  complete="$PROPER_COMPILER_CXX"
21832  path="${complete%% *}"
21833  tmp="$complete EOL"
21834  arguments="${tmp#* }"
21835
21836  # Input might be given as Windows format, start by converting to
21837  # unix format.
21838  new_path="$path"
21839
21840  windows_path="$new_path"
21841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21842    unix_path=`$CYGPATH -u "$windows_path"`
21843    new_path="$unix_path"
21844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21846    new_path="$unix_path"
21847  fi
21848
21849
21850  # Now try to locate executable using which
21851  new_path=`$WHICH "$new_path" 2> /dev/null`
21852
21853  if test "x$new_path" = x; then
21854    # Oops. Which didn't find the executable.
21855    # The splitting of arguments from the executable at a space might have been incorrect,
21856    # since paths with space are more likely in Windows. Give it another try with the whole
21857    # argument.
21858    path="$complete"
21859    arguments="EOL"
21860    new_path="$path"
21861
21862  windows_path="$new_path"
21863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21864    unix_path=`$CYGPATH -u "$windows_path"`
21865    new_path="$unix_path"
21866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21868    new_path="$unix_path"
21869  fi
21870
21871
21872    new_path=`$WHICH "$new_path" 2> /dev/null`
21873
21874    if test "x$new_path" = x; then
21875      # It's still not found. Now this is an unrecoverable error.
21876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21877$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21878      has_space=`$ECHO "$complete" | $GREP " "`
21879      if test "x$has_space" != x; then
21880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21882      fi
21883      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21884    fi
21885  fi
21886
21887  # Now new_path has a complete unix path to the binary
21888  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21889    # Keep paths in /bin as-is, but remove trailing .exe if any
21890    new_path="${new_path/%.exe/}"
21891    # Do not save /bin paths to all_fixpath_prefixes!
21892  else
21893    # Not in mixed or Windows style, start by that.
21894    new_path=`cmd //c echo $new_path`
21895
21896  input_path="$new_path"
21897  # Check if we need to convert this using DOS-style short mode. If the path
21898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21899  # take no chances and rewrite it.
21900  # Note: m4 eats our [], so we need to use [ and ] instead.
21901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21902  if test "x$has_forbidden_chars" != x; then
21903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21905  fi
21906
21907    # Output is in $new_path
21908
21909  windows_path="$new_path"
21910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21911    unix_path=`$CYGPATH -u "$windows_path"`
21912    new_path="$unix_path"
21913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21915    new_path="$unix_path"
21916  fi
21917
21918    # remove trailing .exe if any
21919    new_path="${new_path/%.exe/}"
21920
21921    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21922    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21923  fi
21924
21925  else
21926    # We're on a posix platform. Hooray! :)
21927    # First separate the path from the arguments. This will split at the first
21928    # space.
21929    complete="$PROPER_COMPILER_CXX"
21930    path="${complete%% *}"
21931    tmp="$complete EOL"
21932    arguments="${tmp#* }"
21933
21934    # Cannot rely on the command "which" here since it doesn't always work.
21935    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21936    if test -z "$is_absolute_path"; then
21937      # Path to executable is not absolute. Find it.
21938      IFS_save="$IFS"
21939      IFS=:
21940      for p in $PATH; do
21941        if test -f "$p/$path" && test -x "$p/$path"; then
21942          new_path="$p/$path"
21943          break
21944        fi
21945      done
21946      IFS="$IFS_save"
21947    else
21948      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21949$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21950      new_path="$path"
21951    fi
21952
21953    if test "x$new_path" = x; then
21954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21955$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21956        has_space=`$ECHO "$complete" | $GREP " "`
21957        if test "x$has_space" != x; then
21958          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21960        fi
21961        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21962      fi
21963  fi
21964
21965      # Now join together the path and the arguments once again
21966      if test "x$arguments" != xEOL; then
21967        new_complete="$new_path ${arguments% *}"
21968      else
21969        new_complete="$new_path"
21970      fi
21971
21972  if test "x$complete" != "x$new_complete"; then
21973      PROPER_COMPILER_CXX="$new_complete"
21974      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21975$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21976    fi
21977
21978    PATH="$RETRY_COMPILER_SAVED_PATH"
21979
21980    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21981$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21982
21983    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21984        # Follow a chain of symbolic links. Use readlink
21985        # where it exists, else fall back to horribly
21986        # complicated shell code.
21987        if test "x$READLINK_TESTED" != yes; then
21988            # On MacOSX there is a readlink tool with a different
21989            # purpose than the GNU readlink tool. Check the found readlink.
21990            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21991            if test "x$ISGNU" = x; then
21992                 # A readlink that we do not know how to use.
21993                 # Are there other non-GNU readlinks out there?
21994                 READLINK_TESTED=yes
21995                 READLINK=
21996            fi
21997        fi
21998
21999        if test "x$READLINK" != x; then
22000            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
22001        else
22002            # Save the current directory for restoring afterwards
22003            STARTDIR=$PWD
22004            COUNTER=0
22005            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
22006            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
22007            # Use the system pwd and not the shell builtin to resolve directory symlinks
22008            cd $sym_link_dir
22009            cd `$THEPWDCMD`
22010            sym_link_dir=`$THEPWDCMD`
22011            # Resolve file symlinks
22012            while test $COUNTER -lt 20; do
22013                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22014                if test "x$ISLINK" == x; then
22015                    # This is not a symbolic link! We are done!
22016                    break
22017                fi
22018                # Again resolve directory symlinks since the target of the just found
22019                # link could be in a different directory
22020                cd `$DIRNAME $ISLINK`
22021                sym_link_dir=`$THEPWDCMD`
22022                sym_link_file=`$BASENAME $ISLINK`
22023                let COUNTER=COUNTER+1
22024            done
22025            cd $STARTDIR
22026            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
22027        fi
22028    fi
22029
22030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
22031$as_echo "$PROPER_COMPILER_CXX" >&6; }
22032    CXX="$PROPER_COMPILER_CXX"
22033  else
22034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
22035$as_echo "no, keeping CXX" >&6; }
22036    CXX="$TEST_COMPILER"
22037  fi
22038
22039  COMPILER=$CXX
22040  COMPILER_NAME=$COMPILER_NAME
22041
22042  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
22043    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
22044    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
22045    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
22046    if test $? -ne 0; then
22047      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
22048
22049      { $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
22050$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
22051      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
22052$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
22053      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
22054    else
22055      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
22056      COMPILER_VENDOR="Sun Studio"
22057    fi
22058  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
22059    # First line typically looks something like:
22060    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
22061    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
22062    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
22063    COMPILER_VENDOR="Microsoft CL.EXE"
22064    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
22065    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
22066      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
22067        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
22068      fi
22069    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
22070      if test "x$COMPILER_CPU_TEST" != "xx64"; then
22071        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
22072      fi
22073    fi
22074  else
22075    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
22076    # Check that this is likely to be GCC.
22077    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
22078    if test $? -ne 0; then
22079      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
22080$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
22081      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
22082$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
22083      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
22084    fi
22085
22086    # First line typically looks something like:
22087    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
22088    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
22089    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
22090  fi
22091  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
22092  CXX_VERSION="$COMPILER_VERSION"
22093  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
22094  CXX_VENDOR="$COMPILER_VENDOR"
22095
22096  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
22097$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
22098
22099
22100# Now that we have resolved CXX ourself, let autoconf have its go at it
22101ac_ext=cpp
22102ac_cpp='$CXXCPP $CPPFLAGS'
22103ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22104ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22105ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22106if test -z "$CXX"; then
22107  if test -n "$CCC"; then
22108    CXX=$CCC
22109  else
22110    if test -n "$ac_tool_prefix"; then
22111  for ac_prog in $CXX
22112  do
22113    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22114set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22116$as_echo_n "checking for $ac_word... " >&6; }
22117if ${ac_cv_prog_CXX+:} false; then :
22118  $as_echo_n "(cached) " >&6
22119else
22120  if test -n "$CXX"; then
22121  ac_cv_prog_CXX="$CXX" # Let the user override the test.
22122else
22123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22124for as_dir in $PATH
22125do
22126  IFS=$as_save_IFS
22127  test -z "$as_dir" && as_dir=.
22128    for ac_exec_ext in '' $ac_executable_extensions; do
22129  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22130    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
22131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22132    break 2
22133  fi
22134done
22135  done
22136IFS=$as_save_IFS
22137
22138fi
22139fi
22140CXX=$ac_cv_prog_CXX
22141if test -n "$CXX"; then
22142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
22143$as_echo "$CXX" >&6; }
22144else
22145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22146$as_echo "no" >&6; }
22147fi
22148
22149
22150    test -n "$CXX" && break
22151  done
22152fi
22153if test -z "$CXX"; then
22154  ac_ct_CXX=$CXX
22155  for ac_prog in $CXX
22156do
22157  # Extract the first word of "$ac_prog", so it can be a program name with args.
22158set dummy $ac_prog; ac_word=$2
22159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22160$as_echo_n "checking for $ac_word... " >&6; }
22161if ${ac_cv_prog_ac_ct_CXX+:} false; then :
22162  $as_echo_n "(cached) " >&6
22163else
22164  if test -n "$ac_ct_CXX"; then
22165  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
22166else
22167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22168for as_dir in $PATH
22169do
22170  IFS=$as_save_IFS
22171  test -z "$as_dir" && as_dir=.
22172    for ac_exec_ext in '' $ac_executable_extensions; do
22173  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22174    ac_cv_prog_ac_ct_CXX="$ac_prog"
22175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22176    break 2
22177  fi
22178done
22179  done
22180IFS=$as_save_IFS
22181
22182fi
22183fi
22184ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
22185if test -n "$ac_ct_CXX"; then
22186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
22187$as_echo "$ac_ct_CXX" >&6; }
22188else
22189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22190$as_echo "no" >&6; }
22191fi
22192
22193
22194  test -n "$ac_ct_CXX" && break
22195done
22196
22197  if test "x$ac_ct_CXX" = x; then
22198    CXX="g++"
22199  else
22200    case $cross_compiling:$ac_tool_warned in
22201yes:)
22202{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22203$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22204ac_tool_warned=yes ;;
22205esac
22206    CXX=$ac_ct_CXX
22207  fi
22208fi
22209
22210  fi
22211fi
22212# Provide some information about the compiler.
22213$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
22214set X $ac_compile
22215ac_compiler=$2
22216for ac_option in --version -v -V -qversion; do
22217  { { ac_try="$ac_compiler $ac_option >&5"
22218case "(($ac_try" in
22219  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22220  *) ac_try_echo=$ac_try;;
22221esac
22222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22223$as_echo "$ac_try_echo"; } >&5
22224  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22225  ac_status=$?
22226  if test -s conftest.err; then
22227    sed '10a\
22228... rest of stderr output deleted ...
22229         10q' conftest.err >conftest.er1
22230    cat conftest.er1 >&5
22231  fi
22232  rm -f conftest.er1 conftest.err
22233  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22234  test $ac_status = 0; }
22235done
22236
22237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
22238$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
22239if ${ac_cv_cxx_compiler_gnu+:} false; then :
22240  $as_echo_n "(cached) " >&6
22241else
22242  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22243/* end confdefs.h.  */
22244
22245int
22246main ()
22247{
22248#ifndef __GNUC__
22249       choke me
22250#endif
22251
22252  ;
22253  return 0;
22254}
22255_ACEOF
22256if ac_fn_cxx_try_compile "$LINENO"; then :
22257  ac_compiler_gnu=yes
22258else
22259  ac_compiler_gnu=no
22260fi
22261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22262ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
22263
22264fi
22265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
22266$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
22267if test $ac_compiler_gnu = yes; then
22268  GXX=yes
22269else
22270  GXX=
22271fi
22272ac_test_CXXFLAGS=${CXXFLAGS+set}
22273ac_save_CXXFLAGS=$CXXFLAGS
22274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
22275$as_echo_n "checking whether $CXX accepts -g... " >&6; }
22276if ${ac_cv_prog_cxx_g+:} false; then :
22277  $as_echo_n "(cached) " >&6
22278else
22279  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
22280   ac_cxx_werror_flag=yes
22281   ac_cv_prog_cxx_g=no
22282   CXXFLAGS="-g"
22283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22284/* end confdefs.h.  */
22285
22286int
22287main ()
22288{
22289
22290  ;
22291  return 0;
22292}
22293_ACEOF
22294if ac_fn_cxx_try_compile "$LINENO"; then :
22295  ac_cv_prog_cxx_g=yes
22296else
22297  CXXFLAGS=""
22298      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22299/* end confdefs.h.  */
22300
22301int
22302main ()
22303{
22304
22305  ;
22306  return 0;
22307}
22308_ACEOF
22309if ac_fn_cxx_try_compile "$LINENO"; then :
22310
22311else
22312  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22313	 CXXFLAGS="-g"
22314	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22315/* end confdefs.h.  */
22316
22317int
22318main ()
22319{
22320
22321  ;
22322  return 0;
22323}
22324_ACEOF
22325if ac_fn_cxx_try_compile "$LINENO"; then :
22326  ac_cv_prog_cxx_g=yes
22327fi
22328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22329fi
22330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22331fi
22332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22333   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22334fi
22335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
22336$as_echo "$ac_cv_prog_cxx_g" >&6; }
22337if test "$ac_test_CXXFLAGS" = set; then
22338  CXXFLAGS=$ac_save_CXXFLAGS
22339elif test $ac_cv_prog_cxx_g = yes; then
22340  if test "$GXX" = yes; then
22341    CXXFLAGS="-g -O2"
22342  else
22343    CXXFLAGS="-g"
22344  fi
22345else
22346  if test "$GXX" = yes; then
22347    CXXFLAGS="-O2"
22348  else
22349    CXXFLAGS=
22350  fi
22351fi
22352ac_ext=cpp
22353ac_cpp='$CXXCPP $CPPFLAGS'
22354ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22355ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22356ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22357
22358
22359### Locate other tools
22360
22361if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22362    ac_ext=m
22363ac_cpp='$OBJCPP $CPPFLAGS'
22364ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22365ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22366ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22367if test -n "$ac_tool_prefix"; then
22368  for ac_prog in gcc objcc objc cc CC
22369  do
22370    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22371set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22373$as_echo_n "checking for $ac_word... " >&6; }
22374if ${ac_cv_prog_OBJC+:} false; then :
22375  $as_echo_n "(cached) " >&6
22376else
22377  if test -n "$OBJC"; then
22378  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22379else
22380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22381for as_dir in $PATH
22382do
22383  IFS=$as_save_IFS
22384  test -z "$as_dir" && as_dir=.
22385    for ac_exec_ext in '' $ac_executable_extensions; do
22386  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22387    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22389    break 2
22390  fi
22391done
22392  done
22393IFS=$as_save_IFS
22394
22395fi
22396fi
22397OBJC=$ac_cv_prog_OBJC
22398if test -n "$OBJC"; then
22399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22400$as_echo "$OBJC" >&6; }
22401else
22402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22403$as_echo "no" >&6; }
22404fi
22405
22406
22407    test -n "$OBJC" && break
22408  done
22409fi
22410if test -z "$OBJC"; then
22411  ac_ct_OBJC=$OBJC
22412  for ac_prog in gcc objcc objc cc CC
22413do
22414  # Extract the first word of "$ac_prog", so it can be a program name with args.
22415set dummy $ac_prog; ac_word=$2
22416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22417$as_echo_n "checking for $ac_word... " >&6; }
22418if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22419  $as_echo_n "(cached) " >&6
22420else
22421  if test -n "$ac_ct_OBJC"; then
22422  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22423else
22424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22425for as_dir in $PATH
22426do
22427  IFS=$as_save_IFS
22428  test -z "$as_dir" && as_dir=.
22429    for ac_exec_ext in '' $ac_executable_extensions; do
22430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22431    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22433    break 2
22434  fi
22435done
22436  done
22437IFS=$as_save_IFS
22438
22439fi
22440fi
22441ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22442if test -n "$ac_ct_OBJC"; then
22443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22444$as_echo "$ac_ct_OBJC" >&6; }
22445else
22446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22447$as_echo "no" >&6; }
22448fi
22449
22450
22451  test -n "$ac_ct_OBJC" && break
22452done
22453
22454  if test "x$ac_ct_OBJC" = x; then
22455    OBJC="gcc"
22456  else
22457    case $cross_compiling:$ac_tool_warned in
22458yes:)
22459{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22460$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22461ac_tool_warned=yes ;;
22462esac
22463    OBJC=$ac_ct_OBJC
22464  fi
22465fi
22466
22467# Provide some information about the compiler.
22468$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22469set X $ac_compile
22470ac_compiler=$2
22471for ac_option in --version -v -V -qversion; do
22472  { { ac_try="$ac_compiler $ac_option >&5"
22473case "(($ac_try" in
22474  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22475  *) ac_try_echo=$ac_try;;
22476esac
22477eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22478$as_echo "$ac_try_echo"; } >&5
22479  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22480  ac_status=$?
22481  if test -s conftest.err; then
22482    sed '10a\
22483... rest of stderr output deleted ...
22484         10q' conftest.err >conftest.er1
22485    cat conftest.er1 >&5
22486  fi
22487  rm -f conftest.er1 conftest.err
22488  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22489  test $ac_status = 0; }
22490done
22491
22492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22493$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22494if ${ac_cv_objc_compiler_gnu+:} false; then :
22495  $as_echo_n "(cached) " >&6
22496else
22497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22498/* end confdefs.h.  */
22499
22500int
22501main ()
22502{
22503#ifndef __GNUC__
22504       choke me
22505#endif
22506
22507  ;
22508  return 0;
22509}
22510_ACEOF
22511if ac_fn_objc_try_compile "$LINENO"; then :
22512  ac_compiler_gnu=yes
22513else
22514  ac_compiler_gnu=no
22515fi
22516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22517ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22518
22519fi
22520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22521$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22522if test $ac_compiler_gnu = yes; then
22523  GOBJC=yes
22524else
22525  GOBJC=
22526fi
22527ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22528ac_save_OBJCFLAGS=$OBJCFLAGS
22529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22530$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22531if ${ac_cv_prog_objc_g+:} false; then :
22532  $as_echo_n "(cached) " >&6
22533else
22534  ac_save_objc_werror_flag=$ac_objc_werror_flag
22535   ac_objc_werror_flag=yes
22536   ac_cv_prog_objc_g=no
22537   OBJCFLAGS="-g"
22538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22539/* end confdefs.h.  */
22540
22541int
22542main ()
22543{
22544
22545  ;
22546  return 0;
22547}
22548_ACEOF
22549if ac_fn_objc_try_compile "$LINENO"; then :
22550  ac_cv_prog_objc_g=yes
22551else
22552  OBJCFLAGS=""
22553      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22554/* end confdefs.h.  */
22555
22556int
22557main ()
22558{
22559
22560  ;
22561  return 0;
22562}
22563_ACEOF
22564if ac_fn_objc_try_compile "$LINENO"; then :
22565
22566else
22567  ac_objc_werror_flag=$ac_save_objc_werror_flag
22568	 OBJCFLAGS="-g"
22569	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22570/* end confdefs.h.  */
22571
22572int
22573main ()
22574{
22575
22576  ;
22577  return 0;
22578}
22579_ACEOF
22580if ac_fn_objc_try_compile "$LINENO"; then :
22581  ac_cv_prog_objc_g=yes
22582fi
22583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22584fi
22585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22586fi
22587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22588   ac_objc_werror_flag=$ac_save_objc_werror_flag
22589fi
22590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22591$as_echo "$ac_cv_prog_objc_g" >&6; }
22592if test "$ac_test_OBJCFLAGS" = set; then
22593  OBJCFLAGS=$ac_save_OBJCFLAGS
22594elif test $ac_cv_prog_objc_g = yes; then
22595  if test "$GOBJC" = yes; then
22596    OBJCFLAGS="-g -O2"
22597  else
22598    OBJCFLAGS="-g"
22599  fi
22600else
22601  if test "$GOBJC" = yes; then
22602    OBJCFLAGS="-O2"
22603  else
22604    OBJCFLAGS=
22605  fi
22606fi
22607ac_ext=cpp
22608ac_cpp='$CXXCPP $CPPFLAGS'
22609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22612
22613
22614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22615
22616  # First separate the path from the arguments. This will split at the first
22617  # space.
22618  complete="$OBJC"
22619  path="${complete%% *}"
22620  tmp="$complete EOL"
22621  arguments="${tmp#* }"
22622
22623  # Input might be given as Windows format, start by converting to
22624  # unix format.
22625  new_path=`$CYGPATH -u "$path"`
22626
22627  # Now try to locate executable using which
22628  new_path=`$WHICH "$new_path" 2> /dev/null`
22629  # bat and cmd files are not always considered executable in cygwin causing which
22630  # to not find them
22631  if test "x$new_path" = x \
22632           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22633           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22634    new_path=`$CYGPATH -u "$path"`
22635  fi
22636  if test "x$new_path" = x; then
22637    # Oops. Which didn't find the executable.
22638    # The splitting of arguments from the executable at a space might have been incorrect,
22639    # since paths with space are more likely in Windows. Give it another try with the whole
22640    # argument.
22641    path="$complete"
22642    arguments="EOL"
22643    new_path=`$CYGPATH -u "$path"`
22644    new_path=`$WHICH "$new_path" 2> /dev/null`
22645    # bat and cmd files are not always considered executable in cygwin causing which
22646    # to not find them
22647    if test "x$new_path" = x \
22648             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22649             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22650      new_path=`$CYGPATH -u "$path"`
22651    fi
22652    if test "x$new_path" = x; then
22653      # It's still not found. Now this is an unrecoverable error.
22654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22655$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22656      has_space=`$ECHO "$complete" | $GREP " "`
22657      if test "x$has_space" != x; then
22658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22660      fi
22661      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22662    fi
22663  fi
22664
22665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22668  # "foo.exe" is OK but "foo" is an error.
22669  #
22670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22671  # It is also a way to make sure we got the proper file name for the real test later on.
22672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22673  if test "x$test_shortpath" = x; then
22674    # Short path failed, file does not exist as specified.
22675    # Try adding .exe or .cmd
22676    if test -f "${new_path}.exe"; then
22677       input_to_shortpath="${new_path}.exe"
22678    elif test -f "${new_path}.cmd"; then
22679       input_to_shortpath="${new_path}.cmd"
22680    else
22681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22682$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22683      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22684$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22685      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22686    fi
22687  else
22688    input_to_shortpath="$new_path"
22689  fi
22690
22691  # Call helper function which possibly converts this using DOS-style short mode.
22692  # If so, the updated path is stored in $new_path.
22693  new_path="$input_to_shortpath"
22694
22695  input_path="$input_to_shortpath"
22696  # Check if we need to convert this using DOS-style short mode. If the path
22697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22698  # take no chances and rewrite it.
22699  # Note: m4 eats our [], so we need to use [ and ] instead.
22700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22701  if test "x$has_forbidden_chars" != x; then
22702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22706      # Going to short mode and back again did indeed matter. Since short mode is
22707      # case insensitive, let's make it lowercase to improve readability.
22708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22709      # Now convert it back to Unix-stile (cygpath)
22710      input_path=`$CYGPATH -u "$shortmode_path"`
22711      new_path="$input_path"
22712    fi
22713  fi
22714
22715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22716  if test "x$test_cygdrive_prefix" = x; then
22717    # As a simple fix, exclude /usr/bin since it's not a real path.
22718    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22720      # a path prefixed by /cygdrive for fixpath to work.
22721      new_path="$CYGWIN_ROOT_PATH$input_path"
22722    fi
22723  fi
22724
22725  # remove trailing .exe if any
22726  new_path="${new_path/%.exe/}"
22727
22728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22729
22730  # First separate the path from the arguments. This will split at the first
22731  # space.
22732  complete="$OBJC"
22733  path="${complete%% *}"
22734  tmp="$complete EOL"
22735  arguments="${tmp#* }"
22736
22737  # Input might be given as Windows format, start by converting to
22738  # unix format.
22739  new_path="$path"
22740
22741  windows_path="$new_path"
22742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22743    unix_path=`$CYGPATH -u "$windows_path"`
22744    new_path="$unix_path"
22745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22747    new_path="$unix_path"
22748  fi
22749
22750
22751  # Now try to locate executable using which
22752  new_path=`$WHICH "$new_path" 2> /dev/null`
22753
22754  if test "x$new_path" = x; then
22755    # Oops. Which didn't find the executable.
22756    # The splitting of arguments from the executable at a space might have been incorrect,
22757    # since paths with space are more likely in Windows. Give it another try with the whole
22758    # argument.
22759    path="$complete"
22760    arguments="EOL"
22761    new_path="$path"
22762
22763  windows_path="$new_path"
22764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22765    unix_path=`$CYGPATH -u "$windows_path"`
22766    new_path="$unix_path"
22767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22769    new_path="$unix_path"
22770  fi
22771
22772
22773    new_path=`$WHICH "$new_path" 2> /dev/null`
22774
22775    if test "x$new_path" = x; then
22776      # It's still not found. Now this is an unrecoverable error.
22777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22778$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22779      has_space=`$ECHO "$complete" | $GREP " "`
22780      if test "x$has_space" != x; then
22781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22783      fi
22784      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22785    fi
22786  fi
22787
22788  # Now new_path has a complete unix path to the binary
22789  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22790    # Keep paths in /bin as-is, but remove trailing .exe if any
22791    new_path="${new_path/%.exe/}"
22792    # Do not save /bin paths to all_fixpath_prefixes!
22793  else
22794    # Not in mixed or Windows style, start by that.
22795    new_path=`cmd //c echo $new_path`
22796
22797  input_path="$new_path"
22798  # Check if we need to convert this using DOS-style short mode. If the path
22799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22800  # take no chances and rewrite it.
22801  # Note: m4 eats our [], so we need to use [ and ] instead.
22802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22803  if test "x$has_forbidden_chars" != x; then
22804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22806  fi
22807
22808    # Output is in $new_path
22809
22810  windows_path="$new_path"
22811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22812    unix_path=`$CYGPATH -u "$windows_path"`
22813    new_path="$unix_path"
22814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22816    new_path="$unix_path"
22817  fi
22818
22819    # remove trailing .exe if any
22820    new_path="${new_path/%.exe/}"
22821
22822    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22823    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22824  fi
22825
22826  else
22827    # We're on a posix platform. Hooray! :)
22828    # First separate the path from the arguments. This will split at the first
22829    # space.
22830    complete="$OBJC"
22831    path="${complete%% *}"
22832    tmp="$complete EOL"
22833    arguments="${tmp#* }"
22834
22835    # Cannot rely on the command "which" here since it doesn't always work.
22836    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22837    if test -z "$is_absolute_path"; then
22838      # Path to executable is not absolute. Find it.
22839      IFS_save="$IFS"
22840      IFS=:
22841      for p in $PATH; do
22842        if test -f "$p/$path" && test -x "$p/$path"; then
22843          new_path="$p/$path"
22844          break
22845        fi
22846      done
22847      IFS="$IFS_save"
22848    else
22849      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22850$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22851      new_path="$path"
22852    fi
22853
22854    if test "x$new_path" = x; then
22855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22856$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22857        has_space=`$ECHO "$complete" | $GREP " "`
22858        if test "x$has_space" != x; then
22859          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22860$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22861        fi
22862        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22863      fi
22864  fi
22865
22866      # Now join together the path and the arguments once again
22867      if test "x$arguments" != xEOL; then
22868        new_complete="$new_path ${arguments% *}"
22869      else
22870        new_complete="$new_path"
22871      fi
22872
22873  if test "x$complete" != "x$new_complete"; then
22874      OBJC="$new_complete"
22875      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22876$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22877    fi
22878
22879else
22880    OBJC=
22881fi
22882
22883# Restore the flags to the user specified values.
22884# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22885CFLAGS="$ORG_CFLAGS"
22886CXXFLAGS="$ORG_CXXFLAGS"
22887OBJCFLAGS="$ORG_OBJCFLAGS"
22888
22889LD="$CC"
22890LDEXE="$CC"
22891LDCXX="$CXX"
22892LDEXECXX="$CXX"
22893
22894# LDEXE is the linker to use, when creating executables.
22895
22896# Linking C++ libraries.
22897
22898# Linking C++ executables.
22899
22900
22901if test "x$OPENJDK_TARGET_OS" != xwindows; then
22902    if test -n "$ac_tool_prefix"; then
22903  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22904set dummy ${ac_tool_prefix}ar; ac_word=$2
22905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22906$as_echo_n "checking for $ac_word... " >&6; }
22907if ${ac_cv_prog_AR+:} false; then :
22908  $as_echo_n "(cached) " >&6
22909else
22910  if test -n "$AR"; then
22911  ac_cv_prog_AR="$AR" # Let the user override the test.
22912else
22913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22914for as_dir in $PATH
22915do
22916  IFS=$as_save_IFS
22917  test -z "$as_dir" && as_dir=.
22918    for ac_exec_ext in '' $ac_executable_extensions; do
22919  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22920    ac_cv_prog_AR="${ac_tool_prefix}ar"
22921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22922    break 2
22923  fi
22924done
22925  done
22926IFS=$as_save_IFS
22927
22928fi
22929fi
22930AR=$ac_cv_prog_AR
22931if test -n "$AR"; then
22932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22933$as_echo "$AR" >&6; }
22934else
22935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22936$as_echo "no" >&6; }
22937fi
22938
22939
22940fi
22941if test -z "$ac_cv_prog_AR"; then
22942  ac_ct_AR=$AR
22943  # Extract the first word of "ar", so it can be a program name with args.
22944set dummy ar; ac_word=$2
22945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22946$as_echo_n "checking for $ac_word... " >&6; }
22947if ${ac_cv_prog_ac_ct_AR+:} false; then :
22948  $as_echo_n "(cached) " >&6
22949else
22950  if test -n "$ac_ct_AR"; then
22951  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22952else
22953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22954for as_dir in $PATH
22955do
22956  IFS=$as_save_IFS
22957  test -z "$as_dir" && as_dir=.
22958    for ac_exec_ext in '' $ac_executable_extensions; do
22959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22960    ac_cv_prog_ac_ct_AR="ar"
22961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22962    break 2
22963  fi
22964done
22965  done
22966IFS=$as_save_IFS
22967
22968fi
22969fi
22970ac_ct_AR=$ac_cv_prog_ac_ct_AR
22971if test -n "$ac_ct_AR"; then
22972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22973$as_echo "$ac_ct_AR" >&6; }
22974else
22975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22976$as_echo "no" >&6; }
22977fi
22978
22979  if test "x$ac_ct_AR" = x; then
22980    AR=""
22981  else
22982    case $cross_compiling:$ac_tool_warned in
22983yes:)
22984{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22985$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22986ac_tool_warned=yes ;;
22987esac
22988    AR=$ac_ct_AR
22989  fi
22990else
22991  AR="$ac_cv_prog_AR"
22992fi
22993
22994
22995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22996
22997  # First separate the path from the arguments. This will split at the first
22998  # space.
22999  complete="$AR"
23000  path="${complete%% *}"
23001  tmp="$complete EOL"
23002  arguments="${tmp#* }"
23003
23004  # Input might be given as Windows format, start by converting to
23005  # unix format.
23006  new_path=`$CYGPATH -u "$path"`
23007
23008  # Now try to locate executable using which
23009  new_path=`$WHICH "$new_path" 2> /dev/null`
23010  # bat and cmd files are not always considered executable in cygwin causing which
23011  # to not find them
23012  if test "x$new_path" = x \
23013           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23014           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23015    new_path=`$CYGPATH -u "$path"`
23016  fi
23017  if test "x$new_path" = x; then
23018    # Oops. Which didn't find the executable.
23019    # The splitting of arguments from the executable at a space might have been incorrect,
23020    # since paths with space are more likely in Windows. Give it another try with the whole
23021    # argument.
23022    path="$complete"
23023    arguments="EOL"
23024    new_path=`$CYGPATH -u "$path"`
23025    new_path=`$WHICH "$new_path" 2> /dev/null`
23026    # bat and cmd files are not always considered executable in cygwin causing which
23027    # to not find them
23028    if test "x$new_path" = x \
23029             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23030             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23031      new_path=`$CYGPATH -u "$path"`
23032    fi
23033    if test "x$new_path" = x; then
23034      # It's still not found. Now this is an unrecoverable error.
23035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23036$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23037      has_space=`$ECHO "$complete" | $GREP " "`
23038      if test "x$has_space" != x; then
23039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23041      fi
23042      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23043    fi
23044  fi
23045
23046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23049  # "foo.exe" is OK but "foo" is an error.
23050  #
23051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23052  # It is also a way to make sure we got the proper file name for the real test later on.
23053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23054  if test "x$test_shortpath" = x; then
23055    # Short path failed, file does not exist as specified.
23056    # Try adding .exe or .cmd
23057    if test -f "${new_path}.exe"; then
23058       input_to_shortpath="${new_path}.exe"
23059    elif test -f "${new_path}.cmd"; then
23060       input_to_shortpath="${new_path}.cmd"
23061    else
23062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
23063$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
23064      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23065$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23066      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23067    fi
23068  else
23069    input_to_shortpath="$new_path"
23070  fi
23071
23072  # Call helper function which possibly converts this using DOS-style short mode.
23073  # If so, the updated path is stored in $new_path.
23074  new_path="$input_to_shortpath"
23075
23076  input_path="$input_to_shortpath"
23077  # Check if we need to convert this using DOS-style short mode. If the path
23078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23079  # take no chances and rewrite it.
23080  # Note: m4 eats our [], so we need to use [ and ] instead.
23081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23082  if test "x$has_forbidden_chars" != x; then
23083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23087      # Going to short mode and back again did indeed matter. Since short mode is
23088      # case insensitive, let's make it lowercase to improve readability.
23089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23090      # Now convert it back to Unix-stile (cygpath)
23091      input_path=`$CYGPATH -u "$shortmode_path"`
23092      new_path="$input_path"
23093    fi
23094  fi
23095
23096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23097  if test "x$test_cygdrive_prefix" = x; then
23098    # As a simple fix, exclude /usr/bin since it's not a real path.
23099    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23101      # a path prefixed by /cygdrive for fixpath to work.
23102      new_path="$CYGWIN_ROOT_PATH$input_path"
23103    fi
23104  fi
23105
23106  # remove trailing .exe if any
23107  new_path="${new_path/%.exe/}"
23108
23109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23110
23111  # First separate the path from the arguments. This will split at the first
23112  # space.
23113  complete="$AR"
23114  path="${complete%% *}"
23115  tmp="$complete EOL"
23116  arguments="${tmp#* }"
23117
23118  # Input might be given as Windows format, start by converting to
23119  # unix format.
23120  new_path="$path"
23121
23122  windows_path="$new_path"
23123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23124    unix_path=`$CYGPATH -u "$windows_path"`
23125    new_path="$unix_path"
23126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23128    new_path="$unix_path"
23129  fi
23130
23131
23132  # Now try to locate executable using which
23133  new_path=`$WHICH "$new_path" 2> /dev/null`
23134
23135  if test "x$new_path" = x; then
23136    # Oops. Which didn't find the executable.
23137    # The splitting of arguments from the executable at a space might have been incorrect,
23138    # since paths with space are more likely in Windows. Give it another try with the whole
23139    # argument.
23140    path="$complete"
23141    arguments="EOL"
23142    new_path="$path"
23143
23144  windows_path="$new_path"
23145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23146    unix_path=`$CYGPATH -u "$windows_path"`
23147    new_path="$unix_path"
23148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23150    new_path="$unix_path"
23151  fi
23152
23153
23154    new_path=`$WHICH "$new_path" 2> /dev/null`
23155
23156    if test "x$new_path" = x; then
23157      # It's still not found. Now this is an unrecoverable error.
23158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23159$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23160      has_space=`$ECHO "$complete" | $GREP " "`
23161      if test "x$has_space" != x; then
23162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23164      fi
23165      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23166    fi
23167  fi
23168
23169  # Now new_path has a complete unix path to the binary
23170  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23171    # Keep paths in /bin as-is, but remove trailing .exe if any
23172    new_path="${new_path/%.exe/}"
23173    # Do not save /bin paths to all_fixpath_prefixes!
23174  else
23175    # Not in mixed or Windows style, start by that.
23176    new_path=`cmd //c echo $new_path`
23177
23178  input_path="$new_path"
23179  # Check if we need to convert this using DOS-style short mode. If the path
23180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23181  # take no chances and rewrite it.
23182  # Note: m4 eats our [], so we need to use [ and ] instead.
23183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23184  if test "x$has_forbidden_chars" != x; then
23185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23186    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23187  fi
23188
23189    # Output is in $new_path
23190
23191  windows_path="$new_path"
23192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23193    unix_path=`$CYGPATH -u "$windows_path"`
23194    new_path="$unix_path"
23195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23197    new_path="$unix_path"
23198  fi
23199
23200    # remove trailing .exe if any
23201    new_path="${new_path/%.exe/}"
23202
23203    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23204    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23205  fi
23206
23207  else
23208    # We're on a posix platform. Hooray! :)
23209    # First separate the path from the arguments. This will split at the first
23210    # space.
23211    complete="$AR"
23212    path="${complete%% *}"
23213    tmp="$complete EOL"
23214    arguments="${tmp#* }"
23215
23216    # Cannot rely on the command "which" here since it doesn't always work.
23217    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23218    if test -z "$is_absolute_path"; then
23219      # Path to executable is not absolute. Find it.
23220      IFS_save="$IFS"
23221      IFS=:
23222      for p in $PATH; do
23223        if test -f "$p/$path" && test -x "$p/$path"; then
23224          new_path="$p/$path"
23225          break
23226        fi
23227      done
23228      IFS="$IFS_save"
23229    else
23230      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
23231$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
23232      new_path="$path"
23233    fi
23234
23235    if test "x$new_path" = x; then
23236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23237$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23238        has_space=`$ECHO "$complete" | $GREP " "`
23239        if test "x$has_space" != x; then
23240          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23241$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23242        fi
23243        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23244      fi
23245  fi
23246
23247      # Now join together the path and the arguments once again
23248      if test "x$arguments" != xEOL; then
23249        new_complete="$new_path ${arguments% *}"
23250      else
23251        new_complete="$new_path"
23252      fi
23253
23254  if test "x$complete" != "x$new_complete"; then
23255      AR="$new_complete"
23256      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
23257$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
23258    fi
23259
23260fi
23261if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23262    ARFLAGS="-r"
23263else
23264    ARFLAGS=""
23265fi
23266
23267
23268# For hotspot, we need these in Windows mixed path; other platforms keep them the same
23269HOTSPOT_CXX="$CXX"
23270HOTSPOT_LD="$LD"
23271
23272
23273
23274COMPILER_NAME=gcc
23275COMPILER_TYPE=CC
23276if test "x$OPENJDK_TARGET_OS" = xwindows; then :
23277
23278    # For now, assume that we are always compiling using cl.exe.
23279    CC_OUT_OPTION=-Fo
23280    EXE_OUT_OPTION=-out:
23281    LD_OUT_OPTION=-out:
23282    AR_OUT_OPTION=-out:
23283    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
23284    # program for something completely different.
23285    # Extract the first word of "link", so it can be a program name with args.
23286set dummy link; ac_word=$2
23287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23288$as_echo_n "checking for $ac_word... " >&6; }
23289if ${ac_cv_prog_WINLD+:} false; then :
23290  $as_echo_n "(cached) " >&6
23291else
23292  if test -n "$WINLD"; then
23293  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
23294else
23295  ac_prog_rejected=no
23296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23297for as_dir in $PATH
23298do
23299  IFS=$as_save_IFS
23300  test -z "$as_dir" && as_dir=.
23301    for ac_exec_ext in '' $ac_executable_extensions; do
23302  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23303    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
23304       ac_prog_rejected=yes
23305       continue
23306     fi
23307    ac_cv_prog_WINLD="link"
23308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23309    break 2
23310  fi
23311done
23312  done
23313IFS=$as_save_IFS
23314
23315if test $ac_prog_rejected = yes; then
23316  # We found a bogon in the path, so make sure we never use it.
23317  set dummy $ac_cv_prog_WINLD
23318  shift
23319  if test $# != 0; then
23320    # We chose a different compiler from the bogus one.
23321    # However, it has the same basename, so the bogon will be chosen
23322    # first if we set WINLD to just the basename; use the full file name.
23323    shift
23324    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
23325  fi
23326fi
23327fi
23328fi
23329WINLD=$ac_cv_prog_WINLD
23330if test -n "$WINLD"; then
23331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
23332$as_echo "$WINLD" >&6; }
23333else
23334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23335$as_echo "no" >&6; }
23336fi
23337
23338
23339    # Since we must ignore the first found link, WINLD will contain
23340    # the full path to the link.exe program.
23341
23342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23343
23344  # First separate the path from the arguments. This will split at the first
23345  # space.
23346  complete="$WINLD"
23347  path="${complete%% *}"
23348  tmp="$complete EOL"
23349  arguments="${tmp#* }"
23350
23351  # Input might be given as Windows format, start by converting to
23352  # unix format.
23353  new_path=`$CYGPATH -u "$path"`
23354
23355  # Now try to locate executable using which
23356  new_path=`$WHICH "$new_path" 2> /dev/null`
23357  # bat and cmd files are not always considered executable in cygwin causing which
23358  # to not find them
23359  if test "x$new_path" = x \
23360           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23361           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23362    new_path=`$CYGPATH -u "$path"`
23363  fi
23364  if test "x$new_path" = x; then
23365    # Oops. Which didn't find the executable.
23366    # The splitting of arguments from the executable at a space might have been incorrect,
23367    # since paths with space are more likely in Windows. Give it another try with the whole
23368    # argument.
23369    path="$complete"
23370    arguments="EOL"
23371    new_path=`$CYGPATH -u "$path"`
23372    new_path=`$WHICH "$new_path" 2> /dev/null`
23373    # bat and cmd files are not always considered executable in cygwin causing which
23374    # to not find them
23375    if test "x$new_path" = x \
23376             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23377             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23378      new_path=`$CYGPATH -u "$path"`
23379    fi
23380    if test "x$new_path" = x; then
23381      # It's still not found. Now this is an unrecoverable error.
23382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23383$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23384      has_space=`$ECHO "$complete" | $GREP " "`
23385      if test "x$has_space" != x; then
23386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23388      fi
23389      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23390    fi
23391  fi
23392
23393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23396  # "foo.exe" is OK but "foo" is an error.
23397  #
23398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23399  # It is also a way to make sure we got the proper file name for the real test later on.
23400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23401  if test "x$test_shortpath" = x; then
23402    # Short path failed, file does not exist as specified.
23403    # Try adding .exe or .cmd
23404    if test -f "${new_path}.exe"; then
23405       input_to_shortpath="${new_path}.exe"
23406    elif test -f "${new_path}.cmd"; then
23407       input_to_shortpath="${new_path}.cmd"
23408    else
23409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23410$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23411      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23412$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23413      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23414    fi
23415  else
23416    input_to_shortpath="$new_path"
23417  fi
23418
23419  # Call helper function which possibly converts this using DOS-style short mode.
23420  # If so, the updated path is stored in $new_path.
23421  new_path="$input_to_shortpath"
23422
23423  input_path="$input_to_shortpath"
23424  # Check if we need to convert this using DOS-style short mode. If the path
23425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23426  # take no chances and rewrite it.
23427  # Note: m4 eats our [], so we need to use [ and ] instead.
23428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23429  if test "x$has_forbidden_chars" != x; then
23430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23434      # Going to short mode and back again did indeed matter. Since short mode is
23435      # case insensitive, let's make it lowercase to improve readability.
23436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23437      # Now convert it back to Unix-stile (cygpath)
23438      input_path=`$CYGPATH -u "$shortmode_path"`
23439      new_path="$input_path"
23440    fi
23441  fi
23442
23443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23444  if test "x$test_cygdrive_prefix" = x; then
23445    # As a simple fix, exclude /usr/bin since it's not a real path.
23446    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23448      # a path prefixed by /cygdrive for fixpath to work.
23449      new_path="$CYGWIN_ROOT_PATH$input_path"
23450    fi
23451  fi
23452
23453  # remove trailing .exe if any
23454  new_path="${new_path/%.exe/}"
23455
23456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23457
23458  # First separate the path from the arguments. This will split at the first
23459  # space.
23460  complete="$WINLD"
23461  path="${complete%% *}"
23462  tmp="$complete EOL"
23463  arguments="${tmp#* }"
23464
23465  # Input might be given as Windows format, start by converting to
23466  # unix format.
23467  new_path="$path"
23468
23469  windows_path="$new_path"
23470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23471    unix_path=`$CYGPATH -u "$windows_path"`
23472    new_path="$unix_path"
23473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23475    new_path="$unix_path"
23476  fi
23477
23478
23479  # Now try to locate executable using which
23480  new_path=`$WHICH "$new_path" 2> /dev/null`
23481
23482  if test "x$new_path" = x; then
23483    # Oops. Which didn't find the executable.
23484    # The splitting of arguments from the executable at a space might have been incorrect,
23485    # since paths with space are more likely in Windows. Give it another try with the whole
23486    # argument.
23487    path="$complete"
23488    arguments="EOL"
23489    new_path="$path"
23490
23491  windows_path="$new_path"
23492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23493    unix_path=`$CYGPATH -u "$windows_path"`
23494    new_path="$unix_path"
23495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23497    new_path="$unix_path"
23498  fi
23499
23500
23501    new_path=`$WHICH "$new_path" 2> /dev/null`
23502
23503    if test "x$new_path" = x; then
23504      # It's still not found. Now this is an unrecoverable error.
23505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23506$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23507      has_space=`$ECHO "$complete" | $GREP " "`
23508      if test "x$has_space" != x; then
23509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23511      fi
23512      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23513    fi
23514  fi
23515
23516  # Now new_path has a complete unix path to the binary
23517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23518    # Keep paths in /bin as-is, but remove trailing .exe if any
23519    new_path="${new_path/%.exe/}"
23520    # Do not save /bin paths to all_fixpath_prefixes!
23521  else
23522    # Not in mixed or Windows style, start by that.
23523    new_path=`cmd //c echo $new_path`
23524
23525  input_path="$new_path"
23526  # Check if we need to convert this using DOS-style short mode. If the path
23527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23528  # take no chances and rewrite it.
23529  # Note: m4 eats our [], so we need to use [ and ] instead.
23530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23531  if test "x$has_forbidden_chars" != x; then
23532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23534  fi
23535
23536    # Output is in $new_path
23537
23538  windows_path="$new_path"
23539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23540    unix_path=`$CYGPATH -u "$windows_path"`
23541    new_path="$unix_path"
23542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23544    new_path="$unix_path"
23545  fi
23546
23547    # remove trailing .exe if any
23548    new_path="${new_path/%.exe/}"
23549
23550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23552  fi
23553
23554  else
23555    # We're on a posix platform. Hooray! :)
23556    # First separate the path from the arguments. This will split at the first
23557    # space.
23558    complete="$WINLD"
23559    path="${complete%% *}"
23560    tmp="$complete EOL"
23561    arguments="${tmp#* }"
23562
23563    # Cannot rely on the command "which" here since it doesn't always work.
23564    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23565    if test -z "$is_absolute_path"; then
23566      # Path to executable is not absolute. Find it.
23567      IFS_save="$IFS"
23568      IFS=:
23569      for p in $PATH; do
23570        if test -f "$p/$path" && test -x "$p/$path"; then
23571          new_path="$p/$path"
23572          break
23573        fi
23574      done
23575      IFS="$IFS_save"
23576    else
23577      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23578$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23579      new_path="$path"
23580    fi
23581
23582    if test "x$new_path" = x; then
23583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23584$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23585        has_space=`$ECHO "$complete" | $GREP " "`
23586        if test "x$has_space" != x; then
23587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23589        fi
23590        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23591      fi
23592  fi
23593
23594      # Now join together the path and the arguments once again
23595      if test "x$arguments" != xEOL; then
23596        new_complete="$new_path ${arguments% *}"
23597      else
23598        new_complete="$new_path"
23599      fi
23600
23601  if test "x$complete" != "x$new_complete"; then
23602      WINLD="$new_complete"
23603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23604$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23605    fi
23606
23607    printf "Windows linker was found at $WINLD\n"
23608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23609$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23610    "$WINLD" --version > /dev/null
23611    if test $? -eq 0 ; then
23612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23613$as_echo "no" >&6; }
23614      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23615    else
23616      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23617$as_echo "yes" >&6; }
23618    fi
23619    LD="$WINLD"
23620    LDEXE="$WINLD"
23621    LDCXX="$WINLD"
23622    LDEXECXX="$WINLD"
23623
23624    # Extract the first word of "mt", so it can be a program name with args.
23625set dummy mt; ac_word=$2
23626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23627$as_echo_n "checking for $ac_word... " >&6; }
23628if ${ac_cv_prog_MT+:} false; then :
23629  $as_echo_n "(cached) " >&6
23630else
23631  if test -n "$MT"; then
23632  ac_cv_prog_MT="$MT" # Let the user override the test.
23633else
23634  ac_prog_rejected=no
23635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23636for as_dir in $PATH
23637do
23638  IFS=$as_save_IFS
23639  test -z "$as_dir" && as_dir=.
23640    for ac_exec_ext in '' $ac_executable_extensions; do
23641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23642    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23643       ac_prog_rejected=yes
23644       continue
23645     fi
23646    ac_cv_prog_MT="mt"
23647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23648    break 2
23649  fi
23650done
23651  done
23652IFS=$as_save_IFS
23653
23654if test $ac_prog_rejected = yes; then
23655  # We found a bogon in the path, so make sure we never use it.
23656  set dummy $ac_cv_prog_MT
23657  shift
23658  if test $# != 0; then
23659    # We chose a different compiler from the bogus one.
23660    # However, it has the same basename, so the bogon will be chosen
23661    # first if we set MT to just the basename; use the full file name.
23662    shift
23663    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23664  fi
23665fi
23666fi
23667fi
23668MT=$ac_cv_prog_MT
23669if test -n "$MT"; then
23670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23671$as_echo "$MT" >&6; }
23672else
23673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23674$as_echo "no" >&6; }
23675fi
23676
23677
23678
23679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23680
23681  # First separate the path from the arguments. This will split at the first
23682  # space.
23683  complete="$MT"
23684  path="${complete%% *}"
23685  tmp="$complete EOL"
23686  arguments="${tmp#* }"
23687
23688  # Input might be given as Windows format, start by converting to
23689  # unix format.
23690  new_path=`$CYGPATH -u "$path"`
23691
23692  # Now try to locate executable using which
23693  new_path=`$WHICH "$new_path" 2> /dev/null`
23694  # bat and cmd files are not always considered executable in cygwin causing which
23695  # to not find them
23696  if test "x$new_path" = x \
23697           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23698           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23699    new_path=`$CYGPATH -u "$path"`
23700  fi
23701  if test "x$new_path" = x; then
23702    # Oops. Which didn't find the executable.
23703    # The splitting of arguments from the executable at a space might have been incorrect,
23704    # since paths with space are more likely in Windows. Give it another try with the whole
23705    # argument.
23706    path="$complete"
23707    arguments="EOL"
23708    new_path=`$CYGPATH -u "$path"`
23709    new_path=`$WHICH "$new_path" 2> /dev/null`
23710    # bat and cmd files are not always considered executable in cygwin causing which
23711    # to not find them
23712    if test "x$new_path" = x \
23713             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23714             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23715      new_path=`$CYGPATH -u "$path"`
23716    fi
23717    if test "x$new_path" = x; then
23718      # It's still not found. Now this is an unrecoverable error.
23719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23720$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23721      has_space=`$ECHO "$complete" | $GREP " "`
23722      if test "x$has_space" != x; then
23723        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23724$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23725      fi
23726      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23727    fi
23728  fi
23729
23730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23733  # "foo.exe" is OK but "foo" is an error.
23734  #
23735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23736  # It is also a way to make sure we got the proper file name for the real test later on.
23737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23738  if test "x$test_shortpath" = x; then
23739    # Short path failed, file does not exist as specified.
23740    # Try adding .exe or .cmd
23741    if test -f "${new_path}.exe"; then
23742       input_to_shortpath="${new_path}.exe"
23743    elif test -f "${new_path}.cmd"; then
23744       input_to_shortpath="${new_path}.cmd"
23745    else
23746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23747$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23748      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23749$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23750      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23751    fi
23752  else
23753    input_to_shortpath="$new_path"
23754  fi
23755
23756  # Call helper function which possibly converts this using DOS-style short mode.
23757  # If so, the updated path is stored in $new_path.
23758  new_path="$input_to_shortpath"
23759
23760  input_path="$input_to_shortpath"
23761  # Check if we need to convert this using DOS-style short mode. If the path
23762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23763  # take no chances and rewrite it.
23764  # Note: m4 eats our [], so we need to use [ and ] instead.
23765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23766  if test "x$has_forbidden_chars" != x; then
23767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23771      # Going to short mode and back again did indeed matter. Since short mode is
23772      # case insensitive, let's make it lowercase to improve readability.
23773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23774      # Now convert it back to Unix-stile (cygpath)
23775      input_path=`$CYGPATH -u "$shortmode_path"`
23776      new_path="$input_path"
23777    fi
23778  fi
23779
23780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23781  if test "x$test_cygdrive_prefix" = x; then
23782    # As a simple fix, exclude /usr/bin since it's not a real path.
23783    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23785      # a path prefixed by /cygdrive for fixpath to work.
23786      new_path="$CYGWIN_ROOT_PATH$input_path"
23787    fi
23788  fi
23789
23790  # remove trailing .exe if any
23791  new_path="${new_path/%.exe/}"
23792
23793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23794
23795  # First separate the path from the arguments. This will split at the first
23796  # space.
23797  complete="$MT"
23798  path="${complete%% *}"
23799  tmp="$complete EOL"
23800  arguments="${tmp#* }"
23801
23802  # Input might be given as Windows format, start by converting to
23803  # unix format.
23804  new_path="$path"
23805
23806  windows_path="$new_path"
23807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23808    unix_path=`$CYGPATH -u "$windows_path"`
23809    new_path="$unix_path"
23810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23812    new_path="$unix_path"
23813  fi
23814
23815
23816  # Now try to locate executable using which
23817  new_path=`$WHICH "$new_path" 2> /dev/null`
23818
23819  if test "x$new_path" = x; then
23820    # Oops. Which didn't find the executable.
23821    # The splitting of arguments from the executable at a space might have been incorrect,
23822    # since paths with space are more likely in Windows. Give it another try with the whole
23823    # argument.
23824    path="$complete"
23825    arguments="EOL"
23826    new_path="$path"
23827
23828  windows_path="$new_path"
23829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23830    unix_path=`$CYGPATH -u "$windows_path"`
23831    new_path="$unix_path"
23832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23834    new_path="$unix_path"
23835  fi
23836
23837
23838    new_path=`$WHICH "$new_path" 2> /dev/null`
23839
23840    if test "x$new_path" = x; then
23841      # It's still not found. Now this is an unrecoverable error.
23842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23843$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23844      has_space=`$ECHO "$complete" | $GREP " "`
23845      if test "x$has_space" != x; then
23846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23848      fi
23849      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23850    fi
23851  fi
23852
23853  # Now new_path has a complete unix path to the binary
23854  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23855    # Keep paths in /bin as-is, but remove trailing .exe if any
23856    new_path="${new_path/%.exe/}"
23857    # Do not save /bin paths to all_fixpath_prefixes!
23858  else
23859    # Not in mixed or Windows style, start by that.
23860    new_path=`cmd //c echo $new_path`
23861
23862  input_path="$new_path"
23863  # Check if we need to convert this using DOS-style short mode. If the path
23864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23865  # take no chances and rewrite it.
23866  # Note: m4 eats our [], so we need to use [ and ] instead.
23867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23868  if test "x$has_forbidden_chars" != x; then
23869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23871  fi
23872
23873    # Output is in $new_path
23874
23875  windows_path="$new_path"
23876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23877    unix_path=`$CYGPATH -u "$windows_path"`
23878    new_path="$unix_path"
23879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23881    new_path="$unix_path"
23882  fi
23883
23884    # remove trailing .exe if any
23885    new_path="${new_path/%.exe/}"
23886
23887    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23888    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23889  fi
23890
23891  else
23892    # We're on a posix platform. Hooray! :)
23893    # First separate the path from the arguments. This will split at the first
23894    # space.
23895    complete="$MT"
23896    path="${complete%% *}"
23897    tmp="$complete EOL"
23898    arguments="${tmp#* }"
23899
23900    # Cannot rely on the command "which" here since it doesn't always work.
23901    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23902    if test -z "$is_absolute_path"; then
23903      # Path to executable is not absolute. Find it.
23904      IFS_save="$IFS"
23905      IFS=:
23906      for p in $PATH; do
23907        if test -f "$p/$path" && test -x "$p/$path"; then
23908          new_path="$p/$path"
23909          break
23910        fi
23911      done
23912      IFS="$IFS_save"
23913    else
23914      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23915$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23916      new_path="$path"
23917    fi
23918
23919    if test "x$new_path" = x; then
23920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23921$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23922        has_space=`$ECHO "$complete" | $GREP " "`
23923        if test "x$has_space" != x; then
23924          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23925$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23926        fi
23927        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23928      fi
23929  fi
23930
23931      # Now join together the path and the arguments once again
23932      if test "x$arguments" != xEOL; then
23933        new_complete="$new_path ${arguments% *}"
23934      else
23935        new_complete="$new_path"
23936      fi
23937
23938  if test "x$complete" != "x$new_complete"; then
23939      MT="$new_complete"
23940      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23941$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23942    fi
23943
23944    # The resource compiler
23945    # Extract the first word of "rc", so it can be a program name with args.
23946set dummy rc; ac_word=$2
23947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23948$as_echo_n "checking for $ac_word... " >&6; }
23949if ${ac_cv_prog_RC+:} false; then :
23950  $as_echo_n "(cached) " >&6
23951else
23952  if test -n "$RC"; then
23953  ac_cv_prog_RC="$RC" # Let the user override the test.
23954else
23955  ac_prog_rejected=no
23956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23957for as_dir in $PATH
23958do
23959  IFS=$as_save_IFS
23960  test -z "$as_dir" && as_dir=.
23961    for ac_exec_ext in '' $ac_executable_extensions; do
23962  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23963    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23964       ac_prog_rejected=yes
23965       continue
23966     fi
23967    ac_cv_prog_RC="rc"
23968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23969    break 2
23970  fi
23971done
23972  done
23973IFS=$as_save_IFS
23974
23975if test $ac_prog_rejected = yes; then
23976  # We found a bogon in the path, so make sure we never use it.
23977  set dummy $ac_cv_prog_RC
23978  shift
23979  if test $# != 0; then
23980    # We chose a different compiler from the bogus one.
23981    # However, it has the same basename, so the bogon will be chosen
23982    # first if we set RC to just the basename; use the full file name.
23983    shift
23984    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23985  fi
23986fi
23987fi
23988fi
23989RC=$ac_cv_prog_RC
23990if test -n "$RC"; then
23991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23992$as_echo "$RC" >&6; }
23993else
23994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23995$as_echo "no" >&6; }
23996fi
23997
23998
23999
24000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24001
24002  # First separate the path from the arguments. This will split at the first
24003  # space.
24004  complete="$RC"
24005  path="${complete%% *}"
24006  tmp="$complete EOL"
24007  arguments="${tmp#* }"
24008
24009  # Input might be given as Windows format, start by converting to
24010  # unix format.
24011  new_path=`$CYGPATH -u "$path"`
24012
24013  # Now try to locate executable using which
24014  new_path=`$WHICH "$new_path" 2> /dev/null`
24015  # bat and cmd files are not always considered executable in cygwin causing which
24016  # to not find them
24017  if test "x$new_path" = x \
24018           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24019           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24020    new_path=`$CYGPATH -u "$path"`
24021  fi
24022  if test "x$new_path" = x; then
24023    # Oops. Which didn't find the executable.
24024    # The splitting of arguments from the executable at a space might have been incorrect,
24025    # since paths with space are more likely in Windows. Give it another try with the whole
24026    # argument.
24027    path="$complete"
24028    arguments="EOL"
24029    new_path=`$CYGPATH -u "$path"`
24030    new_path=`$WHICH "$new_path" 2> /dev/null`
24031    # bat and cmd files are not always considered executable in cygwin causing which
24032    # to not find them
24033    if test "x$new_path" = x \
24034             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24035             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24036      new_path=`$CYGPATH -u "$path"`
24037    fi
24038    if test "x$new_path" = x; then
24039      # It's still not found. Now this is an unrecoverable error.
24040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24041$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24042      has_space=`$ECHO "$complete" | $GREP " "`
24043      if test "x$has_space" != x; then
24044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24046      fi
24047      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24048    fi
24049  fi
24050
24051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24054  # "foo.exe" is OK but "foo" is an error.
24055  #
24056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24057  # It is also a way to make sure we got the proper file name for the real test later on.
24058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24059  if test "x$test_shortpath" = x; then
24060    # Short path failed, file does not exist as specified.
24061    # Try adding .exe or .cmd
24062    if test -f "${new_path}.exe"; then
24063       input_to_shortpath="${new_path}.exe"
24064    elif test -f "${new_path}.cmd"; then
24065       input_to_shortpath="${new_path}.cmd"
24066    else
24067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
24068$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
24069      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24070$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24071      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24072    fi
24073  else
24074    input_to_shortpath="$new_path"
24075  fi
24076
24077  # Call helper function which possibly converts this using DOS-style short mode.
24078  # If so, the updated path is stored in $new_path.
24079  new_path="$input_to_shortpath"
24080
24081  input_path="$input_to_shortpath"
24082  # Check if we need to convert this using DOS-style short mode. If the path
24083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24084  # take no chances and rewrite it.
24085  # Note: m4 eats our [], so we need to use [ and ] instead.
24086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24087  if test "x$has_forbidden_chars" != x; then
24088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24092      # Going to short mode and back again did indeed matter. Since short mode is
24093      # case insensitive, let's make it lowercase to improve readability.
24094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24095      # Now convert it back to Unix-stile (cygpath)
24096      input_path=`$CYGPATH -u "$shortmode_path"`
24097      new_path="$input_path"
24098    fi
24099  fi
24100
24101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24102  if test "x$test_cygdrive_prefix" = x; then
24103    # As a simple fix, exclude /usr/bin since it's not a real path.
24104    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24106      # a path prefixed by /cygdrive for fixpath to work.
24107      new_path="$CYGWIN_ROOT_PATH$input_path"
24108    fi
24109  fi
24110
24111  # remove trailing .exe if any
24112  new_path="${new_path/%.exe/}"
24113
24114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24115
24116  # First separate the path from the arguments. This will split at the first
24117  # space.
24118  complete="$RC"
24119  path="${complete%% *}"
24120  tmp="$complete EOL"
24121  arguments="${tmp#* }"
24122
24123  # Input might be given as Windows format, start by converting to
24124  # unix format.
24125  new_path="$path"
24126
24127  windows_path="$new_path"
24128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24129    unix_path=`$CYGPATH -u "$windows_path"`
24130    new_path="$unix_path"
24131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24133    new_path="$unix_path"
24134  fi
24135
24136
24137  # Now try to locate executable using which
24138  new_path=`$WHICH "$new_path" 2> /dev/null`
24139
24140  if test "x$new_path" = x; then
24141    # Oops. Which didn't find the executable.
24142    # The splitting of arguments from the executable at a space might have been incorrect,
24143    # since paths with space are more likely in Windows. Give it another try with the whole
24144    # argument.
24145    path="$complete"
24146    arguments="EOL"
24147    new_path="$path"
24148
24149  windows_path="$new_path"
24150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24151    unix_path=`$CYGPATH -u "$windows_path"`
24152    new_path="$unix_path"
24153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24155    new_path="$unix_path"
24156  fi
24157
24158
24159    new_path=`$WHICH "$new_path" 2> /dev/null`
24160
24161    if test "x$new_path" = x; then
24162      # It's still not found. Now this is an unrecoverable error.
24163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24164$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24165      has_space=`$ECHO "$complete" | $GREP " "`
24166      if test "x$has_space" != x; then
24167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24169      fi
24170      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24171    fi
24172  fi
24173
24174  # Now new_path has a complete unix path to the binary
24175  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24176    # Keep paths in /bin as-is, but remove trailing .exe if any
24177    new_path="${new_path/%.exe/}"
24178    # Do not save /bin paths to all_fixpath_prefixes!
24179  else
24180    # Not in mixed or Windows style, start by that.
24181    new_path=`cmd //c echo $new_path`
24182
24183  input_path="$new_path"
24184  # Check if we need to convert this using DOS-style short mode. If the path
24185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24186  # take no chances and rewrite it.
24187  # Note: m4 eats our [], so we need to use [ and ] instead.
24188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24189  if test "x$has_forbidden_chars" != x; then
24190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24192  fi
24193
24194    # Output is in $new_path
24195
24196  windows_path="$new_path"
24197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24198    unix_path=`$CYGPATH -u "$windows_path"`
24199    new_path="$unix_path"
24200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24202    new_path="$unix_path"
24203  fi
24204
24205    # remove trailing .exe if any
24206    new_path="${new_path/%.exe/}"
24207
24208    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24209    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24210  fi
24211
24212  else
24213    # We're on a posix platform. Hooray! :)
24214    # First separate the path from the arguments. This will split at the first
24215    # space.
24216    complete="$RC"
24217    path="${complete%% *}"
24218    tmp="$complete EOL"
24219    arguments="${tmp#* }"
24220
24221    # Cannot rely on the command "which" here since it doesn't always work.
24222    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24223    if test -z "$is_absolute_path"; then
24224      # Path to executable is not absolute. Find it.
24225      IFS_save="$IFS"
24226      IFS=:
24227      for p in $PATH; do
24228        if test -f "$p/$path" && test -x "$p/$path"; then
24229          new_path="$p/$path"
24230          break
24231        fi
24232      done
24233      IFS="$IFS_save"
24234    else
24235      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
24236$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
24237      new_path="$path"
24238    fi
24239
24240    if test "x$new_path" = x; then
24241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24242$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24243        has_space=`$ECHO "$complete" | $GREP " "`
24244        if test "x$has_space" != x; then
24245          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24246$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24247        fi
24248        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24249      fi
24250  fi
24251
24252      # Now join together the path and the arguments once again
24253      if test "x$arguments" != xEOL; then
24254        new_complete="$new_path ${arguments% *}"
24255      else
24256        new_complete="$new_path"
24257      fi
24258
24259  if test "x$complete" != "x$new_complete"; then
24260      RC="$new_complete"
24261      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
24262$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
24263    fi
24264
24265
24266    # For hotspot, we need these in Windows mixed path,
24267    # so rewrite them all. Need added .exe suffix.
24268    HOTSPOT_CXX="$CXX.exe"
24269    HOTSPOT_LD="$LD.exe"
24270    HOTSPOT_MT="$MT.exe"
24271    HOTSPOT_RC="$RC.exe"
24272
24273  unix_path="$HOTSPOT_CXX"
24274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24275    windows_path=`$CYGPATH -m "$unix_path"`
24276    HOTSPOT_CXX="$windows_path"
24277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24278    windows_path=`cmd //c echo $unix_path`
24279    HOTSPOT_CXX="$windows_path"
24280  fi
24281
24282
24283  unix_path="$HOTSPOT_LD"
24284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24285    windows_path=`$CYGPATH -m "$unix_path"`
24286    HOTSPOT_LD="$windows_path"
24287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24288    windows_path=`cmd //c echo $unix_path`
24289    HOTSPOT_LD="$windows_path"
24290  fi
24291
24292
24293  unix_path="$HOTSPOT_MT"
24294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24295    windows_path=`$CYGPATH -m "$unix_path"`
24296    HOTSPOT_MT="$windows_path"
24297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24298    windows_path=`cmd //c echo $unix_path`
24299    HOTSPOT_MT="$windows_path"
24300  fi
24301
24302
24303  unix_path="$HOTSPOT_RC"
24304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24305    windows_path=`$CYGPATH -m "$unix_path"`
24306    HOTSPOT_RC="$windows_path"
24307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24308    windows_path=`cmd //c echo $unix_path`
24309    HOTSPOT_RC="$windows_path"
24310  fi
24311
24312
24313
24314
24315    RC_FLAGS="-nologo -l 0x409 -r"
24316    if test "x$VARIANT" = xOPT; then :
24317
24318        RC_FLAGS="$RC_FLAGS -d NDEBUG"
24319
24320fi
24321    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
24322    if test "x$JDK_UPDATE_VERSION" = x; then :
24323
24324        JDK_UPDATE_VERSION_NOTNULL=0
24325
24326fi
24327    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
24328    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
24329    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
24330    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
24331    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
24332    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
24333    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
24334
24335    # lib.exe is used to create static libraries.
24336    # Extract the first word of "lib", so it can be a program name with args.
24337set dummy lib; ac_word=$2
24338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24339$as_echo_n "checking for $ac_word... " >&6; }
24340if ${ac_cv_prog_WINAR+:} false; then :
24341  $as_echo_n "(cached) " >&6
24342else
24343  if test -n "$WINAR"; then
24344  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24345else
24346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24347for as_dir in $PATH
24348do
24349  IFS=$as_save_IFS
24350  test -z "$as_dir" && as_dir=.
24351    for ac_exec_ext in '' $ac_executable_extensions; do
24352  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24353    ac_cv_prog_WINAR="lib"
24354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24355    break 2
24356  fi
24357done
24358  done
24359IFS=$as_save_IFS
24360
24361fi
24362fi
24363WINAR=$ac_cv_prog_WINAR
24364if test -n "$WINAR"; then
24365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24366$as_echo "$WINAR" >&6; }
24367else
24368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24369$as_echo "no" >&6; }
24370fi
24371
24372
24373
24374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24375
24376  # First separate the path from the arguments. This will split at the first
24377  # space.
24378  complete="$WINAR"
24379  path="${complete%% *}"
24380  tmp="$complete EOL"
24381  arguments="${tmp#* }"
24382
24383  # Input might be given as Windows format, start by converting to
24384  # unix format.
24385  new_path=`$CYGPATH -u "$path"`
24386
24387  # Now try to locate executable using which
24388  new_path=`$WHICH "$new_path" 2> /dev/null`
24389  # bat and cmd files are not always considered executable in cygwin causing which
24390  # to not find them
24391  if test "x$new_path" = x \
24392           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24393           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24394    new_path=`$CYGPATH -u "$path"`
24395  fi
24396  if test "x$new_path" = x; then
24397    # Oops. Which didn't find the executable.
24398    # The splitting of arguments from the executable at a space might have been incorrect,
24399    # since paths with space are more likely in Windows. Give it another try with the whole
24400    # argument.
24401    path="$complete"
24402    arguments="EOL"
24403    new_path=`$CYGPATH -u "$path"`
24404    new_path=`$WHICH "$new_path" 2> /dev/null`
24405    # bat and cmd files are not always considered executable in cygwin causing which
24406    # to not find them
24407    if test "x$new_path" = x \
24408             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24409             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24410      new_path=`$CYGPATH -u "$path"`
24411    fi
24412    if test "x$new_path" = x; then
24413      # It's still not found. Now this is an unrecoverable error.
24414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24415$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24416      has_space=`$ECHO "$complete" | $GREP " "`
24417      if test "x$has_space" != x; then
24418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24420      fi
24421      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24422    fi
24423  fi
24424
24425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24428  # "foo.exe" is OK but "foo" is an error.
24429  #
24430  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24431  # It is also a way to make sure we got the proper file name for the real test later on.
24432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24433  if test "x$test_shortpath" = x; then
24434    # Short path failed, file does not exist as specified.
24435    # Try adding .exe or .cmd
24436    if test -f "${new_path}.exe"; then
24437       input_to_shortpath="${new_path}.exe"
24438    elif test -f "${new_path}.cmd"; then
24439       input_to_shortpath="${new_path}.cmd"
24440    else
24441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24442$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24443      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24444$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24445      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24446    fi
24447  else
24448    input_to_shortpath="$new_path"
24449  fi
24450
24451  # Call helper function which possibly converts this using DOS-style short mode.
24452  # If so, the updated path is stored in $new_path.
24453  new_path="$input_to_shortpath"
24454
24455  input_path="$input_to_shortpath"
24456  # Check if we need to convert this using DOS-style short mode. If the path
24457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24458  # take no chances and rewrite it.
24459  # Note: m4 eats our [], so we need to use [ and ] instead.
24460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24461  if test "x$has_forbidden_chars" != x; then
24462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24466      # Going to short mode and back again did indeed matter. Since short mode is
24467      # case insensitive, let's make it lowercase to improve readability.
24468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24469      # Now convert it back to Unix-stile (cygpath)
24470      input_path=`$CYGPATH -u "$shortmode_path"`
24471      new_path="$input_path"
24472    fi
24473  fi
24474
24475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24476  if test "x$test_cygdrive_prefix" = x; then
24477    # As a simple fix, exclude /usr/bin since it's not a real path.
24478    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24480      # a path prefixed by /cygdrive for fixpath to work.
24481      new_path="$CYGWIN_ROOT_PATH$input_path"
24482    fi
24483  fi
24484
24485  # remove trailing .exe if any
24486  new_path="${new_path/%.exe/}"
24487
24488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24489
24490  # First separate the path from the arguments. This will split at the first
24491  # space.
24492  complete="$WINAR"
24493  path="${complete%% *}"
24494  tmp="$complete EOL"
24495  arguments="${tmp#* }"
24496
24497  # Input might be given as Windows format, start by converting to
24498  # unix format.
24499  new_path="$path"
24500
24501  windows_path="$new_path"
24502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24503    unix_path=`$CYGPATH -u "$windows_path"`
24504    new_path="$unix_path"
24505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24507    new_path="$unix_path"
24508  fi
24509
24510
24511  # Now try to locate executable using which
24512  new_path=`$WHICH "$new_path" 2> /dev/null`
24513
24514  if test "x$new_path" = x; then
24515    # Oops. Which didn't find the executable.
24516    # The splitting of arguments from the executable at a space might have been incorrect,
24517    # since paths with space are more likely in Windows. Give it another try with the whole
24518    # argument.
24519    path="$complete"
24520    arguments="EOL"
24521    new_path="$path"
24522
24523  windows_path="$new_path"
24524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24525    unix_path=`$CYGPATH -u "$windows_path"`
24526    new_path="$unix_path"
24527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24529    new_path="$unix_path"
24530  fi
24531
24532
24533    new_path=`$WHICH "$new_path" 2> /dev/null`
24534
24535    if test "x$new_path" = x; then
24536      # It's still not found. Now this is an unrecoverable error.
24537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24538$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24539      has_space=`$ECHO "$complete" | $GREP " "`
24540      if test "x$has_space" != x; then
24541        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24542$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24543      fi
24544      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24545    fi
24546  fi
24547
24548  # Now new_path has a complete unix path to the binary
24549  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24550    # Keep paths in /bin as-is, but remove trailing .exe if any
24551    new_path="${new_path/%.exe/}"
24552    # Do not save /bin paths to all_fixpath_prefixes!
24553  else
24554    # Not in mixed or Windows style, start by that.
24555    new_path=`cmd //c echo $new_path`
24556
24557  input_path="$new_path"
24558  # Check if we need to convert this using DOS-style short mode. If the path
24559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24560  # take no chances and rewrite it.
24561  # Note: m4 eats our [], so we need to use [ and ] instead.
24562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24563  if test "x$has_forbidden_chars" != x; then
24564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24566  fi
24567
24568    # Output is in $new_path
24569
24570  windows_path="$new_path"
24571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24572    unix_path=`$CYGPATH -u "$windows_path"`
24573    new_path="$unix_path"
24574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24576    new_path="$unix_path"
24577  fi
24578
24579    # remove trailing .exe if any
24580    new_path="${new_path/%.exe/}"
24581
24582    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24583    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24584  fi
24585
24586  else
24587    # We're on a posix platform. Hooray! :)
24588    # First separate the path from the arguments. This will split at the first
24589    # space.
24590    complete="$WINAR"
24591    path="${complete%% *}"
24592    tmp="$complete EOL"
24593    arguments="${tmp#* }"
24594
24595    # Cannot rely on the command "which" here since it doesn't always work.
24596    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24597    if test -z "$is_absolute_path"; then
24598      # Path to executable is not absolute. Find it.
24599      IFS_save="$IFS"
24600      IFS=:
24601      for p in $PATH; do
24602        if test -f "$p/$path" && test -x "$p/$path"; then
24603          new_path="$p/$path"
24604          break
24605        fi
24606      done
24607      IFS="$IFS_save"
24608    else
24609      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24610$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24611      new_path="$path"
24612    fi
24613
24614    if test "x$new_path" = x; then
24615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24616$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24617        has_space=`$ECHO "$complete" | $GREP " "`
24618        if test "x$has_space" != x; then
24619          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24620$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24621        fi
24622        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24623      fi
24624  fi
24625
24626      # Now join together the path and the arguments once again
24627      if test "x$arguments" != xEOL; then
24628        new_complete="$new_path ${arguments% *}"
24629      else
24630        new_complete="$new_path"
24631      fi
24632
24633  if test "x$complete" != "x$new_complete"; then
24634      WINAR="$new_complete"
24635      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24636$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24637    fi
24638
24639    AR="$WINAR"
24640    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24641
24642    # Extract the first word of "dumpbin", so it can be a program name with args.
24643set dummy dumpbin; ac_word=$2
24644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24645$as_echo_n "checking for $ac_word... " >&6; }
24646if ${ac_cv_prog_DUMPBIN+:} false; then :
24647  $as_echo_n "(cached) " >&6
24648else
24649  if test -n "$DUMPBIN"; then
24650  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24651else
24652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24653for as_dir in $PATH
24654do
24655  IFS=$as_save_IFS
24656  test -z "$as_dir" && as_dir=.
24657    for ac_exec_ext in '' $ac_executable_extensions; do
24658  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24659    ac_cv_prog_DUMPBIN="dumpbin"
24660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24661    break 2
24662  fi
24663done
24664  done
24665IFS=$as_save_IFS
24666
24667fi
24668fi
24669DUMPBIN=$ac_cv_prog_DUMPBIN
24670if test -n "$DUMPBIN"; then
24671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24672$as_echo "$DUMPBIN" >&6; }
24673else
24674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24675$as_echo "no" >&6; }
24676fi
24677
24678
24679
24680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24681
24682  # First separate the path from the arguments. This will split at the first
24683  # space.
24684  complete="$DUMPBIN"
24685  path="${complete%% *}"
24686  tmp="$complete EOL"
24687  arguments="${tmp#* }"
24688
24689  # Input might be given as Windows format, start by converting to
24690  # unix format.
24691  new_path=`$CYGPATH -u "$path"`
24692
24693  # Now try to locate executable using which
24694  new_path=`$WHICH "$new_path" 2> /dev/null`
24695  # bat and cmd files are not always considered executable in cygwin causing which
24696  # to not find them
24697  if test "x$new_path" = x \
24698           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24699           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24700    new_path=`$CYGPATH -u "$path"`
24701  fi
24702  if test "x$new_path" = x; then
24703    # Oops. Which didn't find the executable.
24704    # The splitting of arguments from the executable at a space might have been incorrect,
24705    # since paths with space are more likely in Windows. Give it another try with the whole
24706    # argument.
24707    path="$complete"
24708    arguments="EOL"
24709    new_path=`$CYGPATH -u "$path"`
24710    new_path=`$WHICH "$new_path" 2> /dev/null`
24711    # bat and cmd files are not always considered executable in cygwin causing which
24712    # to not find them
24713    if test "x$new_path" = x \
24714             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24715             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24716      new_path=`$CYGPATH -u "$path"`
24717    fi
24718    if test "x$new_path" = x; then
24719      # It's still not found. Now this is an unrecoverable error.
24720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24721$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24722      has_space=`$ECHO "$complete" | $GREP " "`
24723      if test "x$has_space" != x; then
24724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24726      fi
24727      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24728    fi
24729  fi
24730
24731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24734  # "foo.exe" is OK but "foo" is an error.
24735  #
24736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24737  # It is also a way to make sure we got the proper file name for the real test later on.
24738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24739  if test "x$test_shortpath" = x; then
24740    # Short path failed, file does not exist as specified.
24741    # Try adding .exe or .cmd
24742    if test -f "${new_path}.exe"; then
24743       input_to_shortpath="${new_path}.exe"
24744    elif test -f "${new_path}.cmd"; then
24745       input_to_shortpath="${new_path}.cmd"
24746    else
24747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24748$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24749      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24750$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24751      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24752    fi
24753  else
24754    input_to_shortpath="$new_path"
24755  fi
24756
24757  # Call helper function which possibly converts this using DOS-style short mode.
24758  # If so, the updated path is stored in $new_path.
24759  new_path="$input_to_shortpath"
24760
24761  input_path="$input_to_shortpath"
24762  # Check if we need to convert this using DOS-style short mode. If the path
24763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24764  # take no chances and rewrite it.
24765  # Note: m4 eats our [], so we need to use [ and ] instead.
24766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24767  if test "x$has_forbidden_chars" != x; then
24768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24772      # Going to short mode and back again did indeed matter. Since short mode is
24773      # case insensitive, let's make it lowercase to improve readability.
24774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24775      # Now convert it back to Unix-stile (cygpath)
24776      input_path=`$CYGPATH -u "$shortmode_path"`
24777      new_path="$input_path"
24778    fi
24779  fi
24780
24781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24782  if test "x$test_cygdrive_prefix" = x; then
24783    # As a simple fix, exclude /usr/bin since it's not a real path.
24784    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24786      # a path prefixed by /cygdrive for fixpath to work.
24787      new_path="$CYGWIN_ROOT_PATH$input_path"
24788    fi
24789  fi
24790
24791  # remove trailing .exe if any
24792  new_path="${new_path/%.exe/}"
24793
24794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24795
24796  # First separate the path from the arguments. This will split at the first
24797  # space.
24798  complete="$DUMPBIN"
24799  path="${complete%% *}"
24800  tmp="$complete EOL"
24801  arguments="${tmp#* }"
24802
24803  # Input might be given as Windows format, start by converting to
24804  # unix format.
24805  new_path="$path"
24806
24807  windows_path="$new_path"
24808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24809    unix_path=`$CYGPATH -u "$windows_path"`
24810    new_path="$unix_path"
24811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24813    new_path="$unix_path"
24814  fi
24815
24816
24817  # Now try to locate executable using which
24818  new_path=`$WHICH "$new_path" 2> /dev/null`
24819
24820  if test "x$new_path" = x; then
24821    # Oops. Which didn't find the executable.
24822    # The splitting of arguments from the executable at a space might have been incorrect,
24823    # since paths with space are more likely in Windows. Give it another try with the whole
24824    # argument.
24825    path="$complete"
24826    arguments="EOL"
24827    new_path="$path"
24828
24829  windows_path="$new_path"
24830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24831    unix_path=`$CYGPATH -u "$windows_path"`
24832    new_path="$unix_path"
24833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24835    new_path="$unix_path"
24836  fi
24837
24838
24839    new_path=`$WHICH "$new_path" 2> /dev/null`
24840
24841    if test "x$new_path" = x; then
24842      # It's still not found. Now this is an unrecoverable error.
24843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24844$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24845      has_space=`$ECHO "$complete" | $GREP " "`
24846      if test "x$has_space" != x; then
24847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24849      fi
24850      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24851    fi
24852  fi
24853
24854  # Now new_path has a complete unix path to the binary
24855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24856    # Keep paths in /bin as-is, but remove trailing .exe if any
24857    new_path="${new_path/%.exe/}"
24858    # Do not save /bin paths to all_fixpath_prefixes!
24859  else
24860    # Not in mixed or Windows style, start by that.
24861    new_path=`cmd //c echo $new_path`
24862
24863  input_path="$new_path"
24864  # Check if we need to convert this using DOS-style short mode. If the path
24865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24866  # take no chances and rewrite it.
24867  # Note: m4 eats our [], so we need to use [ and ] instead.
24868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24869  if test "x$has_forbidden_chars" != x; then
24870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24872  fi
24873
24874    # Output is in $new_path
24875
24876  windows_path="$new_path"
24877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24878    unix_path=`$CYGPATH -u "$windows_path"`
24879    new_path="$unix_path"
24880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24882    new_path="$unix_path"
24883  fi
24884
24885    # remove trailing .exe if any
24886    new_path="${new_path/%.exe/}"
24887
24888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24890  fi
24891
24892  else
24893    # We're on a posix platform. Hooray! :)
24894    # First separate the path from the arguments. This will split at the first
24895    # space.
24896    complete="$DUMPBIN"
24897    path="${complete%% *}"
24898    tmp="$complete EOL"
24899    arguments="${tmp#* }"
24900
24901    # Cannot rely on the command "which" here since it doesn't always work.
24902    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24903    if test -z "$is_absolute_path"; then
24904      # Path to executable is not absolute. Find it.
24905      IFS_save="$IFS"
24906      IFS=:
24907      for p in $PATH; do
24908        if test -f "$p/$path" && test -x "$p/$path"; then
24909          new_path="$p/$path"
24910          break
24911        fi
24912      done
24913      IFS="$IFS_save"
24914    else
24915      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24916$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24917      new_path="$path"
24918    fi
24919
24920    if test "x$new_path" = x; then
24921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24922$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24923        has_space=`$ECHO "$complete" | $GREP " "`
24924        if test "x$has_space" != x; then
24925          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24926$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24927        fi
24928        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24929      fi
24930  fi
24931
24932      # Now join together the path and the arguments once again
24933      if test "x$arguments" != xEOL; then
24934        new_complete="$new_path ${arguments% *}"
24935      else
24936        new_complete="$new_path"
24937      fi
24938
24939  if test "x$complete" != "x$new_complete"; then
24940      DUMPBIN="$new_complete"
24941      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24942$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24943    fi
24944
24945
24946    COMPILER_TYPE=CL
24947    CCXXFLAGS="$CCXXFLAGS -nologo"
24948
24949fi
24950
24951
24952
24953ac_ext=c
24954ac_cpp='$CPP $CPPFLAGS'
24955ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24956ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24957ac_compiler_gnu=$ac_cv_c_compiler_gnu
24958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24959$as_echo_n "checking how to run the C preprocessor... " >&6; }
24960# On Suns, sometimes $CPP names a directory.
24961if test -n "$CPP" && test -d "$CPP"; then
24962  CPP=
24963fi
24964if test -z "$CPP"; then
24965  if ${ac_cv_prog_CPP+:} false; then :
24966  $as_echo_n "(cached) " >&6
24967else
24968      # Double quotes because CPP needs to be expanded
24969    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24970    do
24971      ac_preproc_ok=false
24972for ac_c_preproc_warn_flag in '' yes
24973do
24974  # Use a header file that comes with gcc, so configuring glibc
24975  # with a fresh cross-compiler works.
24976  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24977  # <limits.h> exists even on freestanding compilers.
24978  # On the NeXT, cc -E runs the code through the compiler's parser,
24979  # not just through cpp. "Syntax error" is here to catch this case.
24980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24981/* end confdefs.h.  */
24982#ifdef __STDC__
24983# include <limits.h>
24984#else
24985# include <assert.h>
24986#endif
24987		     Syntax error
24988_ACEOF
24989if ac_fn_c_try_cpp "$LINENO"; then :
24990
24991else
24992  # Broken: fails on valid input.
24993continue
24994fi
24995rm -f conftest.err conftest.i conftest.$ac_ext
24996
24997  # OK, works on sane cases.  Now check whether nonexistent headers
24998  # can be detected and how.
24999  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25000/* end confdefs.h.  */
25001#include <ac_nonexistent.h>
25002_ACEOF
25003if ac_fn_c_try_cpp "$LINENO"; then :
25004  # Broken: success on invalid input.
25005continue
25006else
25007  # Passes both tests.
25008ac_preproc_ok=:
25009break
25010fi
25011rm -f conftest.err conftest.i conftest.$ac_ext
25012
25013done
25014# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25015rm -f conftest.i conftest.err conftest.$ac_ext
25016if $ac_preproc_ok; then :
25017  break
25018fi
25019
25020    done
25021    ac_cv_prog_CPP=$CPP
25022
25023fi
25024  CPP=$ac_cv_prog_CPP
25025else
25026  ac_cv_prog_CPP=$CPP
25027fi
25028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
25029$as_echo "$CPP" >&6; }
25030ac_preproc_ok=false
25031for ac_c_preproc_warn_flag in '' yes
25032do
25033  # Use a header file that comes with gcc, so configuring glibc
25034  # with a fresh cross-compiler works.
25035  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25036  # <limits.h> exists even on freestanding compilers.
25037  # On the NeXT, cc -E runs the code through the compiler's parser,
25038  # not just through cpp. "Syntax error" is here to catch this case.
25039  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25040/* end confdefs.h.  */
25041#ifdef __STDC__
25042# include <limits.h>
25043#else
25044# include <assert.h>
25045#endif
25046		     Syntax error
25047_ACEOF
25048if ac_fn_c_try_cpp "$LINENO"; then :
25049
25050else
25051  # Broken: fails on valid input.
25052continue
25053fi
25054rm -f conftest.err conftest.i conftest.$ac_ext
25055
25056  # OK, works on sane cases.  Now check whether nonexistent headers
25057  # can be detected and how.
25058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25059/* end confdefs.h.  */
25060#include <ac_nonexistent.h>
25061_ACEOF
25062if ac_fn_c_try_cpp "$LINENO"; then :
25063  # Broken: success on invalid input.
25064continue
25065else
25066  # Passes both tests.
25067ac_preproc_ok=:
25068break
25069fi
25070rm -f conftest.err conftest.i conftest.$ac_ext
25071
25072done
25073# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25074rm -f conftest.i conftest.err conftest.$ac_ext
25075if $ac_preproc_ok; then :
25076
25077else
25078  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25080as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
25081See \`config.log' for more details" "$LINENO" 5; }
25082fi
25083
25084ac_ext=cpp
25085ac_cpp='$CXXCPP $CPPFLAGS'
25086ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25087ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25088ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25089
25090
25091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25092
25093  # First separate the path from the arguments. This will split at the first
25094  # space.
25095  complete="$CPP"
25096  path="${complete%% *}"
25097  tmp="$complete EOL"
25098  arguments="${tmp#* }"
25099
25100  # Input might be given as Windows format, start by converting to
25101  # unix format.
25102  new_path=`$CYGPATH -u "$path"`
25103
25104  # Now try to locate executable using which
25105  new_path=`$WHICH "$new_path" 2> /dev/null`
25106  # bat and cmd files are not always considered executable in cygwin causing which
25107  # to not find them
25108  if test "x$new_path" = x \
25109           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25110           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25111    new_path=`$CYGPATH -u "$path"`
25112  fi
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=`$CYGPATH -u "$path"`
25121    new_path=`$WHICH "$new_path" 2> /dev/null`
25122    # bat and cmd files are not always considered executable in cygwin causing which
25123    # to not find them
25124    if test "x$new_path" = x \
25125             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25126             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25127      new_path=`$CYGPATH -u "$path"`
25128    fi
25129    if test "x$new_path" = x; then
25130      # It's still not found. Now this is an unrecoverable error.
25131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25132$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25133      has_space=`$ECHO "$complete" | $GREP " "`
25134      if test "x$has_space" != x; then
25135        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25136$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25137      fi
25138      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25139    fi
25140  fi
25141
25142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25145  # "foo.exe" is OK but "foo" is an error.
25146  #
25147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25148  # It is also a way to make sure we got the proper file name for the real test later on.
25149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25150  if test "x$test_shortpath" = x; then
25151    # Short path failed, file does not exist as specified.
25152    # Try adding .exe or .cmd
25153    if test -f "${new_path}.exe"; then
25154       input_to_shortpath="${new_path}.exe"
25155    elif test -f "${new_path}.cmd"; then
25156       input_to_shortpath="${new_path}.cmd"
25157    else
25158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
25159$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
25160      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25161$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25162      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25163    fi
25164  else
25165    input_to_shortpath="$new_path"
25166  fi
25167
25168  # Call helper function which possibly converts this using DOS-style short mode.
25169  # If so, the updated path is stored in $new_path.
25170  new_path="$input_to_shortpath"
25171
25172  input_path="$input_to_shortpath"
25173  # Check if we need to convert this using DOS-style short mode. If the path
25174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25175  # take no chances and rewrite it.
25176  # Note: m4 eats our [], so we need to use [ and ] instead.
25177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25178  if test "x$has_forbidden_chars" != x; then
25179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25183      # Going to short mode and back again did indeed matter. Since short mode is
25184      # case insensitive, let's make it lowercase to improve readability.
25185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25186      # Now convert it back to Unix-stile (cygpath)
25187      input_path=`$CYGPATH -u "$shortmode_path"`
25188      new_path="$input_path"
25189    fi
25190  fi
25191
25192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25193  if test "x$test_cygdrive_prefix" = x; then
25194    # As a simple fix, exclude /usr/bin since it's not a real path.
25195    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25197      # a path prefixed by /cygdrive for fixpath to work.
25198      new_path="$CYGWIN_ROOT_PATH$input_path"
25199    fi
25200  fi
25201
25202  # remove trailing .exe if any
25203  new_path="${new_path/%.exe/}"
25204
25205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25206
25207  # First separate the path from the arguments. This will split at the first
25208  # space.
25209  complete="$CPP"
25210  path="${complete%% *}"
25211  tmp="$complete EOL"
25212  arguments="${tmp#* }"
25213
25214  # Input might be given as Windows format, start by converting to
25215  # unix format.
25216  new_path="$path"
25217
25218  windows_path="$new_path"
25219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25220    unix_path=`$CYGPATH -u "$windows_path"`
25221    new_path="$unix_path"
25222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25224    new_path="$unix_path"
25225  fi
25226
25227
25228  # Now try to locate executable using which
25229  new_path=`$WHICH "$new_path" 2> /dev/null`
25230
25231  if test "x$new_path" = x; then
25232    # Oops. Which didn't find the executable.
25233    # The splitting of arguments from the executable at a space might have been incorrect,
25234    # since paths with space are more likely in Windows. Give it another try with the whole
25235    # argument.
25236    path="$complete"
25237    arguments="EOL"
25238    new_path="$path"
25239
25240  windows_path="$new_path"
25241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25242    unix_path=`$CYGPATH -u "$windows_path"`
25243    new_path="$unix_path"
25244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25246    new_path="$unix_path"
25247  fi
25248
25249
25250    new_path=`$WHICH "$new_path" 2> /dev/null`
25251
25252    if test "x$new_path" = x; then
25253      # It's still not found. Now this is an unrecoverable error.
25254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25255$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25256      has_space=`$ECHO "$complete" | $GREP " "`
25257      if test "x$has_space" != x; then
25258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25260      fi
25261      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25262    fi
25263  fi
25264
25265  # Now new_path has a complete unix path to the binary
25266  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25267    # Keep paths in /bin as-is, but remove trailing .exe if any
25268    new_path="${new_path/%.exe/}"
25269    # Do not save /bin paths to all_fixpath_prefixes!
25270  else
25271    # Not in mixed or Windows style, start by that.
25272    new_path=`cmd //c echo $new_path`
25273
25274  input_path="$new_path"
25275  # Check if we need to convert this using DOS-style short mode. If the path
25276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25277  # take no chances and rewrite it.
25278  # Note: m4 eats our [], so we need to use [ and ] instead.
25279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25280  if test "x$has_forbidden_chars" != x; then
25281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25283  fi
25284
25285    # Output is in $new_path
25286
25287  windows_path="$new_path"
25288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25289    unix_path=`$CYGPATH -u "$windows_path"`
25290    new_path="$unix_path"
25291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25293    new_path="$unix_path"
25294  fi
25295
25296    # remove trailing .exe if any
25297    new_path="${new_path/%.exe/}"
25298
25299    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25300    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25301  fi
25302
25303  else
25304    # We're on a posix platform. Hooray! :)
25305    # First separate the path from the arguments. This will split at the first
25306    # space.
25307    complete="$CPP"
25308    path="${complete%% *}"
25309    tmp="$complete EOL"
25310    arguments="${tmp#* }"
25311
25312    # Cannot rely on the command "which" here since it doesn't always work.
25313    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25314    if test -z "$is_absolute_path"; then
25315      # Path to executable is not absolute. Find it.
25316      IFS_save="$IFS"
25317      IFS=:
25318      for p in $PATH; do
25319        if test -f "$p/$path" && test -x "$p/$path"; then
25320          new_path="$p/$path"
25321          break
25322        fi
25323      done
25324      IFS="$IFS_save"
25325    else
25326      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
25327$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
25328      new_path="$path"
25329    fi
25330
25331    if test "x$new_path" = x; then
25332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25333$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25334        has_space=`$ECHO "$complete" | $GREP " "`
25335        if test "x$has_space" != x; then
25336          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25337$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25338        fi
25339        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25340      fi
25341  fi
25342
25343      # Now join together the path and the arguments once again
25344      if test "x$arguments" != xEOL; then
25345        new_complete="$new_path ${arguments% *}"
25346      else
25347        new_complete="$new_path"
25348      fi
25349
25350  if test "x$complete" != "x$new_complete"; then
25351      CPP="$new_complete"
25352      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25353$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25354    fi
25355
25356
25357ac_ext=cpp
25358ac_cpp='$CXXCPP $CPPFLAGS'
25359ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25360ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25361ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25363$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25364if test -z "$CXXCPP"; then
25365  if ${ac_cv_prog_CXXCPP+:} false; then :
25366  $as_echo_n "(cached) " >&6
25367else
25368      # Double quotes because CXXCPP needs to be expanded
25369    for CXXCPP in "$CXX -E" "/lib/cpp"
25370    do
25371      ac_preproc_ok=false
25372for ac_cxx_preproc_warn_flag in '' yes
25373do
25374  # Use a header file that comes with gcc, so configuring glibc
25375  # with a fresh cross-compiler works.
25376  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25377  # <limits.h> exists even on freestanding compilers.
25378  # On the NeXT, cc -E runs the code through the compiler's parser,
25379  # not just through cpp. "Syntax error" is here to catch this case.
25380  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25381/* end confdefs.h.  */
25382#ifdef __STDC__
25383# include <limits.h>
25384#else
25385# include <assert.h>
25386#endif
25387		     Syntax error
25388_ACEOF
25389if ac_fn_cxx_try_cpp "$LINENO"; then :
25390
25391else
25392  # Broken: fails on valid input.
25393continue
25394fi
25395rm -f conftest.err conftest.i conftest.$ac_ext
25396
25397  # OK, works on sane cases.  Now check whether nonexistent headers
25398  # can be detected and how.
25399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25400/* end confdefs.h.  */
25401#include <ac_nonexistent.h>
25402_ACEOF
25403if ac_fn_cxx_try_cpp "$LINENO"; then :
25404  # Broken: success on invalid input.
25405continue
25406else
25407  # Passes both tests.
25408ac_preproc_ok=:
25409break
25410fi
25411rm -f conftest.err conftest.i conftest.$ac_ext
25412
25413done
25414# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25415rm -f conftest.i conftest.err conftest.$ac_ext
25416if $ac_preproc_ok; then :
25417  break
25418fi
25419
25420    done
25421    ac_cv_prog_CXXCPP=$CXXCPP
25422
25423fi
25424  CXXCPP=$ac_cv_prog_CXXCPP
25425else
25426  ac_cv_prog_CXXCPP=$CXXCPP
25427fi
25428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25429$as_echo "$CXXCPP" >&6; }
25430ac_preproc_ok=false
25431for ac_cxx_preproc_warn_flag in '' yes
25432do
25433  # Use a header file that comes with gcc, so configuring glibc
25434  # with a fresh cross-compiler works.
25435  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25436  # <limits.h> exists even on freestanding compilers.
25437  # On the NeXT, cc -E runs the code through the compiler's parser,
25438  # not just through cpp. "Syntax error" is here to catch this case.
25439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25440/* end confdefs.h.  */
25441#ifdef __STDC__
25442# include <limits.h>
25443#else
25444# include <assert.h>
25445#endif
25446		     Syntax error
25447_ACEOF
25448if ac_fn_cxx_try_cpp "$LINENO"; then :
25449
25450else
25451  # Broken: fails on valid input.
25452continue
25453fi
25454rm -f conftest.err conftest.i conftest.$ac_ext
25455
25456  # OK, works on sane cases.  Now check whether nonexistent headers
25457  # can be detected and how.
25458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25459/* end confdefs.h.  */
25460#include <ac_nonexistent.h>
25461_ACEOF
25462if ac_fn_cxx_try_cpp "$LINENO"; then :
25463  # Broken: success on invalid input.
25464continue
25465else
25466  # Passes both tests.
25467ac_preproc_ok=:
25468break
25469fi
25470rm -f conftest.err conftest.i conftest.$ac_ext
25471
25472done
25473# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25474rm -f conftest.i conftest.err conftest.$ac_ext
25475if $ac_preproc_ok; then :
25476
25477else
25478  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25479$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25480as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25481See \`config.log' for more details" "$LINENO" 5; }
25482fi
25483
25484ac_ext=cpp
25485ac_cpp='$CXXCPP $CPPFLAGS'
25486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25489
25490
25491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25492
25493  # First separate the path from the arguments. This will split at the first
25494  # space.
25495  complete="$CXXCPP"
25496  path="${complete%% *}"
25497  tmp="$complete EOL"
25498  arguments="${tmp#* }"
25499
25500  # Input might be given as Windows format, start by converting to
25501  # unix format.
25502  new_path=`$CYGPATH -u "$path"`
25503
25504  # Now try to locate executable using which
25505  new_path=`$WHICH "$new_path" 2> /dev/null`
25506  # bat and cmd files are not always considered executable in cygwin causing which
25507  # to not find them
25508  if test "x$new_path" = x \
25509           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25510           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25511    new_path=`$CYGPATH -u "$path"`
25512  fi
25513  if test "x$new_path" = x; then
25514    # Oops. Which didn't find the executable.
25515    # The splitting of arguments from the executable at a space might have been incorrect,
25516    # since paths with space are more likely in Windows. Give it another try with the whole
25517    # argument.
25518    path="$complete"
25519    arguments="EOL"
25520    new_path=`$CYGPATH -u "$path"`
25521    new_path=`$WHICH "$new_path" 2> /dev/null`
25522    # bat and cmd files are not always considered executable in cygwin causing which
25523    # to not find them
25524    if test "x$new_path" = x \
25525             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25526             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25527      new_path=`$CYGPATH -u "$path"`
25528    fi
25529    if test "x$new_path" = x; then
25530      # It's still not found. Now this is an unrecoverable error.
25531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25532$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25533      has_space=`$ECHO "$complete" | $GREP " "`
25534      if test "x$has_space" != x; then
25535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25537      fi
25538      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25539    fi
25540  fi
25541
25542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25545  # "foo.exe" is OK but "foo" is an error.
25546  #
25547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25548  # It is also a way to make sure we got the proper file name for the real test later on.
25549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25550  if test "x$test_shortpath" = x; then
25551    # Short path failed, file does not exist as specified.
25552    # Try adding .exe or .cmd
25553    if test -f "${new_path}.exe"; then
25554       input_to_shortpath="${new_path}.exe"
25555    elif test -f "${new_path}.cmd"; then
25556       input_to_shortpath="${new_path}.cmd"
25557    else
25558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25559$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25560      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25561$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25562      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25563    fi
25564  else
25565    input_to_shortpath="$new_path"
25566  fi
25567
25568  # Call helper function which possibly converts this using DOS-style short mode.
25569  # If so, the updated path is stored in $new_path.
25570  new_path="$input_to_shortpath"
25571
25572  input_path="$input_to_shortpath"
25573  # Check if we need to convert this using DOS-style short mode. If the path
25574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25575  # take no chances and rewrite it.
25576  # Note: m4 eats our [], so we need to use [ and ] instead.
25577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25578  if test "x$has_forbidden_chars" != x; then
25579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25583      # Going to short mode and back again did indeed matter. Since short mode is
25584      # case insensitive, let's make it lowercase to improve readability.
25585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25586      # Now convert it back to Unix-stile (cygpath)
25587      input_path=`$CYGPATH -u "$shortmode_path"`
25588      new_path="$input_path"
25589    fi
25590  fi
25591
25592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25593  if test "x$test_cygdrive_prefix" = x; then
25594    # As a simple fix, exclude /usr/bin since it's not a real path.
25595    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25597      # a path prefixed by /cygdrive for fixpath to work.
25598      new_path="$CYGWIN_ROOT_PATH$input_path"
25599    fi
25600  fi
25601
25602  # remove trailing .exe if any
25603  new_path="${new_path/%.exe/}"
25604
25605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25606
25607  # First separate the path from the arguments. This will split at the first
25608  # space.
25609  complete="$CXXCPP"
25610  path="${complete%% *}"
25611  tmp="$complete EOL"
25612  arguments="${tmp#* }"
25613
25614  # Input might be given as Windows format, start by converting to
25615  # unix format.
25616  new_path="$path"
25617
25618  windows_path="$new_path"
25619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25620    unix_path=`$CYGPATH -u "$windows_path"`
25621    new_path="$unix_path"
25622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25624    new_path="$unix_path"
25625  fi
25626
25627
25628  # Now try to locate executable using which
25629  new_path=`$WHICH "$new_path" 2> /dev/null`
25630
25631  if test "x$new_path" = x; then
25632    # Oops. Which didn't find the executable.
25633    # The splitting of arguments from the executable at a space might have been incorrect,
25634    # since paths with space are more likely in Windows. Give it another try with the whole
25635    # argument.
25636    path="$complete"
25637    arguments="EOL"
25638    new_path="$path"
25639
25640  windows_path="$new_path"
25641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25642    unix_path=`$CYGPATH -u "$windows_path"`
25643    new_path="$unix_path"
25644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25646    new_path="$unix_path"
25647  fi
25648
25649
25650    new_path=`$WHICH "$new_path" 2> /dev/null`
25651
25652    if test "x$new_path" = x; then
25653      # It's still not found. Now this is an unrecoverable error.
25654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25655$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25656      has_space=`$ECHO "$complete" | $GREP " "`
25657      if test "x$has_space" != x; then
25658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25660      fi
25661      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25662    fi
25663  fi
25664
25665  # Now new_path has a complete unix path to the binary
25666  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25667    # Keep paths in /bin as-is, but remove trailing .exe if any
25668    new_path="${new_path/%.exe/}"
25669    # Do not save /bin paths to all_fixpath_prefixes!
25670  else
25671    # Not in mixed or Windows style, start by that.
25672    new_path=`cmd //c echo $new_path`
25673
25674  input_path="$new_path"
25675  # Check if we need to convert this using DOS-style short mode. If the path
25676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25677  # take no chances and rewrite it.
25678  # Note: m4 eats our [], so we need to use [ and ] instead.
25679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25680  if test "x$has_forbidden_chars" != x; then
25681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25683  fi
25684
25685    # Output is in $new_path
25686
25687  windows_path="$new_path"
25688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25689    unix_path=`$CYGPATH -u "$windows_path"`
25690    new_path="$unix_path"
25691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25693    new_path="$unix_path"
25694  fi
25695
25696    # remove trailing .exe if any
25697    new_path="${new_path/%.exe/}"
25698
25699    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25700    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25701  fi
25702
25703  else
25704    # We're on a posix platform. Hooray! :)
25705    # First separate the path from the arguments. This will split at the first
25706    # space.
25707    complete="$CXXCPP"
25708    path="${complete%% *}"
25709    tmp="$complete EOL"
25710    arguments="${tmp#* }"
25711
25712    # Cannot rely on the command "which" here since it doesn't always work.
25713    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25714    if test -z "$is_absolute_path"; then
25715      # Path to executable is not absolute. Find it.
25716      IFS_save="$IFS"
25717      IFS=:
25718      for p in $PATH; do
25719        if test -f "$p/$path" && test -x "$p/$path"; then
25720          new_path="$p/$path"
25721          break
25722        fi
25723      done
25724      IFS="$IFS_save"
25725    else
25726      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25727$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25728      new_path="$path"
25729    fi
25730
25731    if test "x$new_path" = x; then
25732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25733$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25734        has_space=`$ECHO "$complete" | $GREP " "`
25735        if test "x$has_space" != x; then
25736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25738        fi
25739        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25740      fi
25741  fi
25742
25743      # Now join together the path and the arguments once again
25744      if test "x$arguments" != xEOL; then
25745        new_complete="$new_path ${arguments% *}"
25746      else
25747        new_complete="$new_path"
25748      fi
25749
25750  if test "x$complete" != "x$new_complete"; then
25751      CXXCPP="$new_complete"
25752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25753$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25754    fi
25755
25756
25757if test "x$COMPILE_TYPE" != "xcross"; then
25758    # If we are not cross compiling, use the same compilers for
25759    # building the build platform executables. The cross-compilation
25760    # case needed to be done earlier, but this can only be done after
25761    # the native tools have been localized.
25762    BUILD_CC="$CC"
25763    BUILD_CXX="$CXX"
25764    BUILD_LD="$LD"
25765fi
25766
25767# for solaris we really need solaris tools, and not gnu equivalent
25768#   these seems to normally reside in /usr/ccs/bin so add that to path before
25769#   starting to probe
25770#
25771#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25772#         so that it can be overriden --with-tools-dir
25773if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25774    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25775fi
25776
25777# Find the right assembler.
25778if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25779    # Extract the first word of "as", so it can be a program name with args.
25780set dummy as; ac_word=$2
25781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25782$as_echo_n "checking for $ac_word... " >&6; }
25783if ${ac_cv_path_AS+:} false; then :
25784  $as_echo_n "(cached) " >&6
25785else
25786  case $AS in
25787  [\\/]* | ?:[\\/]*)
25788  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25789  ;;
25790  *)
25791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25792for as_dir in $PATH
25793do
25794  IFS=$as_save_IFS
25795  test -z "$as_dir" && as_dir=.
25796    for ac_exec_ext in '' $ac_executable_extensions; do
25797  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25798    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25800    break 2
25801  fi
25802done
25803  done
25804IFS=$as_save_IFS
25805
25806  ;;
25807esac
25808fi
25809AS=$ac_cv_path_AS
25810if test -n "$AS"; then
25811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25812$as_echo "$AS" >&6; }
25813else
25814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25815$as_echo "no" >&6; }
25816fi
25817
25818
25819
25820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25821
25822  # First separate the path from the arguments. This will split at the first
25823  # space.
25824  complete="$AS"
25825  path="${complete%% *}"
25826  tmp="$complete EOL"
25827  arguments="${tmp#* }"
25828
25829  # Input might be given as Windows format, start by converting to
25830  # unix format.
25831  new_path=`$CYGPATH -u "$path"`
25832
25833  # Now try to locate executable using which
25834  new_path=`$WHICH "$new_path" 2> /dev/null`
25835  # bat and cmd files are not always considered executable in cygwin causing which
25836  # to not find them
25837  if test "x$new_path" = x \
25838           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25839           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25840    new_path=`$CYGPATH -u "$path"`
25841  fi
25842  if test "x$new_path" = x; then
25843    # Oops. Which didn't find the executable.
25844    # The splitting of arguments from the executable at a space might have been incorrect,
25845    # since paths with space are more likely in Windows. Give it another try with the whole
25846    # argument.
25847    path="$complete"
25848    arguments="EOL"
25849    new_path=`$CYGPATH -u "$path"`
25850    new_path=`$WHICH "$new_path" 2> /dev/null`
25851    # bat and cmd files are not always considered executable in cygwin causing which
25852    # to not find them
25853    if test "x$new_path" = x \
25854             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25855             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25856      new_path=`$CYGPATH -u "$path"`
25857    fi
25858    if test "x$new_path" = x; then
25859      # It's still not found. Now this is an unrecoverable error.
25860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25861$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25862      has_space=`$ECHO "$complete" | $GREP " "`
25863      if test "x$has_space" != x; then
25864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25866      fi
25867      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25868    fi
25869  fi
25870
25871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25874  # "foo.exe" is OK but "foo" is an error.
25875  #
25876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25877  # It is also a way to make sure we got the proper file name for the real test later on.
25878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25879  if test "x$test_shortpath" = x; then
25880    # Short path failed, file does not exist as specified.
25881    # Try adding .exe or .cmd
25882    if test -f "${new_path}.exe"; then
25883       input_to_shortpath="${new_path}.exe"
25884    elif test -f "${new_path}.cmd"; then
25885       input_to_shortpath="${new_path}.cmd"
25886    else
25887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25888$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25889      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25891      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25892    fi
25893  else
25894    input_to_shortpath="$new_path"
25895  fi
25896
25897  # Call helper function which possibly converts this using DOS-style short mode.
25898  # If so, the updated path is stored in $new_path.
25899  new_path="$input_to_shortpath"
25900
25901  input_path="$input_to_shortpath"
25902  # Check if we need to convert this using DOS-style short mode. If the path
25903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25904  # take no chances and rewrite it.
25905  # Note: m4 eats our [], so we need to use [ and ] instead.
25906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25907  if test "x$has_forbidden_chars" != x; then
25908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25912      # Going to short mode and back again did indeed matter. Since short mode is
25913      # case insensitive, let's make it lowercase to improve readability.
25914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25915      # Now convert it back to Unix-stile (cygpath)
25916      input_path=`$CYGPATH -u "$shortmode_path"`
25917      new_path="$input_path"
25918    fi
25919  fi
25920
25921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25922  if test "x$test_cygdrive_prefix" = x; then
25923    # As a simple fix, exclude /usr/bin since it's not a real path.
25924    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25926      # a path prefixed by /cygdrive for fixpath to work.
25927      new_path="$CYGWIN_ROOT_PATH$input_path"
25928    fi
25929  fi
25930
25931  # remove trailing .exe if any
25932  new_path="${new_path/%.exe/}"
25933
25934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25935
25936  # First separate the path from the arguments. This will split at the first
25937  # space.
25938  complete="$AS"
25939  path="${complete%% *}"
25940  tmp="$complete EOL"
25941  arguments="${tmp#* }"
25942
25943  # Input might be given as Windows format, start by converting to
25944  # unix format.
25945  new_path="$path"
25946
25947  windows_path="$new_path"
25948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25949    unix_path=`$CYGPATH -u "$windows_path"`
25950    new_path="$unix_path"
25951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25953    new_path="$unix_path"
25954  fi
25955
25956
25957  # Now try to locate executable using which
25958  new_path=`$WHICH "$new_path" 2> /dev/null`
25959
25960  if test "x$new_path" = x; then
25961    # Oops. Which didn't find the executable.
25962    # The splitting of arguments from the executable at a space might have been incorrect,
25963    # since paths with space are more likely in Windows. Give it another try with the whole
25964    # argument.
25965    path="$complete"
25966    arguments="EOL"
25967    new_path="$path"
25968
25969  windows_path="$new_path"
25970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25971    unix_path=`$CYGPATH -u "$windows_path"`
25972    new_path="$unix_path"
25973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25975    new_path="$unix_path"
25976  fi
25977
25978
25979    new_path=`$WHICH "$new_path" 2> /dev/null`
25980
25981    if test "x$new_path" = x; then
25982      # It's still not found. Now this is an unrecoverable error.
25983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25984$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25985      has_space=`$ECHO "$complete" | $GREP " "`
25986      if test "x$has_space" != x; then
25987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25989      fi
25990      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25991    fi
25992  fi
25993
25994  # Now new_path has a complete unix path to the binary
25995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25996    # Keep paths in /bin as-is, but remove trailing .exe if any
25997    new_path="${new_path/%.exe/}"
25998    # Do not save /bin paths to all_fixpath_prefixes!
25999  else
26000    # Not in mixed or Windows style, start by that.
26001    new_path=`cmd //c echo $new_path`
26002
26003  input_path="$new_path"
26004  # Check if we need to convert this using DOS-style short mode. If the path
26005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26006  # take no chances and rewrite it.
26007  # Note: m4 eats our [], so we need to use [ and ] instead.
26008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26009  if test "x$has_forbidden_chars" != x; then
26010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26012  fi
26013
26014    # Output is in $new_path
26015
26016  windows_path="$new_path"
26017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26018    unix_path=`$CYGPATH -u "$windows_path"`
26019    new_path="$unix_path"
26020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26022    new_path="$unix_path"
26023  fi
26024
26025    # remove trailing .exe if any
26026    new_path="${new_path/%.exe/}"
26027
26028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26030  fi
26031
26032  else
26033    # We're on a posix platform. Hooray! :)
26034    # First separate the path from the arguments. This will split at the first
26035    # space.
26036    complete="$AS"
26037    path="${complete%% *}"
26038    tmp="$complete EOL"
26039    arguments="${tmp#* }"
26040
26041    # Cannot rely on the command "which" here since it doesn't always work.
26042    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26043    if test -z "$is_absolute_path"; then
26044      # Path to executable is not absolute. Find it.
26045      IFS_save="$IFS"
26046      IFS=:
26047      for p in $PATH; do
26048        if test -f "$p/$path" && test -x "$p/$path"; then
26049          new_path="$p/$path"
26050          break
26051        fi
26052      done
26053      IFS="$IFS_save"
26054    else
26055      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
26056$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
26057      new_path="$path"
26058    fi
26059
26060    if test "x$new_path" = x; then
26061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
26062$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
26063        has_space=`$ECHO "$complete" | $GREP " "`
26064        if test "x$has_space" != x; then
26065          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26066$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26067        fi
26068        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
26069      fi
26070  fi
26071
26072      # Now join together the path and the arguments once again
26073      if test "x$arguments" != xEOL; then
26074        new_complete="$new_path ${arguments% *}"
26075      else
26076        new_complete="$new_path"
26077      fi
26078
26079  if test "x$complete" != "x$new_complete"; then
26080      AS="$new_complete"
26081      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
26082$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
26083    fi
26084
26085else
26086    AS="$CC -c"
26087fi
26088
26089
26090if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26091    # Extract the first word of "nm", so it can be a program name with args.
26092set dummy nm; ac_word=$2
26093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26094$as_echo_n "checking for $ac_word... " >&6; }
26095if ${ac_cv_path_NM+:} false; then :
26096  $as_echo_n "(cached) " >&6
26097else
26098  case $NM in
26099  [\\/]* | ?:[\\/]*)
26100  ac_cv_path_NM="$NM" # Let the user override the test with a path.
26101  ;;
26102  *)
26103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26104for as_dir in $PATH
26105do
26106  IFS=$as_save_IFS
26107  test -z "$as_dir" && as_dir=.
26108    for ac_exec_ext in '' $ac_executable_extensions; do
26109  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26110    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
26111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26112    break 2
26113  fi
26114done
26115  done
26116IFS=$as_save_IFS
26117
26118  ;;
26119esac
26120fi
26121NM=$ac_cv_path_NM
26122if test -n "$NM"; then
26123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26124$as_echo "$NM" >&6; }
26125else
26126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26127$as_echo "no" >&6; }
26128fi
26129
26130
26131
26132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26133
26134  # First separate the path from the arguments. This will split at the first
26135  # space.
26136  complete="$NM"
26137  path="${complete%% *}"
26138  tmp="$complete EOL"
26139  arguments="${tmp#* }"
26140
26141  # Input might be given as Windows format, start by converting to
26142  # unix format.
26143  new_path=`$CYGPATH -u "$path"`
26144
26145  # Now try to locate executable using which
26146  new_path=`$WHICH "$new_path" 2> /dev/null`
26147  # bat and cmd files are not always considered executable in cygwin causing which
26148  # to not find them
26149  if test "x$new_path" = x \
26150           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26151           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26152    new_path=`$CYGPATH -u "$path"`
26153  fi
26154  if test "x$new_path" = x; then
26155    # Oops. Which didn't find the executable.
26156    # The splitting of arguments from the executable at a space might have been incorrect,
26157    # since paths with space are more likely in Windows. Give it another try with the whole
26158    # argument.
26159    path="$complete"
26160    arguments="EOL"
26161    new_path=`$CYGPATH -u "$path"`
26162    new_path=`$WHICH "$new_path" 2> /dev/null`
26163    # bat and cmd files are not always considered executable in cygwin causing which
26164    # to not find them
26165    if test "x$new_path" = x \
26166             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26167             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26168      new_path=`$CYGPATH -u "$path"`
26169    fi
26170    if test "x$new_path" = x; then
26171      # It's still not found. Now this is an unrecoverable error.
26172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26173$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26174      has_space=`$ECHO "$complete" | $GREP " "`
26175      if test "x$has_space" != x; then
26176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26178      fi
26179      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26180    fi
26181  fi
26182
26183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26186  # "foo.exe" is OK but "foo" is an error.
26187  #
26188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26189  # It is also a way to make sure we got the proper file name for the real test later on.
26190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26191  if test "x$test_shortpath" = x; then
26192    # Short path failed, file does not exist as specified.
26193    # Try adding .exe or .cmd
26194    if test -f "${new_path}.exe"; then
26195       input_to_shortpath="${new_path}.exe"
26196    elif test -f "${new_path}.cmd"; then
26197       input_to_shortpath="${new_path}.cmd"
26198    else
26199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26200$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26201      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26202$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26203      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26204    fi
26205  else
26206    input_to_shortpath="$new_path"
26207  fi
26208
26209  # Call helper function which possibly converts this using DOS-style short mode.
26210  # If so, the updated path is stored in $new_path.
26211  new_path="$input_to_shortpath"
26212
26213  input_path="$input_to_shortpath"
26214  # Check if we need to convert this using DOS-style short mode. If the path
26215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26216  # take no chances and rewrite it.
26217  # Note: m4 eats our [], so we need to use [ and ] instead.
26218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26219  if test "x$has_forbidden_chars" != x; then
26220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26224      # Going to short mode and back again did indeed matter. Since short mode is
26225      # case insensitive, let's make it lowercase to improve readability.
26226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26227      # Now convert it back to Unix-stile (cygpath)
26228      input_path=`$CYGPATH -u "$shortmode_path"`
26229      new_path="$input_path"
26230    fi
26231  fi
26232
26233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26234  if test "x$test_cygdrive_prefix" = x; then
26235    # As a simple fix, exclude /usr/bin since it's not a real path.
26236    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26238      # a path prefixed by /cygdrive for fixpath to work.
26239      new_path="$CYGWIN_ROOT_PATH$input_path"
26240    fi
26241  fi
26242
26243  # remove trailing .exe if any
26244  new_path="${new_path/%.exe/}"
26245
26246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26247
26248  # First separate the path from the arguments. This will split at the first
26249  # space.
26250  complete="$NM"
26251  path="${complete%% *}"
26252  tmp="$complete EOL"
26253  arguments="${tmp#* }"
26254
26255  # Input might be given as Windows format, start by converting to
26256  # unix format.
26257  new_path="$path"
26258
26259  windows_path="$new_path"
26260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26261    unix_path=`$CYGPATH -u "$windows_path"`
26262    new_path="$unix_path"
26263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26265    new_path="$unix_path"
26266  fi
26267
26268
26269  # Now try to locate executable using which
26270  new_path=`$WHICH "$new_path" 2> /dev/null`
26271
26272  if test "x$new_path" = x; then
26273    # Oops. Which didn't find the executable.
26274    # The splitting of arguments from the executable at a space might have been incorrect,
26275    # since paths with space are more likely in Windows. Give it another try with the whole
26276    # argument.
26277    path="$complete"
26278    arguments="EOL"
26279    new_path="$path"
26280
26281  windows_path="$new_path"
26282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26283    unix_path=`$CYGPATH -u "$windows_path"`
26284    new_path="$unix_path"
26285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26287    new_path="$unix_path"
26288  fi
26289
26290
26291    new_path=`$WHICH "$new_path" 2> /dev/null`
26292
26293    if test "x$new_path" = x; then
26294      # It's still not found. Now this is an unrecoverable error.
26295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26296$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26297      has_space=`$ECHO "$complete" | $GREP " "`
26298      if test "x$has_space" != x; then
26299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26301      fi
26302      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26303    fi
26304  fi
26305
26306  # Now new_path has a complete unix path to the binary
26307  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26308    # Keep paths in /bin as-is, but remove trailing .exe if any
26309    new_path="${new_path/%.exe/}"
26310    # Do not save /bin paths to all_fixpath_prefixes!
26311  else
26312    # Not in mixed or Windows style, start by that.
26313    new_path=`cmd //c echo $new_path`
26314
26315  input_path="$new_path"
26316  # Check if we need to convert this using DOS-style short mode. If the path
26317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26318  # take no chances and rewrite it.
26319  # Note: m4 eats our [], so we need to use [ and ] instead.
26320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26321  if test "x$has_forbidden_chars" != x; then
26322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26324  fi
26325
26326    # Output is in $new_path
26327
26328  windows_path="$new_path"
26329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26330    unix_path=`$CYGPATH -u "$windows_path"`
26331    new_path="$unix_path"
26332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26334    new_path="$unix_path"
26335  fi
26336
26337    # remove trailing .exe if any
26338    new_path="${new_path/%.exe/}"
26339
26340    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26341    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26342  fi
26343
26344  else
26345    # We're on a posix platform. Hooray! :)
26346    # First separate the path from the arguments. This will split at the first
26347    # space.
26348    complete="$NM"
26349    path="${complete%% *}"
26350    tmp="$complete EOL"
26351    arguments="${tmp#* }"
26352
26353    # Cannot rely on the command "which" here since it doesn't always work.
26354    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26355    if test -z "$is_absolute_path"; then
26356      # Path to executable is not absolute. Find it.
26357      IFS_save="$IFS"
26358      IFS=:
26359      for p in $PATH; do
26360        if test -f "$p/$path" && test -x "$p/$path"; then
26361          new_path="$p/$path"
26362          break
26363        fi
26364      done
26365      IFS="$IFS_save"
26366    else
26367      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26368$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26369      new_path="$path"
26370    fi
26371
26372    if test "x$new_path" = x; then
26373        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26374$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26375        has_space=`$ECHO "$complete" | $GREP " "`
26376        if test "x$has_space" != x; then
26377          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26378$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26379        fi
26380        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26381      fi
26382  fi
26383
26384      # Now join together the path and the arguments once again
26385      if test "x$arguments" != xEOL; then
26386        new_complete="$new_path ${arguments% *}"
26387      else
26388        new_complete="$new_path"
26389      fi
26390
26391  if test "x$complete" != "x$new_complete"; then
26392      NM="$new_complete"
26393      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26394$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26395    fi
26396
26397    # Extract the first word of "gnm", so it can be a program name with args.
26398set dummy gnm; ac_word=$2
26399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26400$as_echo_n "checking for $ac_word... " >&6; }
26401if ${ac_cv_path_GNM+:} false; then :
26402  $as_echo_n "(cached) " >&6
26403else
26404  case $GNM in
26405  [\\/]* | ?:[\\/]*)
26406  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26407  ;;
26408  *)
26409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26410for as_dir in $PATH
26411do
26412  IFS=$as_save_IFS
26413  test -z "$as_dir" && as_dir=.
26414    for ac_exec_ext in '' $ac_executable_extensions; do
26415  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26416    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26418    break 2
26419  fi
26420done
26421  done
26422IFS=$as_save_IFS
26423
26424  ;;
26425esac
26426fi
26427GNM=$ac_cv_path_GNM
26428if test -n "$GNM"; then
26429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26430$as_echo "$GNM" >&6; }
26431else
26432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26433$as_echo "no" >&6; }
26434fi
26435
26436
26437
26438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26439
26440  # First separate the path from the arguments. This will split at the first
26441  # space.
26442  complete="$GNM"
26443  path="${complete%% *}"
26444  tmp="$complete EOL"
26445  arguments="${tmp#* }"
26446
26447  # Input might be given as Windows format, start by converting to
26448  # unix format.
26449  new_path=`$CYGPATH -u "$path"`
26450
26451  # Now try to locate executable using which
26452  new_path=`$WHICH "$new_path" 2> /dev/null`
26453  # bat and cmd files are not always considered executable in cygwin causing which
26454  # to not find them
26455  if test "x$new_path" = x \
26456           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26457           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26458    new_path=`$CYGPATH -u "$path"`
26459  fi
26460  if test "x$new_path" = x; then
26461    # Oops. Which didn't find the executable.
26462    # The splitting of arguments from the executable at a space might have been incorrect,
26463    # since paths with space are more likely in Windows. Give it another try with the whole
26464    # argument.
26465    path="$complete"
26466    arguments="EOL"
26467    new_path=`$CYGPATH -u "$path"`
26468    new_path=`$WHICH "$new_path" 2> /dev/null`
26469    # bat and cmd files are not always considered executable in cygwin causing which
26470    # to not find them
26471    if test "x$new_path" = x \
26472             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26473             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26474      new_path=`$CYGPATH -u "$path"`
26475    fi
26476    if test "x$new_path" = x; then
26477      # It's still not found. Now this is an unrecoverable error.
26478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26479$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26480      has_space=`$ECHO "$complete" | $GREP " "`
26481      if test "x$has_space" != x; then
26482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26484      fi
26485      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26486    fi
26487  fi
26488
26489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26492  # "foo.exe" is OK but "foo" is an error.
26493  #
26494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26495  # It is also a way to make sure we got the proper file name for the real test later on.
26496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26497  if test "x$test_shortpath" = x; then
26498    # Short path failed, file does not exist as specified.
26499    # Try adding .exe or .cmd
26500    if test -f "${new_path}.exe"; then
26501       input_to_shortpath="${new_path}.exe"
26502    elif test -f "${new_path}.cmd"; then
26503       input_to_shortpath="${new_path}.cmd"
26504    else
26505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26506$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26507      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26508$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26509      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26510    fi
26511  else
26512    input_to_shortpath="$new_path"
26513  fi
26514
26515  # Call helper function which possibly converts this using DOS-style short mode.
26516  # If so, the updated path is stored in $new_path.
26517  new_path="$input_to_shortpath"
26518
26519  input_path="$input_to_shortpath"
26520  # Check if we need to convert this using DOS-style short mode. If the path
26521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26522  # take no chances and rewrite it.
26523  # Note: m4 eats our [], so we need to use [ and ] instead.
26524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26525  if test "x$has_forbidden_chars" != x; then
26526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26530      # Going to short mode and back again did indeed matter. Since short mode is
26531      # case insensitive, let's make it lowercase to improve readability.
26532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26533      # Now convert it back to Unix-stile (cygpath)
26534      input_path=`$CYGPATH -u "$shortmode_path"`
26535      new_path="$input_path"
26536    fi
26537  fi
26538
26539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26540  if test "x$test_cygdrive_prefix" = x; then
26541    # As a simple fix, exclude /usr/bin since it's not a real path.
26542    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26544      # a path prefixed by /cygdrive for fixpath to work.
26545      new_path="$CYGWIN_ROOT_PATH$input_path"
26546    fi
26547  fi
26548
26549  # remove trailing .exe if any
26550  new_path="${new_path/%.exe/}"
26551
26552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26553
26554  # First separate the path from the arguments. This will split at the first
26555  # space.
26556  complete="$GNM"
26557  path="${complete%% *}"
26558  tmp="$complete EOL"
26559  arguments="${tmp#* }"
26560
26561  # Input might be given as Windows format, start by converting to
26562  # unix format.
26563  new_path="$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
26575  # Now try to locate executable using which
26576  new_path=`$WHICH "$new_path" 2> /dev/null`
26577
26578  if test "x$new_path" = x; then
26579    # Oops. Which didn't find the executable.
26580    # The splitting of arguments from the executable at a space might have been incorrect,
26581    # since paths with space are more likely in Windows. Give it another try with the whole
26582    # argument.
26583    path="$complete"
26584    arguments="EOL"
26585    new_path="$path"
26586
26587  windows_path="$new_path"
26588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26589    unix_path=`$CYGPATH -u "$windows_path"`
26590    new_path="$unix_path"
26591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26593    new_path="$unix_path"
26594  fi
26595
26596
26597    new_path=`$WHICH "$new_path" 2> /dev/null`
26598
26599    if test "x$new_path" = x; then
26600      # It's still not found. Now this is an unrecoverable error.
26601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26602$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26603      has_space=`$ECHO "$complete" | $GREP " "`
26604      if test "x$has_space" != x; then
26605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26607      fi
26608      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26609    fi
26610  fi
26611
26612  # Now new_path has a complete unix path to the binary
26613  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26614    # Keep paths in /bin as-is, but remove trailing .exe if any
26615    new_path="${new_path/%.exe/}"
26616    # Do not save /bin paths to all_fixpath_prefixes!
26617  else
26618    # Not in mixed or Windows style, start by that.
26619    new_path=`cmd //c echo $new_path`
26620
26621  input_path="$new_path"
26622  # Check if we need to convert this using DOS-style short mode. If the path
26623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26624  # take no chances and rewrite it.
26625  # Note: m4 eats our [], so we need to use [ and ] instead.
26626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26627  if test "x$has_forbidden_chars" != x; then
26628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26630  fi
26631
26632    # Output is in $new_path
26633
26634  windows_path="$new_path"
26635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26636    unix_path=`$CYGPATH -u "$windows_path"`
26637    new_path="$unix_path"
26638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26640    new_path="$unix_path"
26641  fi
26642
26643    # remove trailing .exe if any
26644    new_path="${new_path/%.exe/}"
26645
26646    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26647    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26648  fi
26649
26650  else
26651    # We're on a posix platform. Hooray! :)
26652    # First separate the path from the arguments. This will split at the first
26653    # space.
26654    complete="$GNM"
26655    path="${complete%% *}"
26656    tmp="$complete EOL"
26657    arguments="${tmp#* }"
26658
26659    # Cannot rely on the command "which" here since it doesn't always work.
26660    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26661    if test -z "$is_absolute_path"; then
26662      # Path to executable is not absolute. Find it.
26663      IFS_save="$IFS"
26664      IFS=:
26665      for p in $PATH; do
26666        if test -f "$p/$path" && test -x "$p/$path"; then
26667          new_path="$p/$path"
26668          break
26669        fi
26670      done
26671      IFS="$IFS_save"
26672    else
26673      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26674$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26675      new_path="$path"
26676    fi
26677
26678    if test "x$new_path" = x; then
26679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26680$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26681        has_space=`$ECHO "$complete" | $GREP " "`
26682        if test "x$has_space" != x; then
26683          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26684$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26685        fi
26686        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26687      fi
26688  fi
26689
26690      # Now join together the path and the arguments once again
26691      if test "x$arguments" != xEOL; then
26692        new_complete="$new_path ${arguments% *}"
26693      else
26694        new_complete="$new_path"
26695      fi
26696
26697  if test "x$complete" != "x$new_complete"; then
26698      GNM="$new_complete"
26699      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26700$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26701    fi
26702
26703    # Extract the first word of "strip", so it can be a program name with args.
26704set dummy strip; ac_word=$2
26705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26706$as_echo_n "checking for $ac_word... " >&6; }
26707if ${ac_cv_path_STRIP+:} false; then :
26708  $as_echo_n "(cached) " >&6
26709else
26710  case $STRIP in
26711  [\\/]* | ?:[\\/]*)
26712  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26713  ;;
26714  *)
26715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26716for as_dir in $PATH
26717do
26718  IFS=$as_save_IFS
26719  test -z "$as_dir" && as_dir=.
26720    for ac_exec_ext in '' $ac_executable_extensions; do
26721  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26722    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26724    break 2
26725  fi
26726done
26727  done
26728IFS=$as_save_IFS
26729
26730  ;;
26731esac
26732fi
26733STRIP=$ac_cv_path_STRIP
26734if test -n "$STRIP"; then
26735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26736$as_echo "$STRIP" >&6; }
26737else
26738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26739$as_echo "no" >&6; }
26740fi
26741
26742
26743
26744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26745
26746  # First separate the path from the arguments. This will split at the first
26747  # space.
26748  complete="$STRIP"
26749  path="${complete%% *}"
26750  tmp="$complete EOL"
26751  arguments="${tmp#* }"
26752
26753  # Input might be given as Windows format, start by converting to
26754  # unix format.
26755  new_path=`$CYGPATH -u "$path"`
26756
26757  # Now try to locate executable using which
26758  new_path=`$WHICH "$new_path" 2> /dev/null`
26759  # bat and cmd files are not always considered executable in cygwin causing which
26760  # to not find them
26761  if test "x$new_path" = x \
26762           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26763           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26764    new_path=`$CYGPATH -u "$path"`
26765  fi
26766  if test "x$new_path" = x; then
26767    # Oops. Which didn't find the executable.
26768    # The splitting of arguments from the executable at a space might have been incorrect,
26769    # since paths with space are more likely in Windows. Give it another try with the whole
26770    # argument.
26771    path="$complete"
26772    arguments="EOL"
26773    new_path=`$CYGPATH -u "$path"`
26774    new_path=`$WHICH "$new_path" 2> /dev/null`
26775    # bat and cmd files are not always considered executable in cygwin causing which
26776    # to not find them
26777    if test "x$new_path" = x \
26778             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26779             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26780      new_path=`$CYGPATH -u "$path"`
26781    fi
26782    if test "x$new_path" = x; then
26783      # It's still not found. Now this is an unrecoverable error.
26784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26785$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26786      has_space=`$ECHO "$complete" | $GREP " "`
26787      if test "x$has_space" != x; then
26788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26790      fi
26791      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26792    fi
26793  fi
26794
26795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26798  # "foo.exe" is OK but "foo" is an error.
26799  #
26800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26801  # It is also a way to make sure we got the proper file name for the real test later on.
26802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26803  if test "x$test_shortpath" = x; then
26804    # Short path failed, file does not exist as specified.
26805    # Try adding .exe or .cmd
26806    if test -f "${new_path}.exe"; then
26807       input_to_shortpath="${new_path}.exe"
26808    elif test -f "${new_path}.cmd"; then
26809       input_to_shortpath="${new_path}.cmd"
26810    else
26811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26812$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26815      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26816    fi
26817  else
26818    input_to_shortpath="$new_path"
26819  fi
26820
26821  # Call helper function which possibly converts this using DOS-style short mode.
26822  # If so, the updated path is stored in $new_path.
26823  new_path="$input_to_shortpath"
26824
26825  input_path="$input_to_shortpath"
26826  # Check if we need to convert this using DOS-style short mode. If the path
26827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26828  # take no chances and rewrite it.
26829  # Note: m4 eats our [], so we need to use [ and ] instead.
26830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26831  if test "x$has_forbidden_chars" != x; then
26832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26836      # Going to short mode and back again did indeed matter. Since short mode is
26837      # case insensitive, let's make it lowercase to improve readability.
26838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26839      # Now convert it back to Unix-stile (cygpath)
26840      input_path=`$CYGPATH -u "$shortmode_path"`
26841      new_path="$input_path"
26842    fi
26843  fi
26844
26845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26846  if test "x$test_cygdrive_prefix" = x; then
26847    # As a simple fix, exclude /usr/bin since it's not a real path.
26848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26850      # a path prefixed by /cygdrive for fixpath to work.
26851      new_path="$CYGWIN_ROOT_PATH$input_path"
26852    fi
26853  fi
26854
26855  # remove trailing .exe if any
26856  new_path="${new_path/%.exe/}"
26857
26858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26859
26860  # First separate the path from the arguments. This will split at the first
26861  # space.
26862  complete="$STRIP"
26863  path="${complete%% *}"
26864  tmp="$complete EOL"
26865  arguments="${tmp#* }"
26866
26867  # Input might be given as Windows format, start by converting to
26868  # unix format.
26869  new_path="$path"
26870
26871  windows_path="$new_path"
26872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26873    unix_path=`$CYGPATH -u "$windows_path"`
26874    new_path="$unix_path"
26875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26877    new_path="$unix_path"
26878  fi
26879
26880
26881  # Now try to locate executable using which
26882  new_path=`$WHICH "$new_path" 2> /dev/null`
26883
26884  if test "x$new_path" = x; then
26885    # Oops. Which didn't find the executable.
26886    # The splitting of arguments from the executable at a space might have been incorrect,
26887    # since paths with space are more likely in Windows. Give it another try with the whole
26888    # argument.
26889    path="$complete"
26890    arguments="EOL"
26891    new_path="$path"
26892
26893  windows_path="$new_path"
26894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26895    unix_path=`$CYGPATH -u "$windows_path"`
26896    new_path="$unix_path"
26897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26899    new_path="$unix_path"
26900  fi
26901
26902
26903    new_path=`$WHICH "$new_path" 2> /dev/null`
26904
26905    if test "x$new_path" = x; then
26906      # It's still not found. Now this is an unrecoverable error.
26907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26908$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26909      has_space=`$ECHO "$complete" | $GREP " "`
26910      if test "x$has_space" != x; then
26911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26913      fi
26914      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26915    fi
26916  fi
26917
26918  # Now new_path has a complete unix path to the binary
26919  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26920    # Keep paths in /bin as-is, but remove trailing .exe if any
26921    new_path="${new_path/%.exe/}"
26922    # Do not save /bin paths to all_fixpath_prefixes!
26923  else
26924    # Not in mixed or Windows style, start by that.
26925    new_path=`cmd //c echo $new_path`
26926
26927  input_path="$new_path"
26928  # Check if we need to convert this using DOS-style short mode. If the path
26929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26930  # take no chances and rewrite it.
26931  # Note: m4 eats our [], so we need to use [ and ] instead.
26932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26933  if test "x$has_forbidden_chars" != x; then
26934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26936  fi
26937
26938    # Output is in $new_path
26939
26940  windows_path="$new_path"
26941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26942    unix_path=`$CYGPATH -u "$windows_path"`
26943    new_path="$unix_path"
26944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26946    new_path="$unix_path"
26947  fi
26948
26949    # remove trailing .exe if any
26950    new_path="${new_path/%.exe/}"
26951
26952    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26953    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26954  fi
26955
26956  else
26957    # We're on a posix platform. Hooray! :)
26958    # First separate the path from the arguments. This will split at the first
26959    # space.
26960    complete="$STRIP"
26961    path="${complete%% *}"
26962    tmp="$complete EOL"
26963    arguments="${tmp#* }"
26964
26965    # Cannot rely on the command "which" here since it doesn't always work.
26966    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26967    if test -z "$is_absolute_path"; then
26968      # Path to executable is not absolute. Find it.
26969      IFS_save="$IFS"
26970      IFS=:
26971      for p in $PATH; do
26972        if test -f "$p/$path" && test -x "$p/$path"; then
26973          new_path="$p/$path"
26974          break
26975        fi
26976      done
26977      IFS="$IFS_save"
26978    else
26979      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26980$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26981      new_path="$path"
26982    fi
26983
26984    if test "x$new_path" = x; then
26985        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26986$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26987        has_space=`$ECHO "$complete" | $GREP " "`
26988        if test "x$has_space" != x; then
26989          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26990$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26991        fi
26992        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26993      fi
26994  fi
26995
26996      # Now join together the path and the arguments once again
26997      if test "x$arguments" != xEOL; then
26998        new_complete="$new_path ${arguments% *}"
26999      else
27000        new_complete="$new_path"
27001      fi
27002
27003  if test "x$complete" != "x$new_complete"; then
27004      STRIP="$new_complete"
27005      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27006$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27007    fi
27008
27009    # Extract the first word of "mcs", so it can be a program name with args.
27010set dummy mcs; ac_word=$2
27011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27012$as_echo_n "checking for $ac_word... " >&6; }
27013if ${ac_cv_path_MCS+:} false; then :
27014  $as_echo_n "(cached) " >&6
27015else
27016  case $MCS in
27017  [\\/]* | ?:[\\/]*)
27018  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
27019  ;;
27020  *)
27021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27022for as_dir in $PATH
27023do
27024  IFS=$as_save_IFS
27025  test -z "$as_dir" && as_dir=.
27026    for ac_exec_ext in '' $ac_executable_extensions; do
27027  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27028    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
27029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27030    break 2
27031  fi
27032done
27033  done
27034IFS=$as_save_IFS
27035
27036  ;;
27037esac
27038fi
27039MCS=$ac_cv_path_MCS
27040if test -n "$MCS"; then
27041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
27042$as_echo "$MCS" >&6; }
27043else
27044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27045$as_echo "no" >&6; }
27046fi
27047
27048
27049
27050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051
27052  # First separate the path from the arguments. This will split at the first
27053  # space.
27054  complete="$MCS"
27055  path="${complete%% *}"
27056  tmp="$complete EOL"
27057  arguments="${tmp#* }"
27058
27059  # Input might be given as Windows format, start by converting to
27060  # unix format.
27061  new_path=`$CYGPATH -u "$path"`
27062
27063  # Now try to locate executable using which
27064  new_path=`$WHICH "$new_path" 2> /dev/null`
27065  # bat and cmd files are not always considered executable in cygwin causing which
27066  # to not find them
27067  if test "x$new_path" = x \
27068           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27069           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27070    new_path=`$CYGPATH -u "$path"`
27071  fi
27072  if test "x$new_path" = x; then
27073    # Oops. Which didn't find the executable.
27074    # The splitting of arguments from the executable at a space might have been incorrect,
27075    # since paths with space are more likely in Windows. Give it another try with the whole
27076    # argument.
27077    path="$complete"
27078    arguments="EOL"
27079    new_path=`$CYGPATH -u "$path"`
27080    new_path=`$WHICH "$new_path" 2> /dev/null`
27081    # bat and cmd files are not always considered executable in cygwin causing which
27082    # to not find them
27083    if test "x$new_path" = x \
27084             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27085             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27086      new_path=`$CYGPATH -u "$path"`
27087    fi
27088    if test "x$new_path" = x; then
27089      # It's still not found. Now this is an unrecoverable error.
27090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27091$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27092      has_space=`$ECHO "$complete" | $GREP " "`
27093      if test "x$has_space" != x; then
27094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27096      fi
27097      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27098    fi
27099  fi
27100
27101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27104  # "foo.exe" is OK but "foo" is an error.
27105  #
27106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27107  # It is also a way to make sure we got the proper file name for the real test later on.
27108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27109  if test "x$test_shortpath" = x; then
27110    # Short path failed, file does not exist as specified.
27111    # Try adding .exe or .cmd
27112    if test -f "${new_path}.exe"; then
27113       input_to_shortpath="${new_path}.exe"
27114    elif test -f "${new_path}.cmd"; then
27115       input_to_shortpath="${new_path}.cmd"
27116    else
27117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
27118$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
27119      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27120$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27121      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27122    fi
27123  else
27124    input_to_shortpath="$new_path"
27125  fi
27126
27127  # Call helper function which possibly converts this using DOS-style short mode.
27128  # If so, the updated path is stored in $new_path.
27129  new_path="$input_to_shortpath"
27130
27131  input_path="$input_to_shortpath"
27132  # Check if we need to convert this using DOS-style short mode. If the path
27133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27134  # take no chances and rewrite it.
27135  # Note: m4 eats our [], so we need to use [ and ] instead.
27136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27137  if test "x$has_forbidden_chars" != x; then
27138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27142      # Going to short mode and back again did indeed matter. Since short mode is
27143      # case insensitive, let's make it lowercase to improve readability.
27144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27145      # Now convert it back to Unix-stile (cygpath)
27146      input_path=`$CYGPATH -u "$shortmode_path"`
27147      new_path="$input_path"
27148    fi
27149  fi
27150
27151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27152  if test "x$test_cygdrive_prefix" = x; then
27153    # As a simple fix, exclude /usr/bin since it's not a real path.
27154    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27156      # a path prefixed by /cygdrive for fixpath to work.
27157      new_path="$CYGWIN_ROOT_PATH$input_path"
27158    fi
27159  fi
27160
27161  # remove trailing .exe if any
27162  new_path="${new_path/%.exe/}"
27163
27164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27165
27166  # First separate the path from the arguments. This will split at the first
27167  # space.
27168  complete="$MCS"
27169  path="${complete%% *}"
27170  tmp="$complete EOL"
27171  arguments="${tmp#* }"
27172
27173  # Input might be given as Windows format, start by converting to
27174  # unix format.
27175  new_path="$path"
27176
27177  windows_path="$new_path"
27178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27179    unix_path=`$CYGPATH -u "$windows_path"`
27180    new_path="$unix_path"
27181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27183    new_path="$unix_path"
27184  fi
27185
27186
27187  # Now try to locate executable using which
27188  new_path=`$WHICH "$new_path" 2> /dev/null`
27189
27190  if test "x$new_path" = x; then
27191    # Oops. Which didn't find the executable.
27192    # The splitting of arguments from the executable at a space might have been incorrect,
27193    # since paths with space are more likely in Windows. Give it another try with the whole
27194    # argument.
27195    path="$complete"
27196    arguments="EOL"
27197    new_path="$path"
27198
27199  windows_path="$new_path"
27200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27201    unix_path=`$CYGPATH -u "$windows_path"`
27202    new_path="$unix_path"
27203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27205    new_path="$unix_path"
27206  fi
27207
27208
27209    new_path=`$WHICH "$new_path" 2> /dev/null`
27210
27211    if test "x$new_path" = x; then
27212      # It's still not found. Now this is an unrecoverable error.
27213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27214$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27215      has_space=`$ECHO "$complete" | $GREP " "`
27216      if test "x$has_space" != x; then
27217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27219      fi
27220      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27221    fi
27222  fi
27223
27224  # Now new_path has a complete unix path to the binary
27225  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27226    # Keep paths in /bin as-is, but remove trailing .exe if any
27227    new_path="${new_path/%.exe/}"
27228    # Do not save /bin paths to all_fixpath_prefixes!
27229  else
27230    # Not in mixed or Windows style, start by that.
27231    new_path=`cmd //c echo $new_path`
27232
27233  input_path="$new_path"
27234  # Check if we need to convert this using DOS-style short mode. If the path
27235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27236  # take no chances and rewrite it.
27237  # Note: m4 eats our [], so we need to use [ and ] instead.
27238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27239  if test "x$has_forbidden_chars" != x; then
27240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27242  fi
27243
27244    # Output is in $new_path
27245
27246  windows_path="$new_path"
27247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27248    unix_path=`$CYGPATH -u "$windows_path"`
27249    new_path="$unix_path"
27250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27252    new_path="$unix_path"
27253  fi
27254
27255    # remove trailing .exe if any
27256    new_path="${new_path/%.exe/}"
27257
27258    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27259    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27260  fi
27261
27262  else
27263    # We're on a posix platform. Hooray! :)
27264    # First separate the path from the arguments. This will split at the first
27265    # space.
27266    complete="$MCS"
27267    path="${complete%% *}"
27268    tmp="$complete EOL"
27269    arguments="${tmp#* }"
27270
27271    # Cannot rely on the command "which" here since it doesn't always work.
27272    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27273    if test -z "$is_absolute_path"; then
27274      # Path to executable is not absolute. Find it.
27275      IFS_save="$IFS"
27276      IFS=:
27277      for p in $PATH; do
27278        if test -f "$p/$path" && test -x "$p/$path"; then
27279          new_path="$p/$path"
27280          break
27281        fi
27282      done
27283      IFS="$IFS_save"
27284    else
27285      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
27286$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
27287      new_path="$path"
27288    fi
27289
27290    if test "x$new_path" = x; then
27291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27292$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27293        has_space=`$ECHO "$complete" | $GREP " "`
27294        if test "x$has_space" != x; then
27295          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27296$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27297        fi
27298        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27299      fi
27300  fi
27301
27302      # Now join together the path and the arguments once again
27303      if test "x$arguments" != xEOL; then
27304        new_complete="$new_path ${arguments% *}"
27305      else
27306        new_complete="$new_path"
27307      fi
27308
27309  if test "x$complete" != "x$new_complete"; then
27310      MCS="$new_complete"
27311      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
27312$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
27313    fi
27314
27315elif test "x$OPENJDK_TARGET_OS" != xwindows; then
27316    if test -n "$ac_tool_prefix"; then
27317  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
27318set dummy ${ac_tool_prefix}nm; ac_word=$2
27319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27320$as_echo_n "checking for $ac_word... " >&6; }
27321if ${ac_cv_prog_NM+:} false; then :
27322  $as_echo_n "(cached) " >&6
27323else
27324  if test -n "$NM"; then
27325  ac_cv_prog_NM="$NM" # Let the user override the test.
27326else
27327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27328for as_dir in $PATH
27329do
27330  IFS=$as_save_IFS
27331  test -z "$as_dir" && as_dir=.
27332    for ac_exec_ext in '' $ac_executable_extensions; do
27333  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27334    ac_cv_prog_NM="${ac_tool_prefix}nm"
27335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27336    break 2
27337  fi
27338done
27339  done
27340IFS=$as_save_IFS
27341
27342fi
27343fi
27344NM=$ac_cv_prog_NM
27345if test -n "$NM"; then
27346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27347$as_echo "$NM" >&6; }
27348else
27349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27350$as_echo "no" >&6; }
27351fi
27352
27353
27354fi
27355if test -z "$ac_cv_prog_NM"; then
27356  ac_ct_NM=$NM
27357  # Extract the first word of "nm", so it can be a program name with args.
27358set dummy nm; ac_word=$2
27359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27360$as_echo_n "checking for $ac_word... " >&6; }
27361if ${ac_cv_prog_ac_ct_NM+:} false; then :
27362  $as_echo_n "(cached) " >&6
27363else
27364  if test -n "$ac_ct_NM"; then
27365  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27366else
27367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27368for as_dir in $PATH
27369do
27370  IFS=$as_save_IFS
27371  test -z "$as_dir" && as_dir=.
27372    for ac_exec_ext in '' $ac_executable_extensions; do
27373  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27374    ac_cv_prog_ac_ct_NM="nm"
27375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27376    break 2
27377  fi
27378done
27379  done
27380IFS=$as_save_IFS
27381
27382fi
27383fi
27384ac_ct_NM=$ac_cv_prog_ac_ct_NM
27385if test -n "$ac_ct_NM"; then
27386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27387$as_echo "$ac_ct_NM" >&6; }
27388else
27389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27390$as_echo "no" >&6; }
27391fi
27392
27393  if test "x$ac_ct_NM" = x; then
27394    NM=""
27395  else
27396    case $cross_compiling:$ac_tool_warned in
27397yes:)
27398{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27399$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27400ac_tool_warned=yes ;;
27401esac
27402    NM=$ac_ct_NM
27403  fi
27404else
27405  NM="$ac_cv_prog_NM"
27406fi
27407
27408
27409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27410
27411  # First separate the path from the arguments. This will split at the first
27412  # space.
27413  complete="$NM"
27414  path="${complete%% *}"
27415  tmp="$complete EOL"
27416  arguments="${tmp#* }"
27417
27418  # Input might be given as Windows format, start by converting to
27419  # unix format.
27420  new_path=`$CYGPATH -u "$path"`
27421
27422  # Now try to locate executable using which
27423  new_path=`$WHICH "$new_path" 2> /dev/null`
27424  # bat and cmd files are not always considered executable in cygwin causing which
27425  # to not find them
27426  if test "x$new_path" = x \
27427           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27428           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27429    new_path=`$CYGPATH -u "$path"`
27430  fi
27431  if test "x$new_path" = x; then
27432    # Oops. Which didn't find the executable.
27433    # The splitting of arguments from the executable at a space might have been incorrect,
27434    # since paths with space are more likely in Windows. Give it another try with the whole
27435    # argument.
27436    path="$complete"
27437    arguments="EOL"
27438    new_path=`$CYGPATH -u "$path"`
27439    new_path=`$WHICH "$new_path" 2> /dev/null`
27440    # bat and cmd files are not always considered executable in cygwin causing which
27441    # to not find them
27442    if test "x$new_path" = x \
27443             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27444             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27445      new_path=`$CYGPATH -u "$path"`
27446    fi
27447    if test "x$new_path" = x; then
27448      # It's still not found. Now this is an unrecoverable error.
27449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27450$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27451      has_space=`$ECHO "$complete" | $GREP " "`
27452      if test "x$has_space" != x; then
27453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27455      fi
27456      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27457    fi
27458  fi
27459
27460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27463  # "foo.exe" is OK but "foo" is an error.
27464  #
27465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27466  # It is also a way to make sure we got the proper file name for the real test later on.
27467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27468  if test "x$test_shortpath" = x; then
27469    # Short path failed, file does not exist as specified.
27470    # Try adding .exe or .cmd
27471    if test -f "${new_path}.exe"; then
27472       input_to_shortpath="${new_path}.exe"
27473    elif test -f "${new_path}.cmd"; then
27474       input_to_shortpath="${new_path}.cmd"
27475    else
27476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27477$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27478      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27479$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27480      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27481    fi
27482  else
27483    input_to_shortpath="$new_path"
27484  fi
27485
27486  # Call helper function which possibly converts this using DOS-style short mode.
27487  # If so, the updated path is stored in $new_path.
27488  new_path="$input_to_shortpath"
27489
27490  input_path="$input_to_shortpath"
27491  # Check if we need to convert this using DOS-style short mode. If the path
27492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27493  # take no chances and rewrite it.
27494  # Note: m4 eats our [], so we need to use [ and ] instead.
27495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27496  if test "x$has_forbidden_chars" != x; then
27497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27501      # Going to short mode and back again did indeed matter. Since short mode is
27502      # case insensitive, let's make it lowercase to improve readability.
27503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27504      # Now convert it back to Unix-stile (cygpath)
27505      input_path=`$CYGPATH -u "$shortmode_path"`
27506      new_path="$input_path"
27507    fi
27508  fi
27509
27510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27511  if test "x$test_cygdrive_prefix" = x; then
27512    # As a simple fix, exclude /usr/bin since it's not a real path.
27513    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27515      # a path prefixed by /cygdrive for fixpath to work.
27516      new_path="$CYGWIN_ROOT_PATH$input_path"
27517    fi
27518  fi
27519
27520  # remove trailing .exe if any
27521  new_path="${new_path/%.exe/}"
27522
27523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27524
27525  # First separate the path from the arguments. This will split at the first
27526  # space.
27527  complete="$NM"
27528  path="${complete%% *}"
27529  tmp="$complete EOL"
27530  arguments="${tmp#* }"
27531
27532  # Input might be given as Windows format, start by converting to
27533  # unix format.
27534  new_path="$path"
27535
27536  windows_path="$new_path"
27537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27538    unix_path=`$CYGPATH -u "$windows_path"`
27539    new_path="$unix_path"
27540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27542    new_path="$unix_path"
27543  fi
27544
27545
27546  # Now try to locate executable using which
27547  new_path=`$WHICH "$new_path" 2> /dev/null`
27548
27549  if test "x$new_path" = x; then
27550    # Oops. Which didn't find the executable.
27551    # The splitting of arguments from the executable at a space might have been incorrect,
27552    # since paths with space are more likely in Windows. Give it another try with the whole
27553    # argument.
27554    path="$complete"
27555    arguments="EOL"
27556    new_path="$path"
27557
27558  windows_path="$new_path"
27559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27560    unix_path=`$CYGPATH -u "$windows_path"`
27561    new_path="$unix_path"
27562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27564    new_path="$unix_path"
27565  fi
27566
27567
27568    new_path=`$WHICH "$new_path" 2> /dev/null`
27569
27570    if test "x$new_path" = x; then
27571      # It's still not found. Now this is an unrecoverable error.
27572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27573$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27574      has_space=`$ECHO "$complete" | $GREP " "`
27575      if test "x$has_space" != x; then
27576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27578      fi
27579      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27580    fi
27581  fi
27582
27583  # Now new_path has a complete unix path to the binary
27584  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27585    # Keep paths in /bin as-is, but remove trailing .exe if any
27586    new_path="${new_path/%.exe/}"
27587    # Do not save /bin paths to all_fixpath_prefixes!
27588  else
27589    # Not in mixed or Windows style, start by that.
27590    new_path=`cmd //c echo $new_path`
27591
27592  input_path="$new_path"
27593  # Check if we need to convert this using DOS-style short mode. If the path
27594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27595  # take no chances and rewrite it.
27596  # Note: m4 eats our [], so we need to use [ and ] instead.
27597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27598  if test "x$has_forbidden_chars" != x; then
27599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27601  fi
27602
27603    # Output is in $new_path
27604
27605  windows_path="$new_path"
27606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27607    unix_path=`$CYGPATH -u "$windows_path"`
27608    new_path="$unix_path"
27609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27611    new_path="$unix_path"
27612  fi
27613
27614    # remove trailing .exe if any
27615    new_path="${new_path/%.exe/}"
27616
27617    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27618    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27619  fi
27620
27621  else
27622    # We're on a posix platform. Hooray! :)
27623    # First separate the path from the arguments. This will split at the first
27624    # space.
27625    complete="$NM"
27626    path="${complete%% *}"
27627    tmp="$complete EOL"
27628    arguments="${tmp#* }"
27629
27630    # Cannot rely on the command "which" here since it doesn't always work.
27631    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27632    if test -z "$is_absolute_path"; then
27633      # Path to executable is not absolute. Find it.
27634      IFS_save="$IFS"
27635      IFS=:
27636      for p in $PATH; do
27637        if test -f "$p/$path" && test -x "$p/$path"; then
27638          new_path="$p/$path"
27639          break
27640        fi
27641      done
27642      IFS="$IFS_save"
27643    else
27644      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27645$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27646      new_path="$path"
27647    fi
27648
27649    if test "x$new_path" = x; then
27650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27651$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27652        has_space=`$ECHO "$complete" | $GREP " "`
27653        if test "x$has_space" != x; then
27654          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27655$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27656        fi
27657        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27658      fi
27659  fi
27660
27661      # Now join together the path and the arguments once again
27662      if test "x$arguments" != xEOL; then
27663        new_complete="$new_path ${arguments% *}"
27664      else
27665        new_complete="$new_path"
27666      fi
27667
27668  if test "x$complete" != "x$new_complete"; then
27669      NM="$new_complete"
27670      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27671$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27672    fi
27673
27674    GNM="$NM"
27675
27676    if test -n "$ac_tool_prefix"; then
27677  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27678set dummy ${ac_tool_prefix}strip; ac_word=$2
27679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27680$as_echo_n "checking for $ac_word... " >&6; }
27681if ${ac_cv_prog_STRIP+:} false; then :
27682  $as_echo_n "(cached) " >&6
27683else
27684  if test -n "$STRIP"; then
27685  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27686else
27687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27688for as_dir in $PATH
27689do
27690  IFS=$as_save_IFS
27691  test -z "$as_dir" && as_dir=.
27692    for ac_exec_ext in '' $ac_executable_extensions; do
27693  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27694    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27696    break 2
27697  fi
27698done
27699  done
27700IFS=$as_save_IFS
27701
27702fi
27703fi
27704STRIP=$ac_cv_prog_STRIP
27705if test -n "$STRIP"; then
27706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27707$as_echo "$STRIP" >&6; }
27708else
27709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27710$as_echo "no" >&6; }
27711fi
27712
27713
27714fi
27715if test -z "$ac_cv_prog_STRIP"; then
27716  ac_ct_STRIP=$STRIP
27717  # Extract the first word of "strip", so it can be a program name with args.
27718set dummy strip; ac_word=$2
27719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27720$as_echo_n "checking for $ac_word... " >&6; }
27721if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27722  $as_echo_n "(cached) " >&6
27723else
27724  if test -n "$ac_ct_STRIP"; then
27725  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27726else
27727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27728for as_dir in $PATH
27729do
27730  IFS=$as_save_IFS
27731  test -z "$as_dir" && as_dir=.
27732    for ac_exec_ext in '' $ac_executable_extensions; do
27733  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27734    ac_cv_prog_ac_ct_STRIP="strip"
27735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27736    break 2
27737  fi
27738done
27739  done
27740IFS=$as_save_IFS
27741
27742fi
27743fi
27744ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27745if test -n "$ac_ct_STRIP"; then
27746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27747$as_echo "$ac_ct_STRIP" >&6; }
27748else
27749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27750$as_echo "no" >&6; }
27751fi
27752
27753  if test "x$ac_ct_STRIP" = x; then
27754    STRIP=""
27755  else
27756    case $cross_compiling:$ac_tool_warned in
27757yes:)
27758{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27759$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27760ac_tool_warned=yes ;;
27761esac
27762    STRIP=$ac_ct_STRIP
27763  fi
27764else
27765  STRIP="$ac_cv_prog_STRIP"
27766fi
27767
27768
27769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27770
27771  # First separate the path from the arguments. This will split at the first
27772  # space.
27773  complete="$STRIP"
27774  path="${complete%% *}"
27775  tmp="$complete EOL"
27776  arguments="${tmp#* }"
27777
27778  # Input might be given as Windows format, start by converting to
27779  # unix format.
27780  new_path=`$CYGPATH -u "$path"`
27781
27782  # Now try to locate executable using which
27783  new_path=`$WHICH "$new_path" 2> /dev/null`
27784  # bat and cmd files are not always considered executable in cygwin causing which
27785  # to not find them
27786  if test "x$new_path" = x \
27787           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27788           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27789    new_path=`$CYGPATH -u "$path"`
27790  fi
27791  if test "x$new_path" = x; then
27792    # Oops. Which didn't find the executable.
27793    # The splitting of arguments from the executable at a space might have been incorrect,
27794    # since paths with space are more likely in Windows. Give it another try with the whole
27795    # argument.
27796    path="$complete"
27797    arguments="EOL"
27798    new_path=`$CYGPATH -u "$path"`
27799    new_path=`$WHICH "$new_path" 2> /dev/null`
27800    # bat and cmd files are not always considered executable in cygwin causing which
27801    # to not find them
27802    if test "x$new_path" = x \
27803             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27804             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27805      new_path=`$CYGPATH -u "$path"`
27806    fi
27807    if test "x$new_path" = x; then
27808      # It's still not found. Now this is an unrecoverable error.
27809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27810$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27811      has_space=`$ECHO "$complete" | $GREP " "`
27812      if test "x$has_space" != x; then
27813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27815      fi
27816      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27817    fi
27818  fi
27819
27820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27823  # "foo.exe" is OK but "foo" is an error.
27824  #
27825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27826  # It is also a way to make sure we got the proper file name for the real test later on.
27827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27828  if test "x$test_shortpath" = x; then
27829    # Short path failed, file does not exist as specified.
27830    # Try adding .exe or .cmd
27831    if test -f "${new_path}.exe"; then
27832       input_to_shortpath="${new_path}.exe"
27833    elif test -f "${new_path}.cmd"; then
27834       input_to_shortpath="${new_path}.cmd"
27835    else
27836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27837$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27838      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27839$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27840      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27841    fi
27842  else
27843    input_to_shortpath="$new_path"
27844  fi
27845
27846  # Call helper function which possibly converts this using DOS-style short mode.
27847  # If so, the updated path is stored in $new_path.
27848  new_path="$input_to_shortpath"
27849
27850  input_path="$input_to_shortpath"
27851  # Check if we need to convert this using DOS-style short mode. If the path
27852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27853  # take no chances and rewrite it.
27854  # Note: m4 eats our [], so we need to use [ and ] instead.
27855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27856  if test "x$has_forbidden_chars" != x; then
27857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27861      # Going to short mode and back again did indeed matter. Since short mode is
27862      # case insensitive, let's make it lowercase to improve readability.
27863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27864      # Now convert it back to Unix-stile (cygpath)
27865      input_path=`$CYGPATH -u "$shortmode_path"`
27866      new_path="$input_path"
27867    fi
27868  fi
27869
27870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27871  if test "x$test_cygdrive_prefix" = x; then
27872    # As a simple fix, exclude /usr/bin since it's not a real path.
27873    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27875      # a path prefixed by /cygdrive for fixpath to work.
27876      new_path="$CYGWIN_ROOT_PATH$input_path"
27877    fi
27878  fi
27879
27880  # remove trailing .exe if any
27881  new_path="${new_path/%.exe/}"
27882
27883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27884
27885  # First separate the path from the arguments. This will split at the first
27886  # space.
27887  complete="$STRIP"
27888  path="${complete%% *}"
27889  tmp="$complete EOL"
27890  arguments="${tmp#* }"
27891
27892  # Input might be given as Windows format, start by converting to
27893  # unix format.
27894  new_path="$path"
27895
27896  windows_path="$new_path"
27897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27898    unix_path=`$CYGPATH -u "$windows_path"`
27899    new_path="$unix_path"
27900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27902    new_path="$unix_path"
27903  fi
27904
27905
27906  # Now try to locate executable using which
27907  new_path=`$WHICH "$new_path" 2> /dev/null`
27908
27909  if test "x$new_path" = x; then
27910    # Oops. Which didn't find the executable.
27911    # The splitting of arguments from the executable at a space might have been incorrect,
27912    # since paths with space are more likely in Windows. Give it another try with the whole
27913    # argument.
27914    path="$complete"
27915    arguments="EOL"
27916    new_path="$path"
27917
27918  windows_path="$new_path"
27919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27920    unix_path=`$CYGPATH -u "$windows_path"`
27921    new_path="$unix_path"
27922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27924    new_path="$unix_path"
27925  fi
27926
27927
27928    new_path=`$WHICH "$new_path" 2> /dev/null`
27929
27930    if test "x$new_path" = x; then
27931      # It's still not found. Now this is an unrecoverable error.
27932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27933$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27934      has_space=`$ECHO "$complete" | $GREP " "`
27935      if test "x$has_space" != x; then
27936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27938      fi
27939      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27940    fi
27941  fi
27942
27943  # Now new_path has a complete unix path to the binary
27944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27945    # Keep paths in /bin as-is, but remove trailing .exe if any
27946    new_path="${new_path/%.exe/}"
27947    # Do not save /bin paths to all_fixpath_prefixes!
27948  else
27949    # Not in mixed or Windows style, start by that.
27950    new_path=`cmd //c echo $new_path`
27951
27952  input_path="$new_path"
27953  # Check if we need to convert this using DOS-style short mode. If the path
27954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27955  # take no chances and rewrite it.
27956  # Note: m4 eats our [], so we need to use [ and ] instead.
27957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27958  if test "x$has_forbidden_chars" != x; then
27959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27961  fi
27962
27963    # Output is in $new_path
27964
27965  windows_path="$new_path"
27966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27967    unix_path=`$CYGPATH -u "$windows_path"`
27968    new_path="$unix_path"
27969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27971    new_path="$unix_path"
27972  fi
27973
27974    # remove trailing .exe if any
27975    new_path="${new_path/%.exe/}"
27976
27977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27979  fi
27980
27981  else
27982    # We're on a posix platform. Hooray! :)
27983    # First separate the path from the arguments. This will split at the first
27984    # space.
27985    complete="$STRIP"
27986    path="${complete%% *}"
27987    tmp="$complete EOL"
27988    arguments="${tmp#* }"
27989
27990    # Cannot rely on the command "which" here since it doesn't always work.
27991    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27992    if test -z "$is_absolute_path"; then
27993      # Path to executable is not absolute. Find it.
27994      IFS_save="$IFS"
27995      IFS=:
27996      for p in $PATH; do
27997        if test -f "$p/$path" && test -x "$p/$path"; then
27998          new_path="$p/$path"
27999          break
28000        fi
28001      done
28002      IFS="$IFS_save"
28003    else
28004      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
28005$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
28006      new_path="$path"
28007    fi
28008
28009    if test "x$new_path" = x; then
28010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
28011$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
28012        has_space=`$ECHO "$complete" | $GREP " "`
28013        if test "x$has_space" != x; then
28014          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28015$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28016        fi
28017        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
28018      fi
28019  fi
28020
28021      # Now join together the path and the arguments once again
28022      if test "x$arguments" != xEOL; then
28023        new_complete="$new_path ${arguments% *}"
28024      else
28025        new_complete="$new_path"
28026      fi
28027
28028  if test "x$complete" != "x$new_complete"; then
28029      STRIP="$new_complete"
28030      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
28031$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
28032    fi
28033
28034fi
28035
28036# objcopy is used for moving debug symbols to separate files when
28037# full debug symbols are enabled.
28038if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
28039    if test -n "$ac_tool_prefix"; then
28040  for ac_prog in gobjcopy objcopy
28041  do
28042    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28043set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28045$as_echo_n "checking for $ac_word... " >&6; }
28046if ${ac_cv_prog_OBJCOPY+:} false; then :
28047  $as_echo_n "(cached) " >&6
28048else
28049  if test -n "$OBJCOPY"; then
28050  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
28051else
28052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28053for as_dir in $PATH
28054do
28055  IFS=$as_save_IFS
28056  test -z "$as_dir" && as_dir=.
28057    for ac_exec_ext in '' $ac_executable_extensions; do
28058  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28059    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
28060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28061    break 2
28062  fi
28063done
28064  done
28065IFS=$as_save_IFS
28066
28067fi
28068fi
28069OBJCOPY=$ac_cv_prog_OBJCOPY
28070if test -n "$OBJCOPY"; then
28071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
28072$as_echo "$OBJCOPY" >&6; }
28073else
28074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28075$as_echo "no" >&6; }
28076fi
28077
28078
28079    test -n "$OBJCOPY" && break
28080  done
28081fi
28082if test -z "$OBJCOPY"; then
28083  ac_ct_OBJCOPY=$OBJCOPY
28084  for ac_prog in gobjcopy objcopy
28085do
28086  # Extract the first word of "$ac_prog", so it can be a program name with args.
28087set dummy $ac_prog; ac_word=$2
28088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28089$as_echo_n "checking for $ac_word... " >&6; }
28090if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
28091  $as_echo_n "(cached) " >&6
28092else
28093  if test -n "$ac_ct_OBJCOPY"; then
28094  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
28095else
28096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28097for as_dir in $PATH
28098do
28099  IFS=$as_save_IFS
28100  test -z "$as_dir" && as_dir=.
28101    for ac_exec_ext in '' $ac_executable_extensions; do
28102  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28103    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
28104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28105    break 2
28106  fi
28107done
28108  done
28109IFS=$as_save_IFS
28110
28111fi
28112fi
28113ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
28114if test -n "$ac_ct_OBJCOPY"; then
28115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
28116$as_echo "$ac_ct_OBJCOPY" >&6; }
28117else
28118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28119$as_echo "no" >&6; }
28120fi
28121
28122
28123  test -n "$ac_ct_OBJCOPY" && break
28124done
28125
28126  if test "x$ac_ct_OBJCOPY" = x; then
28127    OBJCOPY=""
28128  else
28129    case $cross_compiling:$ac_tool_warned in
28130yes:)
28131{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28132$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28133ac_tool_warned=yes ;;
28134esac
28135    OBJCOPY=$ac_ct_OBJCOPY
28136  fi
28137fi
28138
28139    # Only call fixup if objcopy was found.
28140    if test -n "$OBJCOPY"; then
28141
28142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28143
28144  # First separate the path from the arguments. This will split at the first
28145  # space.
28146  complete="$OBJCOPY"
28147  path="${complete%% *}"
28148  tmp="$complete EOL"
28149  arguments="${tmp#* }"
28150
28151  # Input might be given as Windows format, start by converting to
28152  # unix format.
28153  new_path=`$CYGPATH -u "$path"`
28154
28155  # Now try to locate executable using which
28156  new_path=`$WHICH "$new_path" 2> /dev/null`
28157  # bat and cmd files are not always considered executable in cygwin causing which
28158  # to not find them
28159  if test "x$new_path" = x \
28160           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28161           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28162    new_path=`$CYGPATH -u "$path"`
28163  fi
28164  if test "x$new_path" = x; then
28165    # Oops. Which didn't find the executable.
28166    # The splitting of arguments from the executable at a space might have been incorrect,
28167    # since paths with space are more likely in Windows. Give it another try with the whole
28168    # argument.
28169    path="$complete"
28170    arguments="EOL"
28171    new_path=`$CYGPATH -u "$path"`
28172    new_path=`$WHICH "$new_path" 2> /dev/null`
28173    # bat and cmd files are not always considered executable in cygwin causing which
28174    # to not find them
28175    if test "x$new_path" = x \
28176             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28177             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28178      new_path=`$CYGPATH -u "$path"`
28179    fi
28180    if test "x$new_path" = x; then
28181      # It's still not found. Now this is an unrecoverable error.
28182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28183$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28184      has_space=`$ECHO "$complete" | $GREP " "`
28185      if test "x$has_space" != x; then
28186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28188      fi
28189      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28190    fi
28191  fi
28192
28193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28196  # "foo.exe" is OK but "foo" is an error.
28197  #
28198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28199  # It is also a way to make sure we got the proper file name for the real test later on.
28200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28201  if test "x$test_shortpath" = x; then
28202    # Short path failed, file does not exist as specified.
28203    # Try adding .exe or .cmd
28204    if test -f "${new_path}.exe"; then
28205       input_to_shortpath="${new_path}.exe"
28206    elif test -f "${new_path}.cmd"; then
28207       input_to_shortpath="${new_path}.cmd"
28208    else
28209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
28210$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
28211      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28212$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28213      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28214    fi
28215  else
28216    input_to_shortpath="$new_path"
28217  fi
28218
28219  # Call helper function which possibly converts this using DOS-style short mode.
28220  # If so, the updated path is stored in $new_path.
28221  new_path="$input_to_shortpath"
28222
28223  input_path="$input_to_shortpath"
28224  # Check if we need to convert this using DOS-style short mode. If the path
28225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28226  # take no chances and rewrite it.
28227  # Note: m4 eats our [], so we need to use [ and ] instead.
28228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28229  if test "x$has_forbidden_chars" != x; then
28230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28234      # Going to short mode and back again did indeed matter. Since short mode is
28235      # case insensitive, let's make it lowercase to improve readability.
28236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28237      # Now convert it back to Unix-stile (cygpath)
28238      input_path=`$CYGPATH -u "$shortmode_path"`
28239      new_path="$input_path"
28240    fi
28241  fi
28242
28243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28244  if test "x$test_cygdrive_prefix" = x; then
28245    # As a simple fix, exclude /usr/bin since it's not a real path.
28246    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28248      # a path prefixed by /cygdrive for fixpath to work.
28249      new_path="$CYGWIN_ROOT_PATH$input_path"
28250    fi
28251  fi
28252
28253  # remove trailing .exe if any
28254  new_path="${new_path/%.exe/}"
28255
28256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28257
28258  # First separate the path from the arguments. This will split at the first
28259  # space.
28260  complete="$OBJCOPY"
28261  path="${complete%% *}"
28262  tmp="$complete EOL"
28263  arguments="${tmp#* }"
28264
28265  # Input might be given as Windows format, start by converting to
28266  # unix format.
28267  new_path="$path"
28268
28269  windows_path="$new_path"
28270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28271    unix_path=`$CYGPATH -u "$windows_path"`
28272    new_path="$unix_path"
28273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28275    new_path="$unix_path"
28276  fi
28277
28278
28279  # Now try to locate executable using which
28280  new_path=`$WHICH "$new_path" 2> /dev/null`
28281
28282  if test "x$new_path" = x; then
28283    # Oops. Which didn't find the executable.
28284    # The splitting of arguments from the executable at a space might have been incorrect,
28285    # since paths with space are more likely in Windows. Give it another try with the whole
28286    # argument.
28287    path="$complete"
28288    arguments="EOL"
28289    new_path="$path"
28290
28291  windows_path="$new_path"
28292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28293    unix_path=`$CYGPATH -u "$windows_path"`
28294    new_path="$unix_path"
28295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28297    new_path="$unix_path"
28298  fi
28299
28300
28301    new_path=`$WHICH "$new_path" 2> /dev/null`
28302
28303    if test "x$new_path" = x; then
28304      # It's still not found. Now this is an unrecoverable error.
28305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28306$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28307      has_space=`$ECHO "$complete" | $GREP " "`
28308      if test "x$has_space" != x; then
28309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28311      fi
28312      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28313    fi
28314  fi
28315
28316  # Now new_path has a complete unix path to the binary
28317  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28318    # Keep paths in /bin as-is, but remove trailing .exe if any
28319    new_path="${new_path/%.exe/}"
28320    # Do not save /bin paths to all_fixpath_prefixes!
28321  else
28322    # Not in mixed or Windows style, start by that.
28323    new_path=`cmd //c echo $new_path`
28324
28325  input_path="$new_path"
28326  # Check if we need to convert this using DOS-style short mode. If the path
28327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28328  # take no chances and rewrite it.
28329  # Note: m4 eats our [], so we need to use [ and ] instead.
28330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28331  if test "x$has_forbidden_chars" != x; then
28332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28334  fi
28335
28336    # Output is in $new_path
28337
28338  windows_path="$new_path"
28339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28340    unix_path=`$CYGPATH -u "$windows_path"`
28341    new_path="$unix_path"
28342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28344    new_path="$unix_path"
28345  fi
28346
28347    # remove trailing .exe if any
28348    new_path="${new_path/%.exe/}"
28349
28350    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28351    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28352  fi
28353
28354  else
28355    # We're on a posix platform. Hooray! :)
28356    # First separate the path from the arguments. This will split at the first
28357    # space.
28358    complete="$OBJCOPY"
28359    path="${complete%% *}"
28360    tmp="$complete EOL"
28361    arguments="${tmp#* }"
28362
28363    # Cannot rely on the command "which" here since it doesn't always work.
28364    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28365    if test -z "$is_absolute_path"; then
28366      # Path to executable is not absolute. Find it.
28367      IFS_save="$IFS"
28368      IFS=:
28369      for p in $PATH; do
28370        if test -f "$p/$path" && test -x "$p/$path"; then
28371          new_path="$p/$path"
28372          break
28373        fi
28374      done
28375      IFS="$IFS_save"
28376    else
28377      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28378$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28379      new_path="$path"
28380    fi
28381
28382    if test "x$new_path" = x; then
28383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28384$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28385        has_space=`$ECHO "$complete" | $GREP " "`
28386        if test "x$has_space" != x; then
28387          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28388$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28389        fi
28390        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28391      fi
28392  fi
28393
28394      # Now join together the path and the arguments once again
28395      if test "x$arguments" != xEOL; then
28396        new_complete="$new_path ${arguments% *}"
28397      else
28398        new_complete="$new_path"
28399      fi
28400
28401  if test "x$complete" != "x$new_complete"; then
28402      OBJCOPY="$new_complete"
28403      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28404$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28405    fi
28406
28407    fi
28408fi
28409
28410if test -n "$ac_tool_prefix"; then
28411  for ac_prog in gobjdump objdump
28412  do
28413    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28414set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28416$as_echo_n "checking for $ac_word... " >&6; }
28417if ${ac_cv_prog_OBJDUMP+:} false; then :
28418  $as_echo_n "(cached) " >&6
28419else
28420  if test -n "$OBJDUMP"; then
28421  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28422else
28423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28424for as_dir in $PATH
28425do
28426  IFS=$as_save_IFS
28427  test -z "$as_dir" && as_dir=.
28428    for ac_exec_ext in '' $ac_executable_extensions; do
28429  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28430    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28432    break 2
28433  fi
28434done
28435  done
28436IFS=$as_save_IFS
28437
28438fi
28439fi
28440OBJDUMP=$ac_cv_prog_OBJDUMP
28441if test -n "$OBJDUMP"; then
28442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28443$as_echo "$OBJDUMP" >&6; }
28444else
28445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28446$as_echo "no" >&6; }
28447fi
28448
28449
28450    test -n "$OBJDUMP" && break
28451  done
28452fi
28453if test -z "$OBJDUMP"; then
28454  ac_ct_OBJDUMP=$OBJDUMP
28455  for ac_prog in gobjdump objdump
28456do
28457  # Extract the first word of "$ac_prog", so it can be a program name with args.
28458set dummy $ac_prog; ac_word=$2
28459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28460$as_echo_n "checking for $ac_word... " >&6; }
28461if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28462  $as_echo_n "(cached) " >&6
28463else
28464  if test -n "$ac_ct_OBJDUMP"; then
28465  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28466else
28467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28468for as_dir in $PATH
28469do
28470  IFS=$as_save_IFS
28471  test -z "$as_dir" && as_dir=.
28472    for ac_exec_ext in '' $ac_executable_extensions; do
28473  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28474    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28476    break 2
28477  fi
28478done
28479  done
28480IFS=$as_save_IFS
28481
28482fi
28483fi
28484ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28485if test -n "$ac_ct_OBJDUMP"; then
28486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28487$as_echo "$ac_ct_OBJDUMP" >&6; }
28488else
28489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28490$as_echo "no" >&6; }
28491fi
28492
28493
28494  test -n "$ac_ct_OBJDUMP" && break
28495done
28496
28497  if test "x$ac_ct_OBJDUMP" = x; then
28498    OBJDUMP=""
28499  else
28500    case $cross_compiling:$ac_tool_warned in
28501yes:)
28502{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28503$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28504ac_tool_warned=yes ;;
28505esac
28506    OBJDUMP=$ac_ct_OBJDUMP
28507  fi
28508fi
28509
28510if test "x$OBJDUMP" != x; then
28511  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28512
28513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28514
28515  # First separate the path from the arguments. This will split at the first
28516  # space.
28517  complete="$OBJDUMP"
28518  path="${complete%% *}"
28519  tmp="$complete EOL"
28520  arguments="${tmp#* }"
28521
28522  # Input might be given as Windows format, start by converting to
28523  # unix format.
28524  new_path=`$CYGPATH -u "$path"`
28525
28526  # Now try to locate executable using which
28527  new_path=`$WHICH "$new_path" 2> /dev/null`
28528  # bat and cmd files are not always considered executable in cygwin causing which
28529  # to not find them
28530  if test "x$new_path" = x \
28531           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28532           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28533    new_path=`$CYGPATH -u "$path"`
28534  fi
28535  if test "x$new_path" = x; then
28536    # Oops. Which didn't find the executable.
28537    # The splitting of arguments from the executable at a space might have been incorrect,
28538    # since paths with space are more likely in Windows. Give it another try with the whole
28539    # argument.
28540    path="$complete"
28541    arguments="EOL"
28542    new_path=`$CYGPATH -u "$path"`
28543    new_path=`$WHICH "$new_path" 2> /dev/null`
28544    # bat and cmd files are not always considered executable in cygwin causing which
28545    # to not find them
28546    if test "x$new_path" = x \
28547             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28548             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28549      new_path=`$CYGPATH -u "$path"`
28550    fi
28551    if test "x$new_path" = x; then
28552      # It's still not found. Now this is an unrecoverable error.
28553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28554$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28555      has_space=`$ECHO "$complete" | $GREP " "`
28556      if test "x$has_space" != x; then
28557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28559      fi
28560      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28561    fi
28562  fi
28563
28564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28567  # "foo.exe" is OK but "foo" is an error.
28568  #
28569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28570  # It is also a way to make sure we got the proper file name for the real test later on.
28571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28572  if test "x$test_shortpath" = x; then
28573    # Short path failed, file does not exist as specified.
28574    # Try adding .exe or .cmd
28575    if test -f "${new_path}.exe"; then
28576       input_to_shortpath="${new_path}.exe"
28577    elif test -f "${new_path}.cmd"; then
28578       input_to_shortpath="${new_path}.cmd"
28579    else
28580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28581$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28582      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28583$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28584      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28585    fi
28586  else
28587    input_to_shortpath="$new_path"
28588  fi
28589
28590  # Call helper function which possibly converts this using DOS-style short mode.
28591  # If so, the updated path is stored in $new_path.
28592  new_path="$input_to_shortpath"
28593
28594  input_path="$input_to_shortpath"
28595  # Check if we need to convert this using DOS-style short mode. If the path
28596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28597  # take no chances and rewrite it.
28598  # Note: m4 eats our [], so we need to use [ and ] instead.
28599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28600  if test "x$has_forbidden_chars" != x; then
28601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28605      # Going to short mode and back again did indeed matter. Since short mode is
28606      # case insensitive, let's make it lowercase to improve readability.
28607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28608      # Now convert it back to Unix-stile (cygpath)
28609      input_path=`$CYGPATH -u "$shortmode_path"`
28610      new_path="$input_path"
28611    fi
28612  fi
28613
28614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28615  if test "x$test_cygdrive_prefix" = x; then
28616    # As a simple fix, exclude /usr/bin since it's not a real path.
28617    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28619      # a path prefixed by /cygdrive for fixpath to work.
28620      new_path="$CYGWIN_ROOT_PATH$input_path"
28621    fi
28622  fi
28623
28624  # remove trailing .exe if any
28625  new_path="${new_path/%.exe/}"
28626
28627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28628
28629  # First separate the path from the arguments. This will split at the first
28630  # space.
28631  complete="$OBJDUMP"
28632  path="${complete%% *}"
28633  tmp="$complete EOL"
28634  arguments="${tmp#* }"
28635
28636  # Input might be given as Windows format, start by converting to
28637  # unix format.
28638  new_path="$path"
28639
28640  windows_path="$new_path"
28641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28642    unix_path=`$CYGPATH -u "$windows_path"`
28643    new_path="$unix_path"
28644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28646    new_path="$unix_path"
28647  fi
28648
28649
28650  # Now try to locate executable using which
28651  new_path=`$WHICH "$new_path" 2> /dev/null`
28652
28653  if test "x$new_path" = x; then
28654    # Oops. Which didn't find the executable.
28655    # The splitting of arguments from the executable at a space might have been incorrect,
28656    # since paths with space are more likely in Windows. Give it another try with the whole
28657    # argument.
28658    path="$complete"
28659    arguments="EOL"
28660    new_path="$path"
28661
28662  windows_path="$new_path"
28663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28664    unix_path=`$CYGPATH -u "$windows_path"`
28665    new_path="$unix_path"
28666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28668    new_path="$unix_path"
28669  fi
28670
28671
28672    new_path=`$WHICH "$new_path" 2> /dev/null`
28673
28674    if test "x$new_path" = x; then
28675      # It's still not found. Now this is an unrecoverable error.
28676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28677$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28678      has_space=`$ECHO "$complete" | $GREP " "`
28679      if test "x$has_space" != x; then
28680        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28682      fi
28683      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28684    fi
28685  fi
28686
28687  # Now new_path has a complete unix path to the binary
28688  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28689    # Keep paths in /bin as-is, but remove trailing .exe if any
28690    new_path="${new_path/%.exe/}"
28691    # Do not save /bin paths to all_fixpath_prefixes!
28692  else
28693    # Not in mixed or Windows style, start by that.
28694    new_path=`cmd //c echo $new_path`
28695
28696  input_path="$new_path"
28697  # Check if we need to convert this using DOS-style short mode. If the path
28698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28699  # take no chances and rewrite it.
28700  # Note: m4 eats our [], so we need to use [ and ] instead.
28701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28702  if test "x$has_forbidden_chars" != x; then
28703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28705  fi
28706
28707    # Output is in $new_path
28708
28709  windows_path="$new_path"
28710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28711    unix_path=`$CYGPATH -u "$windows_path"`
28712    new_path="$unix_path"
28713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28715    new_path="$unix_path"
28716  fi
28717
28718    # remove trailing .exe if any
28719    new_path="${new_path/%.exe/}"
28720
28721    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28722    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28723  fi
28724
28725  else
28726    # We're on a posix platform. Hooray! :)
28727    # First separate the path from the arguments. This will split at the first
28728    # space.
28729    complete="$OBJDUMP"
28730    path="${complete%% *}"
28731    tmp="$complete EOL"
28732    arguments="${tmp#* }"
28733
28734    # Cannot rely on the command "which" here since it doesn't always work.
28735    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28736    if test -z "$is_absolute_path"; then
28737      # Path to executable is not absolute. Find it.
28738      IFS_save="$IFS"
28739      IFS=:
28740      for p in $PATH; do
28741        if test -f "$p/$path" && test -x "$p/$path"; then
28742          new_path="$p/$path"
28743          break
28744        fi
28745      done
28746      IFS="$IFS_save"
28747    else
28748      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28749$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28750      new_path="$path"
28751    fi
28752
28753    if test "x$new_path" = x; then
28754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28755$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28756        has_space=`$ECHO "$complete" | $GREP " "`
28757        if test "x$has_space" != x; then
28758          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28759$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28760        fi
28761        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28762      fi
28763  fi
28764
28765      # Now join together the path and the arguments once again
28766      if test "x$arguments" != xEOL; then
28767        new_complete="$new_path ${arguments% *}"
28768      else
28769        new_complete="$new_path"
28770      fi
28771
28772  if test "x$complete" != "x$new_complete"; then
28773      OBJDUMP="$new_complete"
28774      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28775$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28776    fi
28777
28778fi
28779
28780if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28781   # Extract the first word of "lipo", so it can be a program name with args.
28782set dummy lipo; ac_word=$2
28783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28784$as_echo_n "checking for $ac_word... " >&6; }
28785if ${ac_cv_path_LIPO+:} false; then :
28786  $as_echo_n "(cached) " >&6
28787else
28788  case $LIPO in
28789  [\\/]* | ?:[\\/]*)
28790  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28791  ;;
28792  *)
28793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28794for as_dir in $PATH
28795do
28796  IFS=$as_save_IFS
28797  test -z "$as_dir" && as_dir=.
28798    for ac_exec_ext in '' $ac_executable_extensions; do
28799  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28800    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28802    break 2
28803  fi
28804done
28805  done
28806IFS=$as_save_IFS
28807
28808  ;;
28809esac
28810fi
28811LIPO=$ac_cv_path_LIPO
28812if test -n "$LIPO"; then
28813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28814$as_echo "$LIPO" >&6; }
28815else
28816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28817$as_echo "no" >&6; }
28818fi
28819
28820
28821
28822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28823
28824  # First separate the path from the arguments. This will split at the first
28825  # space.
28826  complete="$LIPO"
28827  path="${complete%% *}"
28828  tmp="$complete EOL"
28829  arguments="${tmp#* }"
28830
28831  # Input might be given as Windows format, start by converting to
28832  # unix format.
28833  new_path=`$CYGPATH -u "$path"`
28834
28835  # Now try to locate executable using which
28836  new_path=`$WHICH "$new_path" 2> /dev/null`
28837  # bat and cmd files are not always considered executable in cygwin causing which
28838  # to not find them
28839  if test "x$new_path" = x \
28840           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28841           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28842    new_path=`$CYGPATH -u "$path"`
28843  fi
28844  if test "x$new_path" = x; then
28845    # Oops. Which didn't find the executable.
28846    # The splitting of arguments from the executable at a space might have been incorrect,
28847    # since paths with space are more likely in Windows. Give it another try with the whole
28848    # argument.
28849    path="$complete"
28850    arguments="EOL"
28851    new_path=`$CYGPATH -u "$path"`
28852    new_path=`$WHICH "$new_path" 2> /dev/null`
28853    # bat and cmd files are not always considered executable in cygwin causing which
28854    # to not find them
28855    if test "x$new_path" = x \
28856             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28857             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28858      new_path=`$CYGPATH -u "$path"`
28859    fi
28860    if test "x$new_path" = x; then
28861      # It's still not found. Now this is an unrecoverable error.
28862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28863$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28864      has_space=`$ECHO "$complete" | $GREP " "`
28865      if test "x$has_space" != x; then
28866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28868      fi
28869      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28870    fi
28871  fi
28872
28873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28876  # "foo.exe" is OK but "foo" is an error.
28877  #
28878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28879  # It is also a way to make sure we got the proper file name for the real test later on.
28880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28881  if test "x$test_shortpath" = x; then
28882    # Short path failed, file does not exist as specified.
28883    # Try adding .exe or .cmd
28884    if test -f "${new_path}.exe"; then
28885       input_to_shortpath="${new_path}.exe"
28886    elif test -f "${new_path}.cmd"; then
28887       input_to_shortpath="${new_path}.cmd"
28888    else
28889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28890$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28891      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28892$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28893      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28894    fi
28895  else
28896    input_to_shortpath="$new_path"
28897  fi
28898
28899  # Call helper function which possibly converts this using DOS-style short mode.
28900  # If so, the updated path is stored in $new_path.
28901  new_path="$input_to_shortpath"
28902
28903  input_path="$input_to_shortpath"
28904  # Check if we need to convert this using DOS-style short mode. If the path
28905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28906  # take no chances and rewrite it.
28907  # Note: m4 eats our [], so we need to use [ and ] instead.
28908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28909  if test "x$has_forbidden_chars" != x; then
28910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28914      # Going to short mode and back again did indeed matter. Since short mode is
28915      # case insensitive, let's make it lowercase to improve readability.
28916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28917      # Now convert it back to Unix-stile (cygpath)
28918      input_path=`$CYGPATH -u "$shortmode_path"`
28919      new_path="$input_path"
28920    fi
28921  fi
28922
28923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28924  if test "x$test_cygdrive_prefix" = x; then
28925    # As a simple fix, exclude /usr/bin since it's not a real path.
28926    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28928      # a path prefixed by /cygdrive for fixpath to work.
28929      new_path="$CYGWIN_ROOT_PATH$input_path"
28930    fi
28931  fi
28932
28933  # remove trailing .exe if any
28934  new_path="${new_path/%.exe/}"
28935
28936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28937
28938  # First separate the path from the arguments. This will split at the first
28939  # space.
28940  complete="$LIPO"
28941  path="${complete%% *}"
28942  tmp="$complete EOL"
28943  arguments="${tmp#* }"
28944
28945  # Input might be given as Windows format, start by converting to
28946  # unix format.
28947  new_path="$path"
28948
28949  windows_path="$new_path"
28950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28951    unix_path=`$CYGPATH -u "$windows_path"`
28952    new_path="$unix_path"
28953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28955    new_path="$unix_path"
28956  fi
28957
28958
28959  # Now try to locate executable using which
28960  new_path=`$WHICH "$new_path" 2> /dev/null`
28961
28962  if test "x$new_path" = x; then
28963    # Oops. Which didn't find the executable.
28964    # The splitting of arguments from the executable at a space might have been incorrect,
28965    # since paths with space are more likely in Windows. Give it another try with the whole
28966    # argument.
28967    path="$complete"
28968    arguments="EOL"
28969    new_path="$path"
28970
28971  windows_path="$new_path"
28972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28973    unix_path=`$CYGPATH -u "$windows_path"`
28974    new_path="$unix_path"
28975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28977    new_path="$unix_path"
28978  fi
28979
28980
28981    new_path=`$WHICH "$new_path" 2> /dev/null`
28982
28983    if test "x$new_path" = x; then
28984      # It's still not found. Now this is an unrecoverable error.
28985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28986$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28987      has_space=`$ECHO "$complete" | $GREP " "`
28988      if test "x$has_space" != x; then
28989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28991      fi
28992      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28993    fi
28994  fi
28995
28996  # Now new_path has a complete unix path to the binary
28997  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28998    # Keep paths in /bin as-is, but remove trailing .exe if any
28999    new_path="${new_path/%.exe/}"
29000    # Do not save /bin paths to all_fixpath_prefixes!
29001  else
29002    # Not in mixed or Windows style, start by that.
29003    new_path=`cmd //c echo $new_path`
29004
29005  input_path="$new_path"
29006  # Check if we need to convert this using DOS-style short mode. If the path
29007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29008  # take no chances and rewrite it.
29009  # Note: m4 eats our [], so we need to use [ and ] instead.
29010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29011  if test "x$has_forbidden_chars" != x; then
29012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29014  fi
29015
29016    # Output is in $new_path
29017
29018  windows_path="$new_path"
29019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29020    unix_path=`$CYGPATH -u "$windows_path"`
29021    new_path="$unix_path"
29022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29024    new_path="$unix_path"
29025  fi
29026
29027    # remove trailing .exe if any
29028    new_path="${new_path/%.exe/}"
29029
29030    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29031    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29032  fi
29033
29034  else
29035    # We're on a posix platform. Hooray! :)
29036    # First separate the path from the arguments. This will split at the first
29037    # space.
29038    complete="$LIPO"
29039    path="${complete%% *}"
29040    tmp="$complete EOL"
29041    arguments="${tmp#* }"
29042
29043    # Cannot rely on the command "which" here since it doesn't always work.
29044    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29045    if test -z "$is_absolute_path"; then
29046      # Path to executable is not absolute. Find it.
29047      IFS_save="$IFS"
29048      IFS=:
29049      for p in $PATH; do
29050        if test -f "$p/$path" && test -x "$p/$path"; then
29051          new_path="$p/$path"
29052          break
29053        fi
29054      done
29055      IFS="$IFS_save"
29056    else
29057      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
29058$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
29059      new_path="$path"
29060    fi
29061
29062    if test "x$new_path" = x; then
29063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
29064$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
29065        has_space=`$ECHO "$complete" | $GREP " "`
29066        if test "x$has_space" != x; then
29067          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29068$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29069        fi
29070        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
29071      fi
29072  fi
29073
29074      # Now join together the path and the arguments once again
29075      if test "x$arguments" != xEOL; then
29076        new_complete="$new_path ${arguments% *}"
29077      else
29078        new_complete="$new_path"
29079      fi
29080
29081  if test "x$complete" != "x$new_complete"; then
29082      LIPO="$new_complete"
29083      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
29084$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
29085    fi
29086
29087fi
29088
29089# Restore old path without tools dir
29090PATH="$OLD_PATH"
29091
29092
29093# FIXME: Currently we must test this after paths but before flags. Fix!
29094
29095# And we can test some aspects on the target using configure macros.
29096
29097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
29098$as_echo_n "checking for ANSI C header files... " >&6; }
29099if ${ac_cv_header_stdc+:} false; then :
29100  $as_echo_n "(cached) " >&6
29101else
29102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29103/* end confdefs.h.  */
29104#include <stdlib.h>
29105#include <stdarg.h>
29106#include <string.h>
29107#include <float.h>
29108
29109int
29110main ()
29111{
29112
29113  ;
29114  return 0;
29115}
29116_ACEOF
29117if ac_fn_cxx_try_compile "$LINENO"; then :
29118  ac_cv_header_stdc=yes
29119else
29120  ac_cv_header_stdc=no
29121fi
29122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29123
29124if test $ac_cv_header_stdc = yes; then
29125  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
29126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29127/* end confdefs.h.  */
29128#include <string.h>
29129
29130_ACEOF
29131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29132  $EGREP "memchr" >/dev/null 2>&1; then :
29133
29134else
29135  ac_cv_header_stdc=no
29136fi
29137rm -f conftest*
29138
29139fi
29140
29141if test $ac_cv_header_stdc = yes; then
29142  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
29143  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29144/* end confdefs.h.  */
29145#include <stdlib.h>
29146
29147_ACEOF
29148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29149  $EGREP "free" >/dev/null 2>&1; then :
29150
29151else
29152  ac_cv_header_stdc=no
29153fi
29154rm -f conftest*
29155
29156fi
29157
29158if test $ac_cv_header_stdc = yes; then
29159  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
29160  if test "$cross_compiling" = yes; then :
29161  :
29162else
29163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29164/* end confdefs.h.  */
29165#include <ctype.h>
29166#include <stdlib.h>
29167#if ((' ' & 0x0FF) == 0x020)
29168# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
29169# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
29170#else
29171# define ISLOWER(c) \
29172		   (('a' <= (c) && (c) <= 'i') \
29173		     || ('j' <= (c) && (c) <= 'r') \
29174		     || ('s' <= (c) && (c) <= 'z'))
29175# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
29176#endif
29177
29178#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
29179int
29180main ()
29181{
29182  int i;
29183  for (i = 0; i < 256; i++)
29184    if (XOR (islower (i), ISLOWER (i))
29185	|| toupper (i) != TOUPPER (i))
29186      return 2;
29187  return 0;
29188}
29189_ACEOF
29190if ac_fn_cxx_try_run "$LINENO"; then :
29191
29192else
29193  ac_cv_header_stdc=no
29194fi
29195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29196  conftest.$ac_objext conftest.beam conftest.$ac_ext
29197fi
29198
29199fi
29200fi
29201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
29202$as_echo "$ac_cv_header_stdc" >&6; }
29203if test $ac_cv_header_stdc = yes; then
29204
29205$as_echo "#define STDC_HEADERS 1" >>confdefs.h
29206
29207fi
29208
29209# On IRIX 5.3, sys/types and inttypes.h are conflicting.
29210for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
29211		  inttypes.h stdint.h unistd.h
29212do :
29213  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29214ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
29215"
29216if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29217  cat >>confdefs.h <<_ACEOF
29218#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29219_ACEOF
29220
29221fi
29222
29223done
29224
29225
29226
29227###############################################################################
29228#
29229# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
29230# (The JVM can use 32 or 64 bit Java pointers but that decision
29231# is made at runtime.)
29232#
29233
29234
29235
29236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29237$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29238  supports=yes
29239
29240  saved_cflags="$CFLAGS"
29241  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29242  ac_ext=c
29243ac_cpp='$CPP $CPPFLAGS'
29244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29246ac_compiler_gnu=$ac_cv_c_compiler_gnu
29247
29248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29249/* end confdefs.h.  */
29250
29251    int i;
29252
29253_ACEOF
29254if ac_fn_c_try_compile "$LINENO"; then :
29255
29256else
29257  supports=no
29258fi
29259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29260  ac_ext=cpp
29261ac_cpp='$CXXCPP $CPPFLAGS'
29262ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29263ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29264ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29265
29266  CFLAGS="$saved_cflags"
29267
29268  saved_cxxflags="$CXXFLAGS"
29269  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29270  ac_ext=cpp
29271ac_cpp='$CXXCPP $CPPFLAGS'
29272ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29273ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29274ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29275
29276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29277/* end confdefs.h.  */
29278
29279    int i;
29280
29281_ACEOF
29282if ac_fn_cxx_try_compile "$LINENO"; then :
29283
29284else
29285  supports=no
29286fi
29287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29288  ac_ext=cpp
29289ac_cpp='$CXXCPP $CPPFLAGS'
29290ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29291ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29292ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29293
29294  CXXFLAGS="$saved_cxxflags"
29295
29296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29297$as_echo "$supports" >&6; }
29298  if test "x$supports" = "xyes" ; then
29299    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29300  else
29301    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29302  fi
29303
29304
29305
29306
29307if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29308  # Always specify -m flags on Solaris
29309
29310  # keep track of c/cxx flags that we added outselves...
29311  #   to prevent emitting warning...
29312  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
29313  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
29314  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
29315
29316  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29317  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29318  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29319
29320  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29321  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29322  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29323
29324elif test "x$COMPILE_TYPE" = xreduced; then
29325  if test "x$OPENJDK_TARGET_OS" != xwindows; then
29326    # Specify -m if running reduced on other Posix platforms
29327
29328  # keep track of c/cxx flags that we added outselves...
29329  #   to prevent emitting warning...
29330  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
29331  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
29332  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
29333
29334  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29335  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29336  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29337
29338  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29339  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29340  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29341
29342  fi
29343fi
29344
29345# Make compilation sanity check
29346for ac_header in stdio.h
29347do :
29348  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
29349if test "x$ac_cv_header_stdio_h" = xyes; then :
29350  cat >>confdefs.h <<_ACEOF
29351#define HAVE_STDIO_H 1
29352_ACEOF
29353
29354else
29355
29356  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
29357$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
29358  if test "x$COMPILE_TYPE" = xreduced; then
29359    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
29360$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
29361  elif test "x$COMPILE_TYPE" = xcross; then
29362    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
29363$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
29364  fi
29365  as_fn_error $? "Cannot continue." "$LINENO" 5
29366
29367fi
29368
29369done
29370
29371
29372# The cast to long int works around a bug in the HP C Compiler
29373# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29374# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29375# This bug is HP SR number 8606223364.
29376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
29377$as_echo_n "checking size of int *... " >&6; }
29378if ${ac_cv_sizeof_int_p+:} false; then :
29379  $as_echo_n "(cached) " >&6
29380else
29381  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
29382
29383else
29384  if test "$ac_cv_type_int_p" = yes; then
29385     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29387as_fn_error 77 "cannot compute sizeof (int *)
29388See \`config.log' for more details" "$LINENO" 5; }
29389   else
29390     ac_cv_sizeof_int_p=0
29391   fi
29392fi
29393
29394fi
29395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29396$as_echo "$ac_cv_sizeof_int_p" >&6; }
29397
29398
29399
29400cat >>confdefs.h <<_ACEOF
29401#define SIZEOF_INT_P $ac_cv_sizeof_int_p
29402_ACEOF
29403
29404
29405
29406if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
29407  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
29408  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
29409fi
29410
29411if test "x$SIZEOF_INT_P" = x; then
29412    # The test failed, lets stick to the assumed value.
29413    { $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
29414$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
29415else
29416    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
29417
29418    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29419        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
29420    fi
29421fi
29422
29423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29424$as_echo_n "checking for target address size... " >&6; }
29425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29426$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29427
29428
29429###############################################################################
29430#
29431# Is the target little of big endian?
29432#
29433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29434$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29435if ${ac_cv_c_bigendian+:} false; then :
29436  $as_echo_n "(cached) " >&6
29437else
29438  ac_cv_c_bigendian=unknown
29439    # See if we're dealing with a universal compiler.
29440    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29441/* end confdefs.h.  */
29442#ifndef __APPLE_CC__
29443	       not a universal capable compiler
29444	     #endif
29445	     typedef int dummy;
29446
29447_ACEOF
29448if ac_fn_cxx_try_compile "$LINENO"; then :
29449
29450	# Check for potential -arch flags.  It is not universal unless
29451	# there are at least two -arch flags with different values.
29452	ac_arch=
29453	ac_prev=
29454	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29455	 if test -n "$ac_prev"; then
29456	   case $ac_word in
29457	     i?86 | x86_64 | ppc | ppc64)
29458	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29459		 ac_arch=$ac_word
29460	       else
29461		 ac_cv_c_bigendian=universal
29462		 break
29463	       fi
29464	       ;;
29465	   esac
29466	   ac_prev=
29467	 elif test "x$ac_word" = "x-arch"; then
29468	   ac_prev=arch
29469	 fi
29470       done
29471fi
29472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29473    if test $ac_cv_c_bigendian = unknown; then
29474      # See if sys/param.h defines the BYTE_ORDER macro.
29475      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29476/* end confdefs.h.  */
29477#include <sys/types.h>
29478	     #include <sys/param.h>
29479
29480int
29481main ()
29482{
29483#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29484		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29485		     && LITTLE_ENDIAN)
29486	      bogus endian macros
29487	     #endif
29488
29489  ;
29490  return 0;
29491}
29492_ACEOF
29493if ac_fn_cxx_try_compile "$LINENO"; then :
29494  # It does; now see whether it defined to BIG_ENDIAN or not.
29495	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29496/* end confdefs.h.  */
29497#include <sys/types.h>
29498		#include <sys/param.h>
29499
29500int
29501main ()
29502{
29503#if BYTE_ORDER != BIG_ENDIAN
29504		 not big endian
29505		#endif
29506
29507  ;
29508  return 0;
29509}
29510_ACEOF
29511if ac_fn_cxx_try_compile "$LINENO"; then :
29512  ac_cv_c_bigendian=yes
29513else
29514  ac_cv_c_bigendian=no
29515fi
29516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29517fi
29518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29519    fi
29520    if test $ac_cv_c_bigendian = unknown; then
29521      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29522      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29523/* end confdefs.h.  */
29524#include <limits.h>
29525
29526int
29527main ()
29528{
29529#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29530	      bogus endian macros
29531	     #endif
29532
29533  ;
29534  return 0;
29535}
29536_ACEOF
29537if ac_fn_cxx_try_compile "$LINENO"; then :
29538  # It does; now see whether it defined to _BIG_ENDIAN or not.
29539	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29540/* end confdefs.h.  */
29541#include <limits.h>
29542
29543int
29544main ()
29545{
29546#ifndef _BIG_ENDIAN
29547		 not big endian
29548		#endif
29549
29550  ;
29551  return 0;
29552}
29553_ACEOF
29554if ac_fn_cxx_try_compile "$LINENO"; then :
29555  ac_cv_c_bigendian=yes
29556else
29557  ac_cv_c_bigendian=no
29558fi
29559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29560fi
29561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29562    fi
29563    if test $ac_cv_c_bigendian = unknown; then
29564      # Compile a test program.
29565      if test "$cross_compiling" = yes; then :
29566  # Try to guess by grepping values from an object file.
29567	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29568/* end confdefs.h.  */
29569short int ascii_mm[] =
29570		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29571		short int ascii_ii[] =
29572		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29573		int use_ascii (int i) {
29574		  return ascii_mm[i] + ascii_ii[i];
29575		}
29576		short int ebcdic_ii[] =
29577		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29578		short int ebcdic_mm[] =
29579		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29580		int use_ebcdic (int i) {
29581		  return ebcdic_mm[i] + ebcdic_ii[i];
29582		}
29583		extern int foo;
29584
29585int
29586main ()
29587{
29588return use_ascii (foo) == use_ebcdic (foo);
29589  ;
29590  return 0;
29591}
29592_ACEOF
29593if ac_fn_cxx_try_compile "$LINENO"; then :
29594  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29595	      ac_cv_c_bigendian=yes
29596	    fi
29597	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29598	      if test "$ac_cv_c_bigendian" = unknown; then
29599		ac_cv_c_bigendian=no
29600	      else
29601		# finding both strings is unlikely to happen, but who knows?
29602		ac_cv_c_bigendian=unknown
29603	      fi
29604	    fi
29605fi
29606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29607else
29608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29609/* end confdefs.h.  */
29610$ac_includes_default
29611int
29612main ()
29613{
29614
29615	     /* Are we little or big endian?  From Harbison&Steele.  */
29616	     union
29617	     {
29618	       long int l;
29619	       char c[sizeof (long int)];
29620	     } u;
29621	     u.l = 1;
29622	     return u.c[sizeof (long int) - 1] == 1;
29623
29624  ;
29625  return 0;
29626}
29627_ACEOF
29628if ac_fn_cxx_try_run "$LINENO"; then :
29629  ac_cv_c_bigendian=no
29630else
29631  ac_cv_c_bigendian=yes
29632fi
29633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29634  conftest.$ac_objext conftest.beam conftest.$ac_ext
29635fi
29636
29637    fi
29638fi
29639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29640$as_echo "$ac_cv_c_bigendian" >&6; }
29641 case $ac_cv_c_bigendian in #(
29642   yes)
29643     ENDIAN="big";; #(
29644   no)
29645     ENDIAN="little" ;; #(
29646   universal)
29647     ENDIAN="universal_endianness"
29648     ;; #(
29649   *)
29650     ENDIAN="unknown" ;;
29651 esac
29652
29653
29654if test "x$ENDIAN" = xuniversal_endianness; then
29655    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29656fi
29657if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29658    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
29659fi
29660
29661
29662# Configure flags for the tools
29663
29664
29665###############################################################################
29666#
29667# How to compile shared libraries.
29668#
29669
29670if test "x$GCC" = xyes; then
29671    COMPILER_NAME=gcc
29672    PICFLAG="-fPIC"
29673    LIBRARY_PREFIX=lib
29674    SHARED_LIBRARY='lib$1.so'
29675    STATIC_LIBRARY='lib$1.a'
29676    SHARED_LIBRARY_FLAGS="-shared"
29677    SHARED_LIBRARY_SUFFIX='.so'
29678    STATIC_LIBRARY_SUFFIX='.a'
29679    OBJ_SUFFIX='.o'
29680    EXE_SUFFIX=''
29681    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29682    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29683    C_FLAG_REORDER=''
29684    CXX_FLAG_REORDER=''
29685    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29686    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29687    LD="$CC"
29688    LDEXE="$CC"
29689    LDCXX="$CXX"
29690    LDEXECXX="$CXX"
29691    POST_STRIP_CMD="$STRIP -g"
29692
29693    # Linking is different on MacOSX
29694    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29695        # Might change in the future to clang.
29696        COMPILER_NAME=gcc
29697        SHARED_LIBRARY='lib$1.dylib'
29698        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29699        SHARED_LIBRARY_SUFFIX='.dylib'
29700        EXE_SUFFIX=''
29701        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29702        SET_SHARED_LIBRARY_MAPFILE=''
29703        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29704        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29705        POST_STRIP_CMD="$STRIP -S"
29706    fi
29707else
29708    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29709        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29710        COMPILER_NAME=ossc
29711        PICFLAG="-KPIC"
29712        LIBRARY_PREFIX=lib
29713        SHARED_LIBRARY='lib$1.so'
29714        STATIC_LIBRARY='lib$1.a'
29715        SHARED_LIBRARY_FLAGS="-G"
29716        SHARED_LIBRARY_SUFFIX='.so'
29717        STATIC_LIBRARY_SUFFIX='.a'
29718        OBJ_SUFFIX='.o'
29719        EXE_SUFFIX=''
29720        SET_SHARED_LIBRARY_NAME=''
29721        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29722	C_FLAG_REORDER='-xF'
29723	CXX_FLAG_REORDER='-xF'
29724        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29725        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29726        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29727        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29728        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29729        POST_STRIP_CMD="$STRIP -x"
29730        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29731    fi
29732    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29733        # If it is not gcc, then assume it is the MS Visual Studio compiler
29734        COMPILER_NAME=cl
29735        PICFLAG=""
29736        LIBRARY_PREFIX=
29737        SHARED_LIBRARY='$1.dll'
29738        STATIC_LIBRARY='$1.lib'
29739        SHARED_LIBRARY_FLAGS="-LD"
29740        SHARED_LIBRARY_SUFFIX='.dll'
29741        STATIC_LIBRARY_SUFFIX='.lib'
29742        OBJ_SUFFIX='.obj'
29743        EXE_SUFFIX='.exe'
29744        SET_SHARED_LIBRARY_NAME=''
29745        SET_SHARED_LIBRARY_MAPFILE=''
29746        SET_SHARED_LIBRARY_ORIGIN=''
29747        SET_EXECUTABLE_ORIGIN=''
29748    fi
29749fi
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768# The (cross) compiler is now configured, we can now test capabilities
29769# of the target platform.
29770
29771
29772
29773###############################################################################
29774#
29775# Setup the opt flags for different compilers
29776# and different operating systems.
29777#
29778
29779#
29780# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29781#
29782if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29783    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29784    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29785    CFLAGS="$CFLAGS -mstackrealign"
29786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29787$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29788    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29789/* end confdefs.h.  */
29790int main() { return 0; }
29791_ACEOF
29792if ac_fn_cxx_try_link "$LINENO"; then :
29793
29794		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29795$as_echo "yes" >&6; }
29796
29797else
29798
29799		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29800$as_echo "no" >&6; }
29801	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29802
29803fi
29804rm -f core conftest.err conftest.$ac_objext \
29805    conftest$ac_exeext conftest.$ac_ext
29806fi
29807
29808C_FLAG_DEPS="-MMD -MF"
29809CXX_FLAG_DEPS="-MMD -MF"
29810
29811case $COMPILER_TYPE in
29812  CC )
29813    D_FLAG="-g"
29814    case $COMPILER_NAME in
29815      gcc )
29816      	case $OPENJDK_TARGET_OS in
29817	  macosx )
29818	    # On MacOSX we optimize for size, something
29819	    # we should do for all platforms?
29820	    C_O_FLAG_HI="-Os"
29821	    C_O_FLAG_NORM="-Os"
29822	    C_O_FLAG_NONE=""
29823	    ;;
29824	  *)
29825	    C_O_FLAG_HI="-O3"
29826	    C_O_FLAG_NORM="-O2"
29827	    C_O_FLAG_NONE="-O0"
29828	    CFLAGS_DEBUG_SYMBOLS="-g"
29829	    CXXFLAGS_DEBUG_SYMBOLS="-g"
29830	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29831	       CFLAGS_DEBUG_SYMBOLS="-g1"
29832	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
29833	    fi
29834	    ;;
29835	esac
29836        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29837        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29838        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29839        ;;
29840      ossc )
29841        #
29842        # Forte has different names for this with their C++ compiler...
29843        #
29844        C_FLAG_DEPS="-xMMD -xMF"
29845        CXX_FLAG_DEPS="-xMMD -xMF"
29846
29847        # Extra options used with HIGHEST
29848        #
29849        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29850        #          done with care, there are some assumptions below that need to
29851        #          be understood about the use of pointers, and IEEE behavior.
29852        #
29853        # Use non-standard floating point mode (not IEEE 754)
29854        CC_HIGHEST="$CC_HIGHEST -fns"
29855        # Do some simplification of floating point arithmetic (not IEEE 754)
29856        CC_HIGHEST="$CC_HIGHEST -fsimple"
29857        # Use single precision floating point with 'float'
29858        CC_HIGHEST="$CC_HIGHEST -fsingle"
29859        # Assume memory references via basic pointer types do not alias
29860        #   (Source with excessing pointer casting and data access with mixed
29861        #    pointer types are not recommended)
29862        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29863        # Use intrinsic or inline versions for math/std functions
29864        #   (If you expect perfect errno behavior, do not use this)
29865        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29866        # Loop data dependency optimizations (need -xO3 or higher)
29867        CC_HIGHEST="$CC_HIGHEST -xdepend"
29868        # Pointer parameters to functions do not overlap
29869        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29870        #    If you pass in multiple pointers to the same data, do not use this)
29871        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29872        # Inline some library routines
29873        #   (If you expect perfect errno behavior, do not use this)
29874        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29875        # Use optimized math routines
29876        #   (If you expect perfect errno behavior, do not use this)
29877        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29878        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29879
29880        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29881          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29882          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29883        fi
29884
29885        case $OPENJDK_TARGET_CPU_ARCH in
29886          x86)
29887            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29888            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29889            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29890            C_O_FLAG_NONE="-xregs=no%frameptr"
29891            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29892            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29893            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29894            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29895            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29896               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29897               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29898            fi
29899            ;;
29900          sparc)
29901            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29902            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29903            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29904            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29905            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29906            C_O_FLAG_NONE=""
29907            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29908            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29909            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29910            CXX_O_FLAG_NONE=""
29911            ;;
29912        esac
29913
29914    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29915    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29916    esac
29917    ;;
29918  CL )
29919    D_FLAG=
29920    C_O_FLAG_HIGHEST="-O2"
29921    C_O_FLAG_HI="-O1"
29922    C_O_FLAG_NORM="-O1"
29923    C_O_FLAG_NONE="-Od"
29924    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29925    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29926    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29927    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29928    ;;
29929esac
29930
29931if test -z "$C_O_FLAG_HIGHEST"; then
29932   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29933fi
29934
29935if test -z "$CXX_O_FLAG_HIGHEST"; then
29936   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29937fi
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29953   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29954$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29955fi
29956
29957if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29958   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29959$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29960fi
29961
29962if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29963   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29964$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29965fi
29966
29967
29968# Check whether --with-extra-cflags was given.
29969if test "${with_extra_cflags+set}" = set; then :
29970  withval=$with_extra_cflags;
29971fi
29972
29973
29974
29975# Check whether --with-extra-cxxflags was given.
29976if test "${with_extra_cxxflags+set}" = set; then :
29977  withval=$with_extra_cxxflags;
29978fi
29979
29980
29981
29982# Check whether --with-extra-ldflags was given.
29983if test "${with_extra_ldflags+set}" = set; then :
29984  withval=$with_extra_ldflags;
29985fi
29986
29987
29988CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29989CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29990LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29991
29992# Hotspot needs these set in their legacy form
29993LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29994LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29995LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29996
29997
29998
29999
30000
30001###############################################################################
30002#
30003# Now setup the CFLAGS and LDFLAGS for the JDK build.
30004# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
30005#
30006case $COMPILER_NAME in
30007      gcc )
30008      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
30009                          -pipe \
30010                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
30011	  case $OPENJDK_TARGET_CPU_ARCH in
30012	  arm )
30013            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
30014	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
30015	  ;;
30016	  ppc )
30017            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
30018	  ;;
30019	  * )
30020	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
30021	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
30022          ;;
30023	  esac
30024          ;;
30025      ossc )
30026          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
30027          case $OPENJDK_TARGET_CPU_ARCH in
30028          x86 )
30029            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
30030       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
30031          ;;
30032          esac
30033
30034      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
30035      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
30036
30037          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
30038          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
30039          ;;
30040      cl )
30041          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
30042               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
30043	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
30044	       -DWIN32 -DIAL"
30045          case $OPENJDK_TARGET_CPU in
30046              x86 )
30047                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
30048                  ;;
30049              x86_64 )
30050                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
30051                  ;;
30052          esac
30053          ;;
30054esac
30055
30056###############################################################################
30057
30058CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
30059
30060# The package path is used only on macosx?
30061PACKAGE_PATH=/opt/local
30062
30063
30064if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
30065    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
30066    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
30067    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
30068    #   Note: -Dmacro         is the same as    #define macro 1
30069    #         -Dmacro=	    is the same as    #define macro
30070    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30071        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
30072    else
30073        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
30074    fi
30075else
30076    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
30077fi
30078if test "x$OPENJDK_TARGET_OS" = xlinux; then
30079    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
30080fi
30081if test "x$OPENJDK_TARGET_OS" = xwindows; then
30082    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
30083fi
30084if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30085    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
30086fi
30087if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30088    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
30089    # Setting these parameters makes it an error to link to macosx APIs that are
30090    # newer than the given OS version and makes the linked binaries compatible even
30091    # if built on a newer version of the OS.
30092    # The expected format is X.Y.Z
30093    MACOSX_VERSION_MIN=10.7.0
30094
30095    # The macro takes the version with no dots, ex: 1070
30096    # Let the flags variables get resolved in make for easier override on make
30097    # command line.
30098    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
30099    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
30100fi
30101if test "x$OPENJDK_TARGET_OS" = xbsd; then
30102    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
30103fi
30104if test "x$DEBUG_LEVEL" = xrelease; then
30105    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
30106    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30107        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
30108    fi
30109else
30110    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
30111fi
30112
30113CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
30114CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
30115
30116CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
30117        -I${JDK_OUTPUTDIR}/include \
30118        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
30119        -I${JDK_TOPDIR}/src/share/javavm/export \
30120        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
30121        -I${JDK_TOPDIR}/src/share/native/common \
30122        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
30123
30124# The shared libraries are compiled using the picflag.
30125CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
30126CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
30127
30128# Executable flags
30129CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
30130CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
30131
30132# Now this is odd. The JDK native libraries have to link against libjvm.so
30133# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
30134# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
30135# is identical for client and server? Yes. Which is picked at runtime (client or server)?
30136# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
30137# libraries will link to whatever is in memory. Yuck.
30138#
30139# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
30140if test "x$COMPILER_NAME" = xcl; then
30141    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
30142    if test "x$OPENJDK_TARGET_CPU" = xx86; then
30143        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
30144    fi
30145    # TODO: make -debug optional "--disable-full-debug-symbols"
30146    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
30147    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
30148    LDFLAGS_JDKLIB_SUFFIX=""
30149    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
30150        LDFLAGS_STACK_SIZE=1048576
30151    else
30152        LDFLAGS_STACK_SIZE=327680
30153    fi
30154    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
30155else
30156    if test "x$COMPILER_NAME" = xgcc; then
30157        # If this is a --hash-style=gnu system, use --hash-style=both, why?
30158        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
30159        if test -n "$HAS_GNU_HASH"; then
30160            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
30161        fi
30162        if test "x$OPENJDK_TARGET_OS" = xlinux; then
30163          # And since we now know that the linker is gnu, then add -z defs, to forbid
30164          # undefined symbols in object files.
30165          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
30166          if test "x$DEBUG_LEVEL" = "xrelease"; then
30167              # When building release libraries, tell the linker optimize them.
30168              # Should this be supplied to the OSS linker as well?
30169              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
30170          fi
30171        fi
30172    fi
30173    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
30174                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
30175
30176    # On some platforms (mac) the linker warns about non existing -L dirs.
30177    # Add server first if available. Linking aginst client does not always produce the same results.
30178    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
30179    # Default to server for other variants.
30180    if test "x$JVM_VARIANT_SERVER" = xtrue; then
30181        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
30182    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
30183        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
30184    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
30185        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
30186    else
30187        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
30188    fi
30189
30190    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
30191    if test "x$COMPILER_NAME" = xossc; then
30192        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
30193    fi
30194
30195    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
30196    if test "x$OPENJDK_TARGET_OS" = xlinux; then
30197        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
30198    fi
30199fi
30200
30201# Adjust flags according to debug level.
30202case $DEBUG_LEVEL in
30203      fastdebug )
30204              CFLAGS="$CFLAGS $D_FLAG"
30205              JAVAC_FLAGS="$JAVAC_FLAGS -g"
30206              ;;
30207      slowdebug )
30208              CFLAGS="$CFLAGS $D_FLAG"
30209	      C_O_FLAG_HI="$C_O_FLAG_NONE"
30210	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
30211	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
30212	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
30213              JAVAC_FLAGS="$JAVAC_FLAGS -g"
30214              ;;
30215esac
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231# Setup debug symbols (need objcopy from the toolchain for that)
30232
30233#
30234# ENABLE_DEBUG_SYMBOLS
30235# This must be done after the toolchain is setup, since we're looking at objcopy.
30236#
30237# Check whether --enable-debug-symbols was given.
30238if test "${enable_debug_symbols+set}" = set; then :
30239  enableval=$enable_debug_symbols;
30240fi
30241
30242
30243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
30244$as_echo_n "checking if we should generate debug symbols... " >&6; }
30245
30246if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30247   # explicit enabling of enable-debug-symbols and can't find objcopy
30248   #   this is an error
30249   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30250fi
30251
30252if test "x$enable_debug_symbols" = "xyes"; then
30253  ENABLE_DEBUG_SYMBOLS=true
30254elif test "x$enable_debug_symbols" = "xno"; then
30255  ENABLE_DEBUG_SYMBOLS=false
30256else
30257  # default on macosx is false
30258  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30259    ENABLE_DEBUG_SYMBOLS=false
30260  # Default is on if objcopy is found, otherwise off
30261  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
30262    ENABLE_DEBUG_SYMBOLS=true
30263  else
30264    ENABLE_DEBUG_SYMBOLS=false
30265  fi
30266fi
30267
30268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30269$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30270
30271#
30272# ZIP_DEBUGINFO_FILES
30273#
30274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30275$as_echo_n "checking if we should zip debug-info files... " >&6; }
30276# Check whether --enable-zip-debug-info was given.
30277if test "${enable_zip_debug_info+set}" = set; then :
30278  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30279else
30280  enable_zip_debug_info="yes"
30281fi
30282
30283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30284$as_echo "${enable_zip_debug_info}" >&6; }
30285
30286if test "x${enable_zip_debug_info}" = "xno"; then
30287   ZIP_DEBUGINFO_FILES=false
30288else
30289   ZIP_DEBUGINFO_FILES=true
30290fi
30291
30292
30293
30294
30295
30296
30297
30298###############################################################################
30299#
30300# Check dependencies for external and internal libraries.
30301#
30302###############################################################################
30303
30304
30305
30306###############################################################################
30307#
30308# OS specific settings that we never will need to probe.
30309#
30310if test "x$OPENJDK_TARGET_OS" = xlinux; then
30311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30312$as_echo_n "checking what is not needed on Linux?... " >&6; }
30313    PULSE_NOT_NEEDED=yes
30314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30315$as_echo "pulse" >&6; }
30316fi
30317
30318if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30320$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30321    ALSA_NOT_NEEDED=yes
30322    PULSE_NOT_NEEDED=yes
30323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30324$as_echo "alsa pulse" >&6; }
30325fi
30326
30327if test "x$OPENJDK_TARGET_OS" = xwindows; then
30328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30329$as_echo_n "checking what is not needed on Windows?... " >&6; }
30330    CUPS_NOT_NEEDED=yes
30331    ALSA_NOT_NEEDED=yes
30332    PULSE_NOT_NEEDED=yes
30333    X11_NOT_NEEDED=yes
30334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30335$as_echo "alsa cups pulse x11" >&6; }
30336fi
30337
30338if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30340$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30341    ALSA_NOT_NEEDED=yes
30342    PULSE_NOT_NEEDED=yes
30343    X11_NOT_NEEDED=yes
30344    FREETYPE2_NOT_NEEDED=yes
30345    # If the java runtime framework is disabled, then we need X11.
30346    # This will be adjusted below.
30347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30348$as_echo "alsa pulse x11" >&6; }
30349fi
30350
30351if test "x$OPENJDK_TARGET_OS" = xbsd; then
30352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30353$as_echo_n "checking what is not needed on bsd?... " >&6; }
30354    ALSA_NOT_NEEDED=yes
30355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30356$as_echo "alsa" >&6; }
30357fi
30358
30359if test "x$OPENJDK" = "xfalse"; then
30360    FREETYPE2_NOT_NEEDED=yes
30361fi
30362
30363if test "x$SUPPORT_HEADFUL" = xno; then
30364    X11_NOT_NEEDED=yes
30365fi
30366
30367###############################################################################
30368#
30369# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
30370# that uses this API.
30371#
30372# Check whether --enable-macosx-runtime-support was given.
30373if test "${enable_macosx_runtime_support+set}" = set; then :
30374  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30375else
30376  MACOSX_RUNTIME_SUPPORT="no"
30377fi
30378
30379
30380USE_MACOSX_RUNTIME_SUPPORT=no
30381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30382$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30383if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30384    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30385        MACOSX_RUNTIME_SUPPORT=yes
30386        USE_MACOSX_RUNTIME_SUPPORT=yes
30387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30388$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30389    else
30390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30391$as_echo "yes, but explicitly disabled." >&6; }
30392    fi
30393else
30394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30395$as_echo "no" >&6; }
30396fi
30397
30398if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30400$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30401    X11_NOT_NEEDED=
30402    FREETYPE2_NOT_NEEDED=
30403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30404$as_echo "alsa pulse" >&6; }
30405fi
30406
30407
30408
30409###############################################################################
30410#
30411# Check for X Windows
30412#
30413
30414# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30415# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30416# --x-libraries for the sysroot, if that seems to be correct.
30417if test "x$SYS_ROOT" != "x/"; then
30418  if test "x$x_includes" = xNONE; then
30419    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30420      x_includes="$SYS_ROOT/usr/X11R6/include"
30421    fi
30422  fi
30423  if test "x$x_libraries" = xNONE; then
30424    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30425      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30426    fi
30427  fi
30428fi
30429
30430# Now let autoconf do it's magic
30431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30432$as_echo_n "checking for X... " >&6; }
30433
30434
30435# Check whether --with-x was given.
30436if test "${with_x+set}" = set; then :
30437  withval=$with_x;
30438fi
30439
30440# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30441if test "x$with_x" = xno; then
30442  # The user explicitly disabled X.
30443  have_x=disabled
30444else
30445  case $x_includes,$x_libraries in #(
30446    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30447    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30448  $as_echo_n "(cached) " >&6
30449else
30450  # One or both of the vars are not set, and there is no cached value.
30451ac_x_includes=no ac_x_libraries=no
30452rm -f -r conftest.dir
30453if mkdir conftest.dir; then
30454  cd conftest.dir
30455  cat >Imakefile <<'_ACEOF'
30456incroot:
30457	@echo incroot='${INCROOT}'
30458usrlibdir:
30459	@echo usrlibdir='${USRLIBDIR}'
30460libdir:
30461	@echo libdir='${LIBDIR}'
30462_ACEOF
30463  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30464    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30465    for ac_var in incroot usrlibdir libdir; do
30466      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30467    done
30468    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30469    for ac_extension in a so sl dylib la dll; do
30470      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30471	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30472	ac_im_usrlibdir=$ac_im_libdir; break
30473      fi
30474    done
30475    # Screen out bogus values from the imake configuration.  They are
30476    # bogus both because they are the default anyway, and because
30477    # using them would break gcc on systems where it needs fixed includes.
30478    case $ac_im_incroot in
30479	/usr/include) ac_x_includes= ;;
30480	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30481    esac
30482    case $ac_im_usrlibdir in
30483	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30484	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30485    esac
30486  fi
30487  cd ..
30488  rm -f -r conftest.dir
30489fi
30490
30491# Standard set of common directories for X headers.
30492# Check X11 before X11Rn because it is often a symlink to the current release.
30493ac_x_header_dirs='
30494/usr/X11/include
30495/usr/X11R7/include
30496/usr/X11R6/include
30497/usr/X11R5/include
30498/usr/X11R4/include
30499
30500/usr/include/X11
30501/usr/include/X11R7
30502/usr/include/X11R6
30503/usr/include/X11R5
30504/usr/include/X11R4
30505
30506/usr/local/X11/include
30507/usr/local/X11R7/include
30508/usr/local/X11R6/include
30509/usr/local/X11R5/include
30510/usr/local/X11R4/include
30511
30512/usr/local/include/X11
30513/usr/local/include/X11R7
30514/usr/local/include/X11R6
30515/usr/local/include/X11R5
30516/usr/local/include/X11R4
30517
30518/usr/X386/include
30519/usr/x386/include
30520/usr/XFree86/include/X11
30521
30522/usr/include
30523/usr/local/include
30524/usr/unsupported/include
30525/usr/athena/include
30526/usr/local/x11r5/include
30527/usr/lpp/Xamples/include
30528
30529/usr/openwin/include
30530/usr/openwin/share/include'
30531
30532if test "$ac_x_includes" = no; then
30533  # Guess where to find include files, by looking for Xlib.h.
30534  # First, try using that file with no special directory specified.
30535  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30536/* end confdefs.h.  */
30537#include <X11/Xlib.h>
30538_ACEOF
30539if ac_fn_cxx_try_cpp "$LINENO"; then :
30540  # We can compile using X headers with no special include directory.
30541ac_x_includes=
30542else
30543  for ac_dir in $ac_x_header_dirs; do
30544  if test -r "$ac_dir/X11/Xlib.h"; then
30545    ac_x_includes=$ac_dir
30546    break
30547  fi
30548done
30549fi
30550rm -f conftest.err conftest.i conftest.$ac_ext
30551fi # $ac_x_includes = no
30552
30553if test "$ac_x_libraries" = no; then
30554  # Check for the libraries.
30555  # See if we find them without any special options.
30556  # Don't add to $LIBS permanently.
30557  ac_save_LIBS=$LIBS
30558  LIBS="-lX11 $LIBS"
30559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30560/* end confdefs.h.  */
30561#include <X11/Xlib.h>
30562int
30563main ()
30564{
30565XrmInitialize ()
30566  ;
30567  return 0;
30568}
30569_ACEOF
30570if ac_fn_cxx_try_link "$LINENO"; then :
30571  LIBS=$ac_save_LIBS
30572# We can link X programs with no special library path.
30573ac_x_libraries=
30574else
30575  LIBS=$ac_save_LIBS
30576for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30577do
30578  # Don't even attempt the hair of trying to link an X program!
30579  for ac_extension in a so sl dylib la dll; do
30580    if test -r "$ac_dir/libX11.$ac_extension"; then
30581      ac_x_libraries=$ac_dir
30582      break 2
30583    fi
30584  done
30585done
30586fi
30587rm -f core conftest.err conftest.$ac_objext \
30588    conftest$ac_exeext conftest.$ac_ext
30589fi # $ac_x_libraries = no
30590
30591case $ac_x_includes,$ac_x_libraries in #(
30592  no,* | *,no | *\'*)
30593    # Didn't find X, or a directory has "'" in its name.
30594    ac_cv_have_x="have_x=no";; #(
30595  *)
30596    # Record where we found X for the cache.
30597    ac_cv_have_x="have_x=yes\
30598	ac_x_includes='$ac_x_includes'\
30599	ac_x_libraries='$ac_x_libraries'"
30600esac
30601fi
30602;; #(
30603    *) have_x=yes;;
30604  esac
30605  eval "$ac_cv_have_x"
30606fi # $with_x != no
30607
30608if test "$have_x" != yes; then
30609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30610$as_echo "$have_x" >&6; }
30611  no_x=yes
30612else
30613  # If each of the values was on the command line, it overrides each guess.
30614  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30615  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30616  # Update the cache value to reflect the command line values.
30617  ac_cv_have_x="have_x=yes\
30618	ac_x_includes='$x_includes'\
30619	ac_x_libraries='$x_libraries'"
30620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30621$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30622fi
30623
30624if test "$no_x" = yes; then
30625  # Not all programs may use this symbol, but it does not hurt to define it.
30626
30627$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30628
30629  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30630else
30631  if test -n "$x_includes"; then
30632    X_CFLAGS="$X_CFLAGS -I$x_includes"
30633  fi
30634
30635  # It would also be nice to do this for all -L options, not just this one.
30636  if test -n "$x_libraries"; then
30637    X_LIBS="$X_LIBS -L$x_libraries"
30638    # For Solaris; some versions of Sun CC require a space after -R and
30639    # others require no space.  Words are not sufficient . . . .
30640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30641$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30642    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30643    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30644    ac_cxx_werror_flag=yes
30645    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30646/* end confdefs.h.  */
30647
30648int
30649main ()
30650{
30651
30652  ;
30653  return 0;
30654}
30655_ACEOF
30656if ac_fn_cxx_try_link "$LINENO"; then :
30657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30658$as_echo "no" >&6; }
30659       X_LIBS="$X_LIBS -R$x_libraries"
30660else
30661  LIBS="$ac_xsave_LIBS -R $x_libraries"
30662       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30663/* end confdefs.h.  */
30664
30665int
30666main ()
30667{
30668
30669  ;
30670  return 0;
30671}
30672_ACEOF
30673if ac_fn_cxx_try_link "$LINENO"; then :
30674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30675$as_echo "yes" >&6; }
30676	  X_LIBS="$X_LIBS -R $x_libraries"
30677else
30678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30679$as_echo "neither works" >&6; }
30680fi
30681rm -f core conftest.err conftest.$ac_objext \
30682    conftest$ac_exeext conftest.$ac_ext
30683fi
30684rm -f core conftest.err conftest.$ac_objext \
30685    conftest$ac_exeext conftest.$ac_ext
30686    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30687    LIBS=$ac_xsave_LIBS
30688  fi
30689
30690  # Check for system-dependent libraries X programs must link with.
30691  # Do this before checking for the system-independent R6 libraries
30692  # (-lICE), since we may need -lsocket or whatever for X linking.
30693
30694  if test "$ISC" = yes; then
30695    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30696  else
30697    # Martyn Johnson says this is needed for Ultrix, if the X
30698    # libraries were built with DECnet support.  And Karl Berry says
30699    # the Alpha needs dnet_stub (dnet does not exist).
30700    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30701    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30702/* end confdefs.h.  */
30703
30704/* Override any GCC internal prototype to avoid an error.
30705   Use char because int might match the return type of a GCC
30706   builtin and then its argument prototype would still apply.  */
30707#ifdef __cplusplus
30708extern "C"
30709#endif
30710char XOpenDisplay ();
30711int
30712main ()
30713{
30714return XOpenDisplay ();
30715  ;
30716  return 0;
30717}
30718_ACEOF
30719if ac_fn_cxx_try_link "$LINENO"; then :
30720
30721else
30722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30723$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30724if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30725  $as_echo_n "(cached) " >&6
30726else
30727  ac_check_lib_save_LIBS=$LIBS
30728LIBS="-ldnet  $LIBS"
30729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30730/* end confdefs.h.  */
30731
30732/* Override any GCC internal prototype to avoid an error.
30733   Use char because int might match the return type of a GCC
30734   builtin and then its argument prototype would still apply.  */
30735#ifdef __cplusplus
30736extern "C"
30737#endif
30738char dnet_ntoa ();
30739int
30740main ()
30741{
30742return dnet_ntoa ();
30743  ;
30744  return 0;
30745}
30746_ACEOF
30747if ac_fn_cxx_try_link "$LINENO"; then :
30748  ac_cv_lib_dnet_dnet_ntoa=yes
30749else
30750  ac_cv_lib_dnet_dnet_ntoa=no
30751fi
30752rm -f core conftest.err conftest.$ac_objext \
30753    conftest$ac_exeext conftest.$ac_ext
30754LIBS=$ac_check_lib_save_LIBS
30755fi
30756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30757$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30758if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30759  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30760fi
30761
30762    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30763      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30764$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30765if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30766  $as_echo_n "(cached) " >&6
30767else
30768  ac_check_lib_save_LIBS=$LIBS
30769LIBS="-ldnet_stub  $LIBS"
30770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30771/* end confdefs.h.  */
30772
30773/* Override any GCC internal prototype to avoid an error.
30774   Use char because int might match the return type of a GCC
30775   builtin and then its argument prototype would still apply.  */
30776#ifdef __cplusplus
30777extern "C"
30778#endif
30779char dnet_ntoa ();
30780int
30781main ()
30782{
30783return dnet_ntoa ();
30784  ;
30785  return 0;
30786}
30787_ACEOF
30788if ac_fn_cxx_try_link "$LINENO"; then :
30789  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30790else
30791  ac_cv_lib_dnet_stub_dnet_ntoa=no
30792fi
30793rm -f core conftest.err conftest.$ac_objext \
30794    conftest$ac_exeext conftest.$ac_ext
30795LIBS=$ac_check_lib_save_LIBS
30796fi
30797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30798$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30799if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30800  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30801fi
30802
30803    fi
30804fi
30805rm -f core conftest.err conftest.$ac_objext \
30806    conftest$ac_exeext conftest.$ac_ext
30807    LIBS="$ac_xsave_LIBS"
30808
30809    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30810    # to get the SysV transport functions.
30811    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30812    # needs -lnsl.
30813    # The nsl library prevents programs from opening the X display
30814    # on Irix 5.2, according to T.E. Dickey.
30815    # The functions gethostbyname, getservbyname, and inet_addr are
30816    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30817    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30818if test "x$ac_cv_func_gethostbyname" = xyes; then :
30819
30820fi
30821
30822    if test $ac_cv_func_gethostbyname = no; then
30823      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30824$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30825if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30826  $as_echo_n "(cached) " >&6
30827else
30828  ac_check_lib_save_LIBS=$LIBS
30829LIBS="-lnsl  $LIBS"
30830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30831/* end confdefs.h.  */
30832
30833/* Override any GCC internal prototype to avoid an error.
30834   Use char because int might match the return type of a GCC
30835   builtin and then its argument prototype would still apply.  */
30836#ifdef __cplusplus
30837extern "C"
30838#endif
30839char gethostbyname ();
30840int
30841main ()
30842{
30843return gethostbyname ();
30844  ;
30845  return 0;
30846}
30847_ACEOF
30848if ac_fn_cxx_try_link "$LINENO"; then :
30849  ac_cv_lib_nsl_gethostbyname=yes
30850else
30851  ac_cv_lib_nsl_gethostbyname=no
30852fi
30853rm -f core conftest.err conftest.$ac_objext \
30854    conftest$ac_exeext conftest.$ac_ext
30855LIBS=$ac_check_lib_save_LIBS
30856fi
30857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30858$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30859if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30860  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30861fi
30862
30863      if test $ac_cv_lib_nsl_gethostbyname = no; then
30864	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30865$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30866if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30867  $as_echo_n "(cached) " >&6
30868else
30869  ac_check_lib_save_LIBS=$LIBS
30870LIBS="-lbsd  $LIBS"
30871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30872/* end confdefs.h.  */
30873
30874/* Override any GCC internal prototype to avoid an error.
30875   Use char because int might match the return type of a GCC
30876   builtin and then its argument prototype would still apply.  */
30877#ifdef __cplusplus
30878extern "C"
30879#endif
30880char gethostbyname ();
30881int
30882main ()
30883{
30884return gethostbyname ();
30885  ;
30886  return 0;
30887}
30888_ACEOF
30889if ac_fn_cxx_try_link "$LINENO"; then :
30890  ac_cv_lib_bsd_gethostbyname=yes
30891else
30892  ac_cv_lib_bsd_gethostbyname=no
30893fi
30894rm -f core conftest.err conftest.$ac_objext \
30895    conftest$ac_exeext conftest.$ac_ext
30896LIBS=$ac_check_lib_save_LIBS
30897fi
30898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30899$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30900if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30901  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30902fi
30903
30904      fi
30905    fi
30906
30907    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30908    # socket/setsockopt and other routines are undefined under SCO ODT
30909    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30910    # on later versions), says Simon Leinen: it contains gethostby*
30911    # variants that don't use the name server (or something).  -lsocket
30912    # must be given before -lnsl if both are needed.  We assume that
30913    # if connect needs -lnsl, so does gethostbyname.
30914    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30915if test "x$ac_cv_func_connect" = xyes; then :
30916
30917fi
30918
30919    if test $ac_cv_func_connect = no; then
30920      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30921$as_echo_n "checking for connect in -lsocket... " >&6; }
30922if ${ac_cv_lib_socket_connect+:} false; then :
30923  $as_echo_n "(cached) " >&6
30924else
30925  ac_check_lib_save_LIBS=$LIBS
30926LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30928/* end confdefs.h.  */
30929
30930/* Override any GCC internal prototype to avoid an error.
30931   Use char because int might match the return type of a GCC
30932   builtin and then its argument prototype would still apply.  */
30933#ifdef __cplusplus
30934extern "C"
30935#endif
30936char connect ();
30937int
30938main ()
30939{
30940return connect ();
30941  ;
30942  return 0;
30943}
30944_ACEOF
30945if ac_fn_cxx_try_link "$LINENO"; then :
30946  ac_cv_lib_socket_connect=yes
30947else
30948  ac_cv_lib_socket_connect=no
30949fi
30950rm -f core conftest.err conftest.$ac_objext \
30951    conftest$ac_exeext conftest.$ac_ext
30952LIBS=$ac_check_lib_save_LIBS
30953fi
30954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30955$as_echo "$ac_cv_lib_socket_connect" >&6; }
30956if test "x$ac_cv_lib_socket_connect" = xyes; then :
30957  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30958fi
30959
30960    fi
30961
30962    # Guillermo Gomez says -lposix is necessary on A/UX.
30963    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30964if test "x$ac_cv_func_remove" = xyes; then :
30965
30966fi
30967
30968    if test $ac_cv_func_remove = no; then
30969      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30970$as_echo_n "checking for remove in -lposix... " >&6; }
30971if ${ac_cv_lib_posix_remove+:} false; then :
30972  $as_echo_n "(cached) " >&6
30973else
30974  ac_check_lib_save_LIBS=$LIBS
30975LIBS="-lposix  $LIBS"
30976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30977/* end confdefs.h.  */
30978
30979/* Override any GCC internal prototype to avoid an error.
30980   Use char because int might match the return type of a GCC
30981   builtin and then its argument prototype would still apply.  */
30982#ifdef __cplusplus
30983extern "C"
30984#endif
30985char remove ();
30986int
30987main ()
30988{
30989return remove ();
30990  ;
30991  return 0;
30992}
30993_ACEOF
30994if ac_fn_cxx_try_link "$LINENO"; then :
30995  ac_cv_lib_posix_remove=yes
30996else
30997  ac_cv_lib_posix_remove=no
30998fi
30999rm -f core conftest.err conftest.$ac_objext \
31000    conftest$ac_exeext conftest.$ac_ext
31001LIBS=$ac_check_lib_save_LIBS
31002fi
31003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
31004$as_echo "$ac_cv_lib_posix_remove" >&6; }
31005if test "x$ac_cv_lib_posix_remove" = xyes; then :
31006  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
31007fi
31008
31009    fi
31010
31011    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
31012    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
31013if test "x$ac_cv_func_shmat" = xyes; then :
31014
31015fi
31016
31017    if test $ac_cv_func_shmat = no; then
31018      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
31019$as_echo_n "checking for shmat in -lipc... " >&6; }
31020if ${ac_cv_lib_ipc_shmat+:} false; then :
31021  $as_echo_n "(cached) " >&6
31022else
31023  ac_check_lib_save_LIBS=$LIBS
31024LIBS="-lipc  $LIBS"
31025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31026/* end confdefs.h.  */
31027
31028/* Override any GCC internal prototype to avoid an error.
31029   Use char because int might match the return type of a GCC
31030   builtin and then its argument prototype would still apply.  */
31031#ifdef __cplusplus
31032extern "C"
31033#endif
31034char shmat ();
31035int
31036main ()
31037{
31038return shmat ();
31039  ;
31040  return 0;
31041}
31042_ACEOF
31043if ac_fn_cxx_try_link "$LINENO"; then :
31044  ac_cv_lib_ipc_shmat=yes
31045else
31046  ac_cv_lib_ipc_shmat=no
31047fi
31048rm -f core conftest.err conftest.$ac_objext \
31049    conftest$ac_exeext conftest.$ac_ext
31050LIBS=$ac_check_lib_save_LIBS
31051fi
31052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
31053$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
31054if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
31055  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
31056fi
31057
31058    fi
31059  fi
31060
31061  # Check for libraries that X11R6 Xt/Xaw programs need.
31062  ac_save_LDFLAGS=$LDFLAGS
31063  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
31064  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
31065  # check for ICE first), but we must link in the order -lSM -lICE or
31066  # we get undefined symbols.  So assume we have SM if we have ICE.
31067  # These have to be linked with before -lX11, unlike the other
31068  # libraries we check for below, so use a different variable.
31069  # John Interrante, Karl Berry
31070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
31071$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
31072if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
31073  $as_echo_n "(cached) " >&6
31074else
31075  ac_check_lib_save_LIBS=$LIBS
31076LIBS="-lICE $X_EXTRA_LIBS $LIBS"
31077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31078/* end confdefs.h.  */
31079
31080/* Override any GCC internal prototype to avoid an error.
31081   Use char because int might match the return type of a GCC
31082   builtin and then its argument prototype would still apply.  */
31083#ifdef __cplusplus
31084extern "C"
31085#endif
31086char IceConnectionNumber ();
31087int
31088main ()
31089{
31090return IceConnectionNumber ();
31091  ;
31092  return 0;
31093}
31094_ACEOF
31095if ac_fn_cxx_try_link "$LINENO"; then :
31096  ac_cv_lib_ICE_IceConnectionNumber=yes
31097else
31098  ac_cv_lib_ICE_IceConnectionNumber=no
31099fi
31100rm -f core conftest.err conftest.$ac_objext \
31101    conftest$ac_exeext conftest.$ac_ext
31102LIBS=$ac_check_lib_save_LIBS
31103fi
31104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
31105$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
31106if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
31107  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
31108fi
31109
31110  LDFLAGS=$ac_save_LDFLAGS
31111
31112fi
31113
31114
31115# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
31116# this doesn't make sense so we remove it.
31117if test "x$COMPILE_TYPE" = xcross; then
31118  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
31119fi
31120
31121if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
31122
31123    # Print a helpful message on how to acquire the necessary build dependency.
31124    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
31125    MISSING_DEPENDENCY=x11
31126    PKGHANDLER_COMMAND=
31127
31128    case $PKGHANDLER in
31129	apt-get)
31130                apt_help     $MISSING_DEPENDENCY ;;
31131    yum)
31132                yum_help     $MISSING_DEPENDENCY ;;
31133	port)
31134                port_help    $MISSING_DEPENDENCY ;;
31135	pkgutil)
31136                pkgutil_help $MISSING_DEPENDENCY ;;
31137	pkgadd)
31138                pkgadd_help  $MISSING_DEPENDENCY ;;
31139    * )
31140      break ;;
31141    esac
31142
31143    if test "x$PKGHANDLER_COMMAND" != x; then
31144        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31145    fi
31146
31147    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
31148fi
31149
31150# Some of the old makefiles require a setting of OPENWIN_HOME
31151# Since the X11R6 directory has disappeared on later Linuxes,
31152# we need to probe for it.
31153if test "x$OPENJDK_TARGET_OS" = xlinux; then
31154    if test -d "$SYS_ROOT/usr/X11R6"; then
31155        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
31156    fi
31157    if test -d "$SYS_ROOT/usr/include/X11"; then
31158        OPENWIN_HOME="$SYS_ROOT/usr"
31159    fi
31160fi
31161if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31162    OPENWIN_HOME="/usr/openwin"
31163fi
31164
31165
31166
31167#
31168# Weird Sol10 something check...TODO change to try compile
31169#
31170if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
31171  if test "`uname -r`" = "5.10"; then
31172     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
31173     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
31174     fi
31175  fi
31176fi
31177
31178ac_ext=c
31179ac_cpp='$CPP $CPPFLAGS'
31180ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31181ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31182ac_compiler_gnu=$ac_cv_c_compiler_gnu
31183
31184OLD_CFLAGS="$CFLAGS"
31185CFLAGS="$CFLAGS $X_CFLAGS"
31186
31187# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
31188for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
31189do :
31190  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31191ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
31192                   # include <X11/Xutil.h>
31193
31194"
31195if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31196  cat >>confdefs.h <<_ACEOF
31197#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31198_ACEOF
31199 X11_A_OK=yes
31200else
31201  X11_A_OK=no; break
31202fi
31203
31204done
31205
31206
31207CFLAGS="$OLD_CFLAGS"
31208ac_ext=cpp
31209ac_cpp='$CXXCPP $CPPFLAGS'
31210ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31211ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31212ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31213
31214
31215if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
31216
31217    # Print a helpful message on how to acquire the necessary build dependency.
31218    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
31219    MISSING_DEPENDENCY=x11
31220    PKGHANDLER_COMMAND=
31221
31222    case $PKGHANDLER in
31223	apt-get)
31224                apt_help     $MISSING_DEPENDENCY ;;
31225    yum)
31226                yum_help     $MISSING_DEPENDENCY ;;
31227	port)
31228                port_help    $MISSING_DEPENDENCY ;;
31229	pkgutil)
31230                pkgutil_help $MISSING_DEPENDENCY ;;
31231	pkgadd)
31232                pkgadd_help  $MISSING_DEPENDENCY ;;
31233    * )
31234      break ;;
31235    esac
31236
31237    if test "x$PKGHANDLER_COMMAND" != x; then
31238        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31239    fi
31240
31241    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
31242fi
31243
31244
31245
31246
31247
31248
31249###############################################################################
31250#
31251# The common unix printing system cups is used to print from java.
31252#
31253
31254# Check whether --with-cups was given.
31255if test "${with_cups+set}" = set; then :
31256  withval=$with_cups;
31257fi
31258
31259
31260# Check whether --with-cups-include was given.
31261if test "${with_cups_include+set}" = set; then :
31262  withval=$with_cups_include;
31263fi
31264
31265
31266if test "x$CUPS_NOT_NEEDED" = xyes; then
31267	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31268		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31269$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31270	fi
31271	CUPS_CFLAGS=
31272else
31273	CUPS_FOUND=no
31274
31275	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31276	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31277	fi
31278
31279	if test "x${with_cups}" != x; then
31280	    CUPS_CFLAGS="-I${with_cups}/include"
31281	    CUPS_FOUND=yes
31282	fi
31283	if test "x${with_cups_include}" != x; then
31284	    CUPS_CFLAGS="-I${with_cups_include}"
31285	    CUPS_FOUND=yes
31286	fi
31287	if test "x$CUPS_FOUND" = xno; then
31288
31289
31290    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31291        # Source the builddeps file again, to make sure it uses the latest variables!
31292        . $builddepsfile
31293        # Look for a target and build machine specific resource!
31294        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31295        if test "x$resource" = x; then
31296            # Ok, lets instead look for a target specific resource
31297            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31298        fi
31299        if test "x$resource" = x; then
31300            # Ok, lets instead look for a build specific resource
31301            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31302        fi
31303        if test "x$resource" = x; then
31304            # Ok, lets instead look for a generic resource
31305            # (The cups comes from M4 and not the shell, thus no need for eval here.)
31306            resource=${builddep_cups}
31307        fi
31308        if test "x$resource" != x; then
31309            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31310$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31311	    # If the resource in the builddeps.conf file is an existing directory,
31312	    # for example /java/linux/cups
31313	    if test -d ${resource}; then
31314	       depdir=${resource}
31315	    else
31316
31317# cups is for example mymodule
31318# $resource is for example libs/general/libmymod_1_2_3.zip
31319# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31320# $with_builddeps_dir is for example /localhome/builddeps
31321# depdir is the name of the variable into which we store the depdir, eg MYMOD
31322# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31323# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31324    filename=`basename $resource`
31325    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31326    filebase=${filename%%.*}
31327    extension=${filename#*.}
31328    installdir=$with_builddeps_dir/$filebase
31329    if test ! -f $installdir/$filename.unpacked; then
31330        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31331$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31332        if test ! -d $installdir; then
31333            mkdir -p $installdir
31334        fi
31335        if test ! -d $installdir; then
31336            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31337        fi
31338        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31339        touch $tmpfile
31340        if test ! -f $tmpfile; then
31341            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31342        fi
31343
31344    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31345    # $tmpfile is the local file name for the downloaded file.
31346    VALID_TOOL=no
31347    if test "x$BDEPS_FTP" = xwget; then
31348       VALID_TOOL=yes
31349       wget -O $tmpfile $with_builddeps_server/$resource
31350    fi
31351    if test "x$BDEPS_FTP" = xlftp; then
31352       VALID_TOOL=yes
31353       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31354    fi
31355    if test "x$BDEPS_FTP" = xftp; then
31356        VALID_TOOL=yes
31357        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31358        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31359        FTPUSERPWD=${FTPSERVER%%@*}
31360        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31361            FTPUSER=${userpwd%%:*}
31362            FTPPWD=${userpwd#*@}
31363            FTPSERVER=${FTPSERVER#*@}
31364        else
31365            FTPUSER=ftp
31366            FTPPWD=ftp
31367        fi
31368        # the "pass" command does not work on some
31369        # ftp clients (read ftp.exe) but if it works,
31370        # passive mode is better!
31371        (\
31372            echo "user $FTPUSER $FTPPWD"        ;\
31373            echo "pass"                         ;\
31374            echo "bin"                          ;\
31375            echo "get $FTPPATH $tmpfile"              ;\
31376        ) | ftp -in $FTPSERVER
31377    fi
31378    if test "x$VALID_TOOL" != xyes; then
31379       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31380    fi
31381
31382        mv $tmpfile $installdir/$filename
31383        if test ! -s $installdir/$filename; then
31384            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31385        fi
31386        case "$extension" in
31387            zip)  echo "Unzipping $installdir/$filename..."
31388               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31389            ;;
31390            tar.gz) echo "Untaring $installdir/$filename..."
31391               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31392            ;;
31393            tgz) echo "Untaring $installdir/$filename..."
31394               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31395            ;;
31396            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31397            ;;
31398        esac
31399    fi
31400    if test -f $installdir/$filename.unpacked; then
31401        depdir=$installdir
31402    fi
31403
31404	    fi
31405            # Source the builddeps file again, because in the previous command, the depdir
31406            # was updated to point at the current build dependency install directory.
31407            . $builddepsfile
31408            # Now extract variables from the builddeps.conf files.
31409            theroot=${builddep_cups_ROOT}
31410            thecflags=${builddep_cups_CFLAGS}
31411            thelibs=${builddep_cups_LIBS}
31412            if test "x$depdir" = x; then
31413                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31414            fi
31415            CUPS=$depdir
31416            if test "x$theroot" != x; then
31417               CUPS="$theroot"
31418            fi
31419            if test "x$thecflags" != x; then
31420               CUPS_CFLAGS="$thecflags"
31421            fi
31422            if test "x$thelibs" != x; then
31423               CUPS_LIBS="$thelibs"
31424            fi
31425            CUPS_FOUND=yes
31426
31427        fi
31428
31429    fi
31430
31431	fi
31432	if test "x$CUPS_FOUND" = xno; then
31433	    # Are the cups headers installed in the default /usr/include location?
31434	    for ac_header in cups/cups.h cups/ppd.h
31435do :
31436  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31437ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31438if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31439  cat >>confdefs.h <<_ACEOF
31440#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31441_ACEOF
31442 CUPS_FOUND=yes
31443	                      CUPS_CFLAGS=
31444	                      DEFAULT_CUPS=yes
31445fi
31446
31447done
31448
31449	fi
31450	if test "x$CUPS_FOUND" = xno; then
31451	    # Getting nervous now? Lets poke around for standard Solaris third-party
31452	    # package installation locations.
31453	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31454$as_echo_n "checking for cups headers... " >&6; }
31455	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31456	       # An SFW package seems to be installed!
31457	       CUPS_FOUND=yes
31458	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31459	    elif test -s /opt/csw/include/cups/cups.h; then
31460	       # A CSW package seems to be installed!
31461	       CUPS_FOUND=yes
31462	       CUPS_CFLAGS="-I/opt/csw/include"
31463	    fi
31464	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31465$as_echo "$CUPS_FOUND" >&6; }
31466	fi
31467	if test "x$CUPS_FOUND" = xno; then
31468
31469    # Print a helpful message on how to acquire the necessary build dependency.
31470    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31471    MISSING_DEPENDENCY=cups
31472    PKGHANDLER_COMMAND=
31473
31474    case $PKGHANDLER in
31475	apt-get)
31476                apt_help     $MISSING_DEPENDENCY ;;
31477    yum)
31478                yum_help     $MISSING_DEPENDENCY ;;
31479	port)
31480                port_help    $MISSING_DEPENDENCY ;;
31481	pkgutil)
31482                pkgutil_help $MISSING_DEPENDENCY ;;
31483	pkgadd)
31484                pkgadd_help  $MISSING_DEPENDENCY ;;
31485    * )
31486      break ;;
31487    esac
31488
31489    if test "x$PKGHANDLER_COMMAND" != x; then
31490        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31491    fi
31492
31493	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31494	fi
31495fi
31496
31497
31498
31499
31500
31501
31502###############################################################################
31503#
31504# The ubiquitous freetype2 library is used to render fonts.
31505#
31506
31507# Check whether --with-freetype was given.
31508if test "${with_freetype+set}" = set; then :
31509  withval=$with_freetype;
31510fi
31511
31512
31513# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31514USING_SYSTEM_FT_LIB=false
31515
31516if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31517	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31518		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31519$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31520	fi
31521	FREETYPE2_CFLAGS=
31522	FREETYPE2_LIBS=
31523        FREETYPE2_LIB_PATH=
31524else
31525	FREETYPE2_FOUND=no
31526
31527	if test "x$with_freetype" != x; then
31528
31529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31530
31531  # Input might be given as Windows format, start by converting to
31532  # unix format.
31533  path="$with_freetype"
31534  new_path=`$CYGPATH -u "$path"`
31535
31536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31539  # "foo.exe" is OK but "foo" is an error.
31540  #
31541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31542  # It is also a way to make sure we got the proper file name for the real test later on.
31543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31544  if test "x$test_shortpath" = x; then
31545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31546$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31547    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31548  fi
31549
31550  # Call helper function which possibly converts this using DOS-style short mode.
31551  # If so, the updated path is stored in $new_path.
31552
31553  input_path="$new_path"
31554  # Check if we need to convert this using DOS-style short mode. If the path
31555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31556  # take no chances and rewrite it.
31557  # Note: m4 eats our [], so we need to use [ and ] instead.
31558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31559  if test "x$has_forbidden_chars" != x; then
31560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31564      # Going to short mode and back again did indeed matter. Since short mode is
31565      # case insensitive, let's make it lowercase to improve readability.
31566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31567      # Now convert it back to Unix-stile (cygpath)
31568      input_path=`$CYGPATH -u "$shortmode_path"`
31569      new_path="$input_path"
31570    fi
31571  fi
31572
31573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31574  if test "x$test_cygdrive_prefix" = x; then
31575    # As a simple fix, exclude /usr/bin since it's not a real path.
31576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31578      # a path prefixed by /cygdrive for fixpath to work.
31579      new_path="$CYGWIN_ROOT_PATH$input_path"
31580    fi
31581  fi
31582
31583
31584  if test "x$path" != "x$new_path"; then
31585    with_freetype="$new_path"
31586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31587$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31588  fi
31589
31590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31591
31592  path="$with_freetype"
31593  has_colon=`$ECHO $path | $GREP ^.:`
31594  new_path="$path"
31595  if test "x$has_colon" = x; then
31596    # Not in mixed or Windows style, start by that.
31597    new_path=`cmd //c echo $path`
31598  fi
31599
31600
31601  input_path="$new_path"
31602  # Check if we need to convert this using DOS-style short mode. If the path
31603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31604  # take no chances and rewrite it.
31605  # Note: m4 eats our [], so we need to use [ and ] instead.
31606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31607  if test "x$has_forbidden_chars" != x; then
31608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31610  fi
31611
31612
31613  windows_path="$new_path"
31614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31615    unix_path=`$CYGPATH -u "$windows_path"`
31616    new_path="$unix_path"
31617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31619    new_path="$unix_path"
31620  fi
31621
31622  if test "x$path" != "x$new_path"; then
31623    with_freetype="$new_path"
31624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31625$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31626  fi
31627
31628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31630
31631  else
31632    # We're on a posix platform. Hooray! :)
31633    path="$with_freetype"
31634
31635    if test ! -f "$path" && test ! -d "$path"; then
31636      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31637    fi
31638
31639    has_space=`$ECHO "$path" | $GREP " "`
31640    if test "x$has_space" != x; then
31641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31642$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31643      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31644    fi
31645  fi
31646
31647	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31648            FREETYPE2_LIB_PATH="$with_freetype/lib"
31649            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31650                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31651                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31652            fi
31653            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31654                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31655            fi
31656	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31657            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31658                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31659            fi
31660 	    FREETYPE2_FOUND=yes
31661   	    if test "x$FREETYPE2_FOUND" = xyes; then
31662	        # Verify that the directories exist
31663                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31664		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31665		fi
31666	        # List the contents of the lib.
31667		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31668                if test "x$FREETYPELIB" = x; then
31669		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31670		fi
31671	        # Check one h-file
31672                if ! test -s "$with_freetype/include/ft2build.h"; then
31673		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31674		fi
31675            fi
31676        fi
31677	if test "x$FREETYPE2_FOUND" = xno; then
31678
31679
31680    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31681        # Source the builddeps file again, to make sure it uses the latest variables!
31682        . $builddepsfile
31683        # Look for a target and build machine specific resource!
31684        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31685        if test "x$resource" = x; then
31686            # Ok, lets instead look for a target specific resource
31687            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31688        fi
31689        if test "x$resource" = x; then
31690            # Ok, lets instead look for a build specific resource
31691            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31692        fi
31693        if test "x$resource" = x; then
31694            # Ok, lets instead look for a generic resource
31695            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31696            resource=${builddep_freetype2}
31697        fi
31698        if test "x$resource" != x; then
31699            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31700$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31701	    # If the resource in the builddeps.conf file is an existing directory,
31702	    # for example /java/linux/cups
31703	    if test -d ${resource}; then
31704	       depdir=${resource}
31705	    else
31706
31707# freetype2 is for example mymodule
31708# $resource is for example libs/general/libmymod_1_2_3.zip
31709# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31710# $with_builddeps_dir is for example /localhome/builddeps
31711# depdir is the name of the variable into which we store the depdir, eg MYMOD
31712# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31713# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31714    filename=`basename $resource`
31715    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31716    filebase=${filename%%.*}
31717    extension=${filename#*.}
31718    installdir=$with_builddeps_dir/$filebase
31719    if test ! -f $installdir/$filename.unpacked; then
31720        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31721$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31722        if test ! -d $installdir; then
31723            mkdir -p $installdir
31724        fi
31725        if test ! -d $installdir; then
31726            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31727        fi
31728        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31729        touch $tmpfile
31730        if test ! -f $tmpfile; then
31731            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31732        fi
31733
31734    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31735    # $tmpfile is the local file name for the downloaded file.
31736    VALID_TOOL=no
31737    if test "x$BDEPS_FTP" = xwget; then
31738       VALID_TOOL=yes
31739       wget -O $tmpfile $with_builddeps_server/$resource
31740    fi
31741    if test "x$BDEPS_FTP" = xlftp; then
31742       VALID_TOOL=yes
31743       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31744    fi
31745    if test "x$BDEPS_FTP" = xftp; then
31746        VALID_TOOL=yes
31747        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31748        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31749        FTPUSERPWD=${FTPSERVER%%@*}
31750        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31751            FTPUSER=${userpwd%%:*}
31752            FTPPWD=${userpwd#*@}
31753            FTPSERVER=${FTPSERVER#*@}
31754        else
31755            FTPUSER=ftp
31756            FTPPWD=ftp
31757        fi
31758        # the "pass" command does not work on some
31759        # ftp clients (read ftp.exe) but if it works,
31760        # passive mode is better!
31761        (\
31762            echo "user $FTPUSER $FTPPWD"        ;\
31763            echo "pass"                         ;\
31764            echo "bin"                          ;\
31765            echo "get $FTPPATH $tmpfile"              ;\
31766        ) | ftp -in $FTPSERVER
31767    fi
31768    if test "x$VALID_TOOL" != xyes; then
31769       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31770    fi
31771
31772        mv $tmpfile $installdir/$filename
31773        if test ! -s $installdir/$filename; then
31774            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31775        fi
31776        case "$extension" in
31777            zip)  echo "Unzipping $installdir/$filename..."
31778               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31779            ;;
31780            tar.gz) echo "Untaring $installdir/$filename..."
31781               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31782            ;;
31783            tgz) echo "Untaring $installdir/$filename..."
31784               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31785            ;;
31786            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31787            ;;
31788        esac
31789    fi
31790    if test -f $installdir/$filename.unpacked; then
31791        depdir=$installdir
31792    fi
31793
31794	    fi
31795            # Source the builddeps file again, because in the previous command, the depdir
31796            # was updated to point at the current build dependency install directory.
31797            . $builddepsfile
31798            # Now extract variables from the builddeps.conf files.
31799            theroot=${builddep_freetype2_ROOT}
31800            thecflags=${builddep_freetype2_CFLAGS}
31801            thelibs=${builddep_freetype2_LIBS}
31802            if test "x$depdir" = x; then
31803                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31804            fi
31805            FREETYPE2=$depdir
31806            if test "x$theroot" != x; then
31807               FREETYPE2="$theroot"
31808            fi
31809            if test "x$thecflags" != x; then
31810               FREETYPE2_CFLAGS="$thecflags"
31811            fi
31812            if test "x$thelibs" != x; then
31813               FREETYPE2_LIBS="$thelibs"
31814            fi
31815            FREETYPE2_FOUND=yes
31816            else FREETYPE2_FOUND=no
31817
31818        fi
31819        else FREETYPE2_FOUND=no
31820
31821    fi
31822
31823            USING_SYSTEM_FT_LIB=true
31824	fi
31825	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31826            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31827
31828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31829
31830  # Input might be given as Windows format, start by converting to
31831  # unix format.
31832  path="$FREETYPELOCATION"
31833  new_path=`$CYGPATH -u "$path"`
31834
31835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31838  # "foo.exe" is OK but "foo" is an error.
31839  #
31840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31841  # It is also a way to make sure we got the proper file name for the real test later on.
31842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31843  if test "x$test_shortpath" = x; then
31844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31845$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31846    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31847  fi
31848
31849  # Call helper function which possibly converts this using DOS-style short mode.
31850  # If so, the updated path is stored in $new_path.
31851
31852  input_path="$new_path"
31853  # Check if we need to convert this using DOS-style short mode. If the path
31854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31855  # take no chances and rewrite it.
31856  # Note: m4 eats our [], so we need to use [ and ] instead.
31857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31858  if test "x$has_forbidden_chars" != x; then
31859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31863      # Going to short mode and back again did indeed matter. Since short mode is
31864      # case insensitive, let's make it lowercase to improve readability.
31865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31866      # Now convert it back to Unix-stile (cygpath)
31867      input_path=`$CYGPATH -u "$shortmode_path"`
31868      new_path="$input_path"
31869    fi
31870  fi
31871
31872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31873  if test "x$test_cygdrive_prefix" = x; then
31874    # As a simple fix, exclude /usr/bin since it's not a real path.
31875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31877      # a path prefixed by /cygdrive for fixpath to work.
31878      new_path="$CYGWIN_ROOT_PATH$input_path"
31879    fi
31880  fi
31881
31882
31883  if test "x$path" != "x$new_path"; then
31884    FREETYPELOCATION="$new_path"
31885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31886$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31887  fi
31888
31889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31890
31891  path="$FREETYPELOCATION"
31892  has_colon=`$ECHO $path | $GREP ^.:`
31893  new_path="$path"
31894  if test "x$has_colon" = x; then
31895    # Not in mixed or Windows style, start by that.
31896    new_path=`cmd //c echo $path`
31897  fi
31898
31899
31900  input_path="$new_path"
31901  # Check if we need to convert this using DOS-style short mode. If the path
31902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31903  # take no chances and rewrite it.
31904  # Note: m4 eats our [], so we need to use [ and ] instead.
31905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31906  if test "x$has_forbidden_chars" != x; then
31907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31909  fi
31910
31911
31912  windows_path="$new_path"
31913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31914    unix_path=`$CYGPATH -u "$windows_path"`
31915    new_path="$unix_path"
31916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31918    new_path="$unix_path"
31919  fi
31920
31921  if test "x$path" != "x$new_path"; then
31922    FREETYPELOCATION="$new_path"
31923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31924$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31925  fi
31926
31927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31929
31930  else
31931    # We're on a posix platform. Hooray! :)
31932    path="$FREETYPELOCATION"
31933
31934    if test ! -f "$path" && test ! -d "$path"; then
31935      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31936    fi
31937
31938    has_space=`$ECHO "$path" | $GREP " "`
31939    if test "x$has_space" != x; then
31940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31941$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31942      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31943    fi
31944  fi
31945
31946	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31947$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31948	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31949	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31950	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31951 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31952                if ! test -s "$FREETYPE2_LIBS"; then
31953		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31954		fi
31955                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31956		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31957		fi
31958                USING_SYSTEM_FT_LIB=true
31959                FREETYPE2_FOUND=yes
31960	    fi
31961	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31962$as_echo "$FREETYPE2_FOUND" >&6; }
31963        fi
31964	if test "x$FREETYPE2_FOUND" = xno; then
31965
31966pkg_failed=no
31967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31968$as_echo_n "checking for FREETYPE2... " >&6; }
31969
31970if test -n "$FREETYPE2_CFLAGS"; then
31971    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31972 elif test -n "$PKG_CONFIG"; then
31973    if test -n "$PKG_CONFIG" && \
31974    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31975  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31976  ac_status=$?
31977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31978  test $ac_status = 0; }; then
31979  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31980else
31981  pkg_failed=yes
31982fi
31983 else
31984    pkg_failed=untried
31985fi
31986if test -n "$FREETYPE2_LIBS"; then
31987    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31988 elif test -n "$PKG_CONFIG"; then
31989    if test -n "$PKG_CONFIG" && \
31990    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31991  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31992  ac_status=$?
31993  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31994  test $ac_status = 0; }; then
31995  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31996else
31997  pkg_failed=yes
31998fi
31999 else
32000    pkg_failed=untried
32001fi
32002
32003
32004
32005if test $pkg_failed = yes; then
32006
32007if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32008        _pkg_short_errors_supported=yes
32009else
32010        _pkg_short_errors_supported=no
32011fi
32012        if test $_pkg_short_errors_supported = yes; then
32013	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
32014        else
32015	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
32016        fi
32017	# Put the nasty error message in config.log where it belongs
32018	echo "$FREETYPE2_PKG_ERRORS" >&5
32019
32020	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32021$as_echo "no" >&6; }
32022                FREETYPE2_FOUND=no
32023elif test $pkg_failed = untried; then
32024	FREETYPE2_FOUND=no
32025else
32026	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
32027	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
32028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32029$as_echo "yes" >&6; }
32030	FREETYPE2_FOUND=yes
32031fi
32032            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
32033            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
32034            USING_SYSTEM_FT_LIB=true
32035            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
32036            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
32037              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
32038            fi
32039	fi
32040	if test "x$FREETYPE2_FOUND" = xno; then
32041	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
32042$as_echo_n "checking for freetype in some standard locations... " >&6; }
32043
32044	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
32045	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
32046	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
32047	    fi
32048	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
32049	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
32050	        DEFAULT_FREETYPE_LIBS="-lfreetype"
32051	    fi
32052
32053	    PREV_CXXCFLAGS="$CXXFLAGS"
32054	    PREV_LDFLAGS="$LDFLAGS"
32055	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
32056	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
32057	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32058/* end confdefs.h.  */
32059#include<ft2build.h>
32060	                    #include FT_FREETYPE_H
32061	                   int main() { return 0; }
32062
32063_ACEOF
32064if ac_fn_cxx_try_link "$LINENO"; then :
32065
32066	                      # Yes, the default cflags and libs did the trick.
32067	                      FREETYPE2_FOUND=yes
32068	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
32069	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
32070
32071else
32072
32073	                      FREETYPE2_FOUND=no
32074
32075fi
32076rm -f core conftest.err conftest.$ac_objext \
32077    conftest$ac_exeext conftest.$ac_ext
32078            CXXCFLAGS="$PREV_CXXFLAGS"
32079	    LDFLAGS="$PREV_LDFLAGS"
32080	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
32081$as_echo "$FREETYPE2_FOUND" >&6; }
32082            USING_SYSTEM_FT_LIB=true
32083	fi
32084	if test "x$FREETYPE2_FOUND" = xno; then
32085
32086    # Print a helpful message on how to acquire the necessary build dependency.
32087    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
32088    MISSING_DEPENDENCY=freetype2
32089    PKGHANDLER_COMMAND=
32090
32091    case $PKGHANDLER in
32092	apt-get)
32093                apt_help     $MISSING_DEPENDENCY ;;
32094    yum)
32095                yum_help     $MISSING_DEPENDENCY ;;
32096	port)
32097                port_help    $MISSING_DEPENDENCY ;;
32098	pkgutil)
32099                pkgutil_help $MISSING_DEPENDENCY ;;
32100	pkgadd)
32101                pkgadd_help  $MISSING_DEPENDENCY ;;
32102    * )
32103      break ;;
32104    esac
32105
32106    if test "x$PKGHANDLER_COMMAND" != x; then
32107        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32108    fi
32109
32110		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
32111	fi
32112
32113        if test "x$OPENJDK_TARGET_OS" != xwindows; then
32114            # AC_CHECK_LIB does not support use of cl.exe
32115            PREV_LDFLAGS="$LDFLAGS"
32116            LDFLAGS="$FREETYPE2_LIBS"
32117            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
32118$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
32119if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
32120  $as_echo_n "(cached) " >&6
32121else
32122  ac_check_lib_save_LIBS=$LIBS
32123LIBS="-lfreetype  $LIBS"
32124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32125/* end confdefs.h.  */
32126
32127/* Override any GCC internal prototype to avoid an error.
32128   Use char because int might match the return type of a GCC
32129   builtin and then its argument prototype would still apply.  */
32130#ifdef __cplusplus
32131extern "C"
32132#endif
32133char FT_Init_FreeType ();
32134int
32135main ()
32136{
32137return FT_Init_FreeType ();
32138  ;
32139  return 0;
32140}
32141_ACEOF
32142if ac_fn_cxx_try_link "$LINENO"; then :
32143  ac_cv_lib_freetype_FT_Init_FreeType=yes
32144else
32145  ac_cv_lib_freetype_FT_Init_FreeType=no
32146fi
32147rm -f core conftest.err conftest.$ac_objext \
32148    conftest$ac_exeext conftest.$ac_ext
32149LIBS=$ac_check_lib_save_LIBS
32150fi
32151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
32152$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
32153if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
32154  FREETYPE2_FOUND=true
32155else
32156  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
32157fi
32158
32159            LDFLAGS="$PREV_LDFLAGS"
32160        fi
32161fi
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171###############################################################################
32172#
32173# Check for alsa headers and libraries. Used on Linux/GNU systems.
32174#
32175
32176# Check whether --with-alsa was given.
32177if test "${with_alsa+set}" = set; then :
32178  withval=$with_alsa;
32179fi
32180
32181
32182# Check whether --with-alsa-include was given.
32183if test "${with_alsa_include+set}" = set; then :
32184  withval=$with_alsa_include;
32185fi
32186
32187
32188# Check whether --with-alsa-lib was given.
32189if test "${with_alsa_lib+set}" = set; then :
32190  withval=$with_alsa_lib;
32191fi
32192
32193
32194if test "x$ALSA_NOT_NEEDED" = xyes; then
32195	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
32196		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
32197$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
32198	fi
32199	ALSA_CFLAGS=
32200	ALSA_LIBS=
32201else
32202	ALSA_FOUND=no
32203
32204	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
32205	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
32206	fi
32207
32208	if test "x${with_alsa}" != x; then
32209	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
32210	    ALSA_CFLAGS="-I${with_alsa}/include"
32211	    ALSA_FOUND=yes
32212	fi
32213	if test "x${with_alsa_include}" != x; then
32214	    ALSA_CFLAGS="-I${with_alsa_include}"
32215	    ALSA_FOUND=yes
32216	fi
32217	if test "x${with_alsa_lib}" != x; then
32218	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
32219	    ALSA_FOUND=yes
32220	fi
32221	if test "x$ALSA_FOUND" = xno; then
32222
32223
32224    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
32225        # Source the builddeps file again, to make sure it uses the latest variables!
32226        . $builddepsfile
32227        # Look for a target and build machine specific resource!
32228        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
32229        if test "x$resource" = x; then
32230            # Ok, lets instead look for a target specific resource
32231            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
32232        fi
32233        if test "x$resource" = x; then
32234            # Ok, lets instead look for a build specific resource
32235            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
32236        fi
32237        if test "x$resource" = x; then
32238            # Ok, lets instead look for a generic resource
32239            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
32240            resource=${builddep_alsa}
32241        fi
32242        if test "x$resource" != x; then
32243            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
32244$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
32245	    # If the resource in the builddeps.conf file is an existing directory,
32246	    # for example /java/linux/cups
32247	    if test -d ${resource}; then
32248	       depdir=${resource}
32249	    else
32250
32251# alsa is for example mymodule
32252# $resource is for example libs/general/libmymod_1_2_3.zip
32253# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
32254# $with_builddeps_dir is for example /localhome/builddeps
32255# depdir is the name of the variable into which we store the depdir, eg MYMOD
32256# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
32257# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
32258    filename=`basename $resource`
32259    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
32260    filebase=${filename%%.*}
32261    extension=${filename#*.}
32262    installdir=$with_builddeps_dir/$filebase
32263    if test ! -f $installdir/$filename.unpacked; then
32264        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
32265$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
32266        if test ! -d $installdir; then
32267            mkdir -p $installdir
32268        fi
32269        if test ! -d $installdir; then
32270            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
32271        fi
32272        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
32273        touch $tmpfile
32274        if test ! -f $tmpfile; then
32275            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
32276        fi
32277
32278    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32279    # $tmpfile is the local file name for the downloaded file.
32280    VALID_TOOL=no
32281    if test "x$BDEPS_FTP" = xwget; then
32282       VALID_TOOL=yes
32283       wget -O $tmpfile $with_builddeps_server/$resource
32284    fi
32285    if test "x$BDEPS_FTP" = xlftp; then
32286       VALID_TOOL=yes
32287       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32288    fi
32289    if test "x$BDEPS_FTP" = xftp; then
32290        VALID_TOOL=yes
32291        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32292        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32293        FTPUSERPWD=${FTPSERVER%%@*}
32294        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32295            FTPUSER=${userpwd%%:*}
32296            FTPPWD=${userpwd#*@}
32297            FTPSERVER=${FTPSERVER#*@}
32298        else
32299            FTPUSER=ftp
32300            FTPPWD=ftp
32301        fi
32302        # the "pass" command does not work on some
32303        # ftp clients (read ftp.exe) but if it works,
32304        # passive mode is better!
32305        (\
32306            echo "user $FTPUSER $FTPPWD"        ;\
32307            echo "pass"                         ;\
32308            echo "bin"                          ;\
32309            echo "get $FTPPATH $tmpfile"              ;\
32310        ) | ftp -in $FTPSERVER
32311    fi
32312    if test "x$VALID_TOOL" != xyes; then
32313       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32314    fi
32315
32316        mv $tmpfile $installdir/$filename
32317        if test ! -s $installdir/$filename; then
32318            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32319        fi
32320        case "$extension" in
32321            zip)  echo "Unzipping $installdir/$filename..."
32322               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32323            ;;
32324            tar.gz) echo "Untaring $installdir/$filename..."
32325               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32326            ;;
32327            tgz) echo "Untaring $installdir/$filename..."
32328               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32329            ;;
32330            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32331            ;;
32332        esac
32333    fi
32334    if test -f $installdir/$filename.unpacked; then
32335        depdir=$installdir
32336    fi
32337
32338	    fi
32339            # Source the builddeps file again, because in the previous command, the depdir
32340            # was updated to point at the current build dependency install directory.
32341            . $builddepsfile
32342            # Now extract variables from the builddeps.conf files.
32343            theroot=${builddep_alsa_ROOT}
32344            thecflags=${builddep_alsa_CFLAGS}
32345            thelibs=${builddep_alsa_LIBS}
32346            if test "x$depdir" = x; then
32347                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
32348            fi
32349            ALSA=$depdir
32350            if test "x$theroot" != x; then
32351               ALSA="$theroot"
32352            fi
32353            if test "x$thecflags" != x; then
32354               ALSA_CFLAGS="$thecflags"
32355            fi
32356            if test "x$thelibs" != x; then
32357               ALSA_LIBS="$thelibs"
32358            fi
32359            ALSA_FOUND=yes
32360            else ALSA_FOUND=no
32361
32362        fi
32363        else ALSA_FOUND=no
32364
32365    fi
32366
32367	fi
32368	if test "x$ALSA_FOUND" = xno; then
32369
32370pkg_failed=no
32371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32372$as_echo_n "checking for ALSA... " >&6; }
32373
32374if test -n "$ALSA_CFLAGS"; then
32375    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32376 elif test -n "$PKG_CONFIG"; then
32377    if test -n "$PKG_CONFIG" && \
32378    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32379  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32380  ac_status=$?
32381  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32382  test $ac_status = 0; }; then
32383  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32384else
32385  pkg_failed=yes
32386fi
32387 else
32388    pkg_failed=untried
32389fi
32390if test -n "$ALSA_LIBS"; then
32391    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32392 elif test -n "$PKG_CONFIG"; then
32393    if test -n "$PKG_CONFIG" && \
32394    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32395  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32396  ac_status=$?
32397  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32398  test $ac_status = 0; }; then
32399  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32400else
32401  pkg_failed=yes
32402fi
32403 else
32404    pkg_failed=untried
32405fi
32406
32407
32408
32409if test $pkg_failed = yes; then
32410
32411if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32412        _pkg_short_errors_supported=yes
32413else
32414        _pkg_short_errors_supported=no
32415fi
32416        if test $_pkg_short_errors_supported = yes; then
32417	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32418        else
32419	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32420        fi
32421	# Put the nasty error message in config.log where it belongs
32422	echo "$ALSA_PKG_ERRORS" >&5
32423
32424	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32425$as_echo "no" >&6; }
32426                ALSA_FOUND=no
32427elif test $pkg_failed = untried; then
32428	ALSA_FOUND=no
32429else
32430	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32431	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32433$as_echo "yes" >&6; }
32434	ALSA_FOUND=yes
32435fi
32436	fi
32437	if test "x$ALSA_FOUND" = xno; then
32438	    for ac_header in alsa/asoundlib.h
32439do :
32440  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32441if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
32442  cat >>confdefs.h <<_ACEOF
32443#define HAVE_ALSA_ASOUNDLIB_H 1
32444_ACEOF
32445 ALSA_FOUND=yes
32446	                      ALSA_CFLAGS=-Iignoreme
32447	                      ALSA_LIBS=-lasound
32448	                      DEFAULT_ALSA=yes
32449else
32450  ALSA_FOUND=no
32451fi
32452
32453done
32454
32455	fi
32456	if test "x$ALSA_FOUND" = xno; then
32457
32458    # Print a helpful message on how to acquire the necessary build dependency.
32459    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32460    MISSING_DEPENDENCY=alsa
32461    PKGHANDLER_COMMAND=
32462
32463    case $PKGHANDLER in
32464	apt-get)
32465                apt_help     $MISSING_DEPENDENCY ;;
32466    yum)
32467                yum_help     $MISSING_DEPENDENCY ;;
32468	port)
32469                port_help    $MISSING_DEPENDENCY ;;
32470	pkgutil)
32471                pkgutil_help $MISSING_DEPENDENCY ;;
32472	pkgadd)
32473                pkgadd_help  $MISSING_DEPENDENCY ;;
32474    * )
32475      break ;;
32476    esac
32477
32478    if test "x$PKGHANDLER_COMMAND" != x; then
32479        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32480    fi
32481
32482	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32483	fi
32484fi
32485
32486
32487
32488
32489
32490
32491
32492###############################################################################
32493#
32494# Check for the jpeg library
32495#
32496
32497USE_EXTERNAL_LIBJPEG=true
32498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32499$as_echo_n "checking for main in -ljpeg... " >&6; }
32500if ${ac_cv_lib_jpeg_main+:} false; then :
32501  $as_echo_n "(cached) " >&6
32502else
32503  ac_check_lib_save_LIBS=$LIBS
32504LIBS="-ljpeg  $LIBS"
32505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32506/* end confdefs.h.  */
32507
32508
32509int
32510main ()
32511{
32512return main ();
32513  ;
32514  return 0;
32515}
32516_ACEOF
32517if ac_fn_cxx_try_link "$LINENO"; then :
32518  ac_cv_lib_jpeg_main=yes
32519else
32520  ac_cv_lib_jpeg_main=no
32521fi
32522rm -f core conftest.err conftest.$ac_objext \
32523    conftest$ac_exeext conftest.$ac_ext
32524LIBS=$ac_check_lib_save_LIBS
32525fi
32526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32527$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32528if test "x$ac_cv_lib_jpeg_main" = xyes; then :
32529  cat >>confdefs.h <<_ACEOF
32530#define HAVE_LIBJPEG 1
32531_ACEOF
32532
32533  LIBS="-ljpeg $LIBS"
32534
32535else
32536   USE_EXTERNAL_LIBJPEG=false
32537               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32538$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32539
32540fi
32541
32542
32543
32544###############################################################################
32545#
32546# Check for the gif library
32547#
32548
32549
32550# Check whether --with-giflib was given.
32551if test "${with_giflib+set}" = set; then :
32552  withval=$with_giflib;
32553fi
32554
32555
32556
32557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32558$as_echo_n "checking for which giflib to use... " >&6; }
32559
32560# default is bundled
32561DEFAULT_GIFLIB=bundled
32562
32563#
32564# if user didn't specify, use DEFAULT_GIFLIB
32565#
32566if test "x${with_giflib}" = "x"; then
32567    with_giflib=${DEFAULT_GIFLIB}
32568fi
32569
32570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32571$as_echo "${with_giflib}" >&6; }
32572
32573if test "x${with_giflib}" = "xbundled"; then
32574    USE_EXTERNAL_LIBGIF=false
32575elif test "x${with_giflib}" = "xsystem"; then
32576    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32577if test "x$ac_cv_header_gif_lib_h" = xyes; then :
32578
32579else
32580   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32581fi
32582
32583
32584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32585$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32586if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
32587  $as_echo_n "(cached) " >&6
32588else
32589  ac_check_lib_save_LIBS=$LIBS
32590LIBS="-lgif  $LIBS"
32591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32592/* end confdefs.h.  */
32593
32594/* Override any GCC internal prototype to avoid an error.
32595   Use char because int might match the return type of a GCC
32596   builtin and then its argument prototype would still apply.  */
32597#ifdef __cplusplus
32598extern "C"
32599#endif
32600char DGifGetCode ();
32601int
32602main ()
32603{
32604return DGifGetCode ();
32605  ;
32606  return 0;
32607}
32608_ACEOF
32609if ac_fn_cxx_try_link "$LINENO"; then :
32610  ac_cv_lib_gif_DGifGetCode=yes
32611else
32612  ac_cv_lib_gif_DGifGetCode=no
32613fi
32614rm -f core conftest.err conftest.$ac_objext \
32615    conftest$ac_exeext conftest.$ac_ext
32616LIBS=$ac_check_lib_save_LIBS
32617fi
32618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32619$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32620if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
32621  cat >>confdefs.h <<_ACEOF
32622#define HAVE_LIBGIF 1
32623_ACEOF
32624
32625  LIBS="-lgif $LIBS"
32626
32627else
32628   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32629fi
32630
32631
32632    USE_EXTERNAL_LIBGIF=true
32633else
32634    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32635fi
32636
32637
32638###############################################################################
32639#
32640# Check for the zlib library
32641#
32642
32643
32644# Check whether --with-zlib was given.
32645if test "${with_zlib+set}" = set; then :
32646  withval=$with_zlib;
32647fi
32648
32649
32650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32651$as_echo_n "checking for compress in -lz... " >&6; }
32652if ${ac_cv_lib_z_compress+:} false; then :
32653  $as_echo_n "(cached) " >&6
32654else
32655  ac_check_lib_save_LIBS=$LIBS
32656LIBS="-lz  $LIBS"
32657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32658/* end confdefs.h.  */
32659
32660/* Override any GCC internal prototype to avoid an error.
32661   Use char because int might match the return type of a GCC
32662   builtin and then its argument prototype would still apply.  */
32663#ifdef __cplusplus
32664extern "C"
32665#endif
32666char compress ();
32667int
32668main ()
32669{
32670return compress ();
32671  ;
32672  return 0;
32673}
32674_ACEOF
32675if ac_fn_cxx_try_link "$LINENO"; then :
32676  ac_cv_lib_z_compress=yes
32677else
32678  ac_cv_lib_z_compress=no
32679fi
32680rm -f core conftest.err conftest.$ac_objext \
32681    conftest$ac_exeext conftest.$ac_ext
32682LIBS=$ac_check_lib_save_LIBS
32683fi
32684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32685$as_echo "$ac_cv_lib_z_compress" >&6; }
32686if test "x$ac_cv_lib_z_compress" = xyes; then :
32687   ZLIB_FOUND=yes
32688else
32689   ZLIB_FOUND=no
32690fi
32691
32692
32693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32694$as_echo_n "checking for which zlib to use... " >&6; }
32695
32696DEFAULT_ZLIB=bundled
32697if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32698#
32699# On macosx default is system...on others default is
32700#
32701    DEFAULT_ZLIB=system
32702fi
32703
32704if test "x${ZLIB_FOUND}" != "xyes"; then
32705#
32706# If we don't find any system...set default to bundled
32707#
32708    DEFAULT_ZLIB=bundled
32709fi
32710
32711#
32712# If user didn't specify, use DEFAULT_ZLIB
32713#
32714if test "x${with_zlib}" = "x"; then
32715    with_zlib=${DEFAULT_ZLIB}
32716fi
32717
32718if test "x${with_zlib}" = "xbundled"; then
32719    USE_EXTERNAL_LIBZ=false
32720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32721$as_echo "bundled" >&6; }
32722elif test "x${with_zlib}" = "xsystem"; then
32723    if test "x${ZLIB_FOUND}" = "xyes"; then
32724        USE_EXTERNAL_LIBZ=true
32725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32726$as_echo "system" >&6; }
32727    else
32728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32729$as_echo "system not found" >&6; }
32730        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32731    fi
32732else
32733    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32734fi
32735
32736
32737
32738###############################################################################
32739LIBZIP_CAN_USE_MMAP=true
32740
32741
32742
32743###############################################################################
32744#
32745# Check if altzone exists in time.h
32746#
32747
32748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32749/* end confdefs.h.  */
32750#include <time.h>
32751int
32752main ()
32753{
32754return (int)altzone;
32755  ;
32756  return 0;
32757}
32758_ACEOF
32759if ac_fn_cxx_try_link "$LINENO"; then :
32760  has_altzone=yes
32761else
32762  has_altzone=no
32763fi
32764rm -f core conftest.err conftest.$ac_objext \
32765    conftest$ac_exeext conftest.$ac_ext
32766if test "x$has_altzone" = xyes; then
32767
32768$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32769
32770fi
32771
32772###############################################################################
32773#
32774# Check the maths library
32775#
32776
32777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32778$as_echo_n "checking for cos in -lm... " >&6; }
32779if ${ac_cv_lib_m_cos+:} false; then :
32780  $as_echo_n "(cached) " >&6
32781else
32782  ac_check_lib_save_LIBS=$LIBS
32783LIBS="-lm  $LIBS"
32784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32785/* end confdefs.h.  */
32786
32787/* Override any GCC internal prototype to avoid an error.
32788   Use char because int might match the return type of a GCC
32789   builtin and then its argument prototype would still apply.  */
32790#ifdef __cplusplus
32791extern "C"
32792#endif
32793char cos ();
32794int
32795main ()
32796{
32797return cos ();
32798  ;
32799  return 0;
32800}
32801_ACEOF
32802if ac_fn_cxx_try_link "$LINENO"; then :
32803  ac_cv_lib_m_cos=yes
32804else
32805  ac_cv_lib_m_cos=no
32806fi
32807rm -f core conftest.err conftest.$ac_objext \
32808    conftest$ac_exeext conftest.$ac_ext
32809LIBS=$ac_check_lib_save_LIBS
32810fi
32811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32812$as_echo "$ac_cv_lib_m_cos" >&6; }
32813if test "x$ac_cv_lib_m_cos" = xyes; then :
32814  cat >>confdefs.h <<_ACEOF
32815#define HAVE_LIBM 1
32816_ACEOF
32817
32818  LIBS="-lm $LIBS"
32819
32820else
32821
32822                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32823$as_echo "$as_me: Maths library was not found" >&6;}
32824
32825fi
32826
32827
32828
32829###############################################################################
32830#
32831# Check for libdl.so
32832
32833save_LIBS="$LIBS"
32834LIBS=""
32835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32836$as_echo_n "checking for dlopen in -ldl... " >&6; }
32837if ${ac_cv_lib_dl_dlopen+:} false; then :
32838  $as_echo_n "(cached) " >&6
32839else
32840  ac_check_lib_save_LIBS=$LIBS
32841LIBS="-ldl  $LIBS"
32842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32843/* end confdefs.h.  */
32844
32845/* Override any GCC internal prototype to avoid an error.
32846   Use char because int might match the return type of a GCC
32847   builtin and then its argument prototype would still apply.  */
32848#ifdef __cplusplus
32849extern "C"
32850#endif
32851char dlopen ();
32852int
32853main ()
32854{
32855return dlopen ();
32856  ;
32857  return 0;
32858}
32859_ACEOF
32860if ac_fn_cxx_try_link "$LINENO"; then :
32861  ac_cv_lib_dl_dlopen=yes
32862else
32863  ac_cv_lib_dl_dlopen=no
32864fi
32865rm -f core conftest.err conftest.$ac_objext \
32866    conftest$ac_exeext conftest.$ac_ext
32867LIBS=$ac_check_lib_save_LIBS
32868fi
32869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32870$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32871if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32872  cat >>confdefs.h <<_ACEOF
32873#define HAVE_LIBDL 1
32874_ACEOF
32875
32876  LIBS="-ldl $LIBS"
32877
32878fi
32879
32880LIBDL="$LIBS"
32881
32882LIBS="$save_LIBS"
32883
32884
32885
32886###############################################################################
32887#
32888# statically link libstdc++ before C++ ABI is stablized on Linux unless
32889# dynamic build is configured on command line.
32890#
32891
32892# Check whether --with-stdc++lib was given.
32893if test "${with_stdc__lib+set}" = set; then :
32894  withval=$with_stdc__lib;
32895    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32896        && test "x$with_stdc__lib" != xdefault; then
32897      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32898    fi
32899
32900else
32901  with_stdc__lib=default
32902
32903fi
32904
32905
32906if test "x$OPENJDK_TARGET_OS" = xlinux; then
32907    # Test if -lstdc++ works.
32908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32909$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32910    ac_ext=cpp
32911ac_cpp='$CXXCPP $CPPFLAGS'
32912ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32913ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32914ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32915
32916    OLD_CXXFLAGS="$CXXFLAGS"
32917    CXXFLAGS="$CXXFLAGS -lstdc++"
32918    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32919/* end confdefs.h.  */
32920
32921int
32922main ()
32923{
32924return 0;
32925  ;
32926  return 0;
32927}
32928_ACEOF
32929if ac_fn_cxx_try_link "$LINENO"; then :
32930  has_dynamic_libstdcxx=yes
32931else
32932  has_dynamic_libstdcxx=no
32933fi
32934rm -f core conftest.err conftest.$ac_objext \
32935    conftest$ac_exeext conftest.$ac_ext
32936    CXXFLAGS="$OLD_CXXFLAGS"
32937    ac_ext=cpp
32938ac_cpp='$CXXCPP $CPPFLAGS'
32939ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32940ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32941ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32942
32943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32944$as_echo "$has_dynamic_libstdcxx" >&6; }
32945
32946    # Test if stdc++ can be linked statically.
32947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32948$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32949    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32950    ac_ext=cpp
32951ac_cpp='$CXXCPP $CPPFLAGS'
32952ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32953ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32954ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32955
32956    OLD_LIBS="$LIBS"
32957    OLD_CXX="$CXX"
32958    LIBS="$STATIC_STDCXX_FLAGS"
32959    CXX="$CC"
32960    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32961/* end confdefs.h.  */
32962
32963int
32964main ()
32965{
32966return 0;
32967  ;
32968  return 0;
32969}
32970_ACEOF
32971if ac_fn_cxx_try_link "$LINENO"; then :
32972  has_static_libstdcxx=yes
32973else
32974  has_static_libstdcxx=no
32975fi
32976rm -f core conftest.err conftest.$ac_objext \
32977    conftest$ac_exeext conftest.$ac_ext
32978    LIBS="$OLD_LIBS"
32979    CXX="$OLD_CXX"
32980    ac_ext=cpp
32981ac_cpp='$CXXCPP $CPPFLAGS'
32982ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32983ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32984ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32985
32986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32987$as_echo "$has_static_libstdcxx" >&6; }
32988
32989    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32990        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32991    fi
32992
32993    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32994        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32995    fi
32996
32997    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32998        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32999    fi
33000
33001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
33002$as_echo_n "checking how to link with libstdc++... " >&6; }
33003    # If dynamic was requested, it's available since it would fail above otherwise.
33004    # If dynamic wasn't requested, go with static unless it isn't available.
33005    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
33006        LIBCXX="$LIBCXX -lstdc++"
33007        LDCXX="$CXX"
33008        STATIC_CXX_SETTING="STATIC_CXX=false"
33009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
33010$as_echo "dynamic" >&6; }
33011    else
33012        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
33013        LDCXX="$CC"
33014        STATIC_CXX_SETTING="STATIC_CXX=true"
33015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
33016$as_echo "static" >&6; }
33017    fi
33018fi
33019
33020
33021if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
33022    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
33023
33024pkg_failed=no
33025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
33026$as_echo_n "checking for LIBFFI... " >&6; }
33027
33028if test -n "$LIBFFI_CFLAGS"; then
33029    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
33030 elif test -n "$PKG_CONFIG"; then
33031    if test -n "$PKG_CONFIG" && \
33032    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
33033  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
33034  ac_status=$?
33035  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33036  test $ac_status = 0; }; then
33037  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
33038else
33039  pkg_failed=yes
33040fi
33041 else
33042    pkg_failed=untried
33043fi
33044if test -n "$LIBFFI_LIBS"; then
33045    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
33046 elif test -n "$PKG_CONFIG"; then
33047    if test -n "$PKG_CONFIG" && \
33048    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
33049  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
33050  ac_status=$?
33051  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33052  test $ac_status = 0; }; then
33053  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
33054else
33055  pkg_failed=yes
33056fi
33057 else
33058    pkg_failed=untried
33059fi
33060
33061
33062
33063if test $pkg_failed = yes; then
33064
33065if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
33066        _pkg_short_errors_supported=yes
33067else
33068        _pkg_short_errors_supported=no
33069fi
33070        if test $_pkg_short_errors_supported = yes; then
33071	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
33072        else
33073	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
33074        fi
33075	# Put the nasty error message in config.log where it belongs
33076	echo "$LIBFFI_PKG_ERRORS" >&5
33077
33078	as_fn_error $? "Package requirements (libffi) were not met:
33079
33080$LIBFFI_PKG_ERRORS
33081
33082Consider adjusting the PKG_CONFIG_PATH environment variable if you
33083installed software in a non-standard prefix.
33084
33085Alternatively, you may set the environment variables LIBFFI_CFLAGS
33086and LIBFFI_LIBS to avoid the need to call pkg-config.
33087See the pkg-config man page for more details.
33088" "$LINENO" 5
33089elif test $pkg_failed = untried; then
33090	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33092as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
33093is in your PATH or set the PKG_CONFIG environment variable to the full
33094path to pkg-config.
33095
33096Alternatively, you may set the environment variables LIBFFI_CFLAGS
33097and LIBFFI_LIBS to avoid the need to call pkg-config.
33098See the pkg-config man page for more details.
33099
33100To get pkg-config, see <http://pkg-config.freedesktop.org/>.
33101See \`config.log' for more details" "$LINENO" 5; }
33102else
33103	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
33104	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
33105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33106$as_echo "yes" >&6; }
33107	:
33108fi
33109
33110fi
33111
33112if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
33113    # Extract the first word of "llvm-config", so it can be a program name with args.
33114set dummy llvm-config; ac_word=$2
33115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33116$as_echo_n "checking for $ac_word... " >&6; }
33117if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
33118  $as_echo_n "(cached) " >&6
33119else
33120  if test -n "$LLVM_CONFIG"; then
33121  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
33122else
33123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33124for as_dir in $PATH
33125do
33126  IFS=$as_save_IFS
33127  test -z "$as_dir" && as_dir=.
33128    for ac_exec_ext in '' $ac_executable_extensions; do
33129  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33130    ac_cv_prog_LLVM_CONFIG="llvm-config"
33131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33132    break 2
33133  fi
33134done
33135  done
33136IFS=$as_save_IFS
33137
33138fi
33139fi
33140LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
33141if test -n "$LLVM_CONFIG"; then
33142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
33143$as_echo "$LLVM_CONFIG" >&6; }
33144else
33145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33146$as_echo "no" >&6; }
33147fi
33148
33149
33150
33151    if test "x$LLVM_CONFIG" != xllvm-config; then
33152        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
33153    fi
33154
33155    llvm_components="jit mcjit engine nativecodegen native"
33156    unset LLVM_CFLAGS
33157    for flag in $("$LLVM_CONFIG" --cxxflags); do
33158      if echo "${flag}" | grep -q '^-[ID]'; then
33159        if test "${flag}" != "-D_DEBUG" ; then
33160          if test "${LLVM_CFLAGS}" != "" ; then
33161            LLVM_CFLAGS="${LLVM_CFLAGS} "
33162          fi
33163          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
33164        fi
33165      fi
33166    done
33167    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
33168    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
33169
33170    unset LLVM_LDFLAGS
33171    for flag in $("${LLVM_CONFIG}" --ldflags); do
33172      if echo "${flag}" | grep -q '^-L'; then
33173        if test "${LLVM_LDFLAGS}" != ""; then
33174          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
33175        fi
33176        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
33177      fi
33178    done
33179
33180    unset LLVM_LIBS
33181    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
33182      if echo "${flag}" | grep -q '^-l'; then
33183        if test "${LLVM_LIBS}" != ""; then
33184          LLVM_LIBS="${LLVM_LIBS} "
33185        fi
33186        LLVM_LIBS="${LLVM_LIBS}${flag}"
33187      fi
33188    done
33189
33190
33191
33192
33193fi
33194
33195# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
33196if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
33197    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
33198fi
33199
33200# TODO better (platform agnostic) test
33201if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
33202    LIBCXX="-lstdc++"
33203fi
33204
33205
33206
33207
33208
33209# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
33210
33211# When using cygwin or msys, we need a wrapper binary that renames
33212# /cygdrive/c/ arguments into c:/ arguments and peeks into
33213# @files and rewrites these too! This wrapper binary is
33214# called fixpath.
33215FIXPATH=
33216if test "x$OPENJDK_BUILD_OS" = xwindows; then
33217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
33218$as_echo_n "checking if fixpath can be created... " >&6; }
33219    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
33220    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
33221    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
33222      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
33223      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
33224      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
33225      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
33226    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
33227      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
33228      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
33229
33230      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
33231      # @ was chosen as separator to minimize risk of other tools messing around with it
33232      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
33233      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
33234
33235      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
33236    fi
33237    rm -f $OUTPUT_ROOT/fixpath*
33238    cd $OUTPUT_ROOT
33239    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
33240    cd $CURDIR
33241
33242    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
33243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33244$as_echo "no" >&6; }
33245        cat $OUTPUT_ROOT/fixpath1.log
33246        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
33247    fi
33248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33249$as_echo "yes" >&6; }
33250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
33251$as_echo_n "checking if fixpath.exe works... " >&6; }
33252    cd $OUTPUT_ROOT
33253    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
33254    cd $CURDIR
33255    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
33256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33257$as_echo "no" >&6; }
33258        cat $OUTPUT_ROOT/fixpath2.log
33259        as_fn_error $? "fixpath did not work!" "$LINENO" 5
33260    fi
33261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33262$as_echo "yes" >&6; }
33263    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
33264fi
33265
33266
33267
33268
33269###############################################################################
33270#
33271# We need to do some final tweaking, when everything else is done.
33272#
33273###############################################################################
33274
33275
33276HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
33277
33278
33279# The name of the Service Agent jar.
33280SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
33281if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
33282  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
33283fi
33284
33285
33286
33287
33288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
33289$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
33290
33291if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
33292    ENABLE_INTREE_EC=yes
33293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33294$as_echo "yes" >&6; }
33295else
33296    ENABLE_INTREE_EC=no
33297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33298$as_echo "no" >&6; }
33299fi
33300
33301
33302
33303
33304###############################################################################
33305#
33306# Configure parts of the build that only affect the build performance,
33307# not the result.
33308#
33309###############################################################################
33310
33311
33312  # How many cores do we have on this build system?
33313
33314# Check whether --with-num-cores was given.
33315if test "${with_num_cores+set}" = set; then :
33316  withval=$with_num_cores;
33317fi
33318
33319  if test "x$with_num_cores" = x; then
33320    # The number of cores were not specified, try to probe them.
33321
33322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
33323$as_echo_n "checking for number of cores... " >&6; }
33324    NUM_CORES=1
33325    FOUND_CORES=no
33326
33327    if test -f /proc/cpuinfo; then
33328        # Looks like a Linux (or cygwin) system
33329        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33330        FOUND_CORES=yes
33331    elif test -x /usr/sbin/psrinfo; then
33332        # Looks like a Solaris system
33333        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33334        FOUND_CORES=yes
33335    elif test -x /usr/sbin/system_profiler; then
33336        # Looks like a MacOSX system
33337        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33338        FOUND_CORES=yes
33339    elif test -n "$NUMBER_OF_PROCESSORS"; then
33340        # On windows, look in the env
33341        NUM_CORES=$NUMBER_OF_PROCESSORS
33342        FOUND_CORES=yes
33343    fi
33344
33345    if test "x$FOUND_CORES" = xyes; then
33346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
33347$as_echo "$NUM_CORES" >&6; }
33348    else
33349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
33350$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
33352$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33353    fi
33354
33355
33356  else
33357    NUM_CORES=$with_num_cores
33358  fi
33359
33360
33361
33362  # How much memory do we have on this build system?
33363
33364# Check whether --with-memory-size was given.
33365if test "${with_memory_size+set}" = set; then :
33366  withval=$with_memory_size;
33367fi
33368
33369  if test "x$with_memory_size" = x; then
33370    # The memory size was not specified, try to probe it.
33371
33372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33373$as_echo_n "checking for memory size... " >&6; }
33374    # Default to 1024 MB
33375    MEMORY_SIZE=1024
33376    FOUND_MEM=no
33377
33378    if test -f /proc/meminfo; then
33379        # Looks like a Linux (or cygwin) system
33380        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33381        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33382        FOUND_MEM=yes
33383    elif test -x /usr/sbin/prtconf; then
33384        # Looks like a Solaris system
33385        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33386        FOUND_MEM=yes
33387    elif test -x /usr/sbin/system_profiler; then
33388        # Looks like a MacOSX system
33389        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33390        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33391        FOUND_MEM=yes
33392    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33393        # Windows, but without cygwin
33394        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33395        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33396        FOUND_MEM=yes
33397    fi
33398
33399    if test "x$FOUND_MEM" = xyes; then
33400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33401$as_echo "$MEMORY_SIZE MB" >&6; }
33402    else
33403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33404$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33406$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33407    fi
33408
33409  else
33410    MEMORY_SIZE=$with_memory_size
33411  fi
33412
33413
33414
33415  # Provide a decent default number of parallel jobs for make depending on
33416  # number of cores, amount of memory and machine architecture.
33417
33418# Check whether --with-jobs was given.
33419if test "${with_jobs+set}" = set; then :
33420  withval=$with_jobs;
33421fi
33422
33423  if test "x$with_jobs" = x; then
33424    # Number of jobs was not specified, calculate.
33425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33426$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33427    # Approximate memory in GB, rounding up a bit.
33428    memory_gb=`expr $MEMORY_SIZE / 1100`
33429    # Pick the lowest of memory in gb and number of cores.
33430    if test "$memory_gb" -lt "$NUM_CORES"; then
33431      JOBS="$memory_gb"
33432    else
33433      JOBS="$NUM_CORES"
33434      # On bigger machines, leave some room for other processes to run
33435      if test "$JOBS" -gt "4"; then
33436        JOBS=`expr $JOBS '*' 90 / 100`
33437      fi
33438    fi
33439    # Cap number of jobs to 16
33440    if test "$JOBS" -gt "16"; then
33441      JOBS=16
33442    fi
33443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33444$as_echo "$JOBS" >&6; }
33445  else
33446    JOBS=$with_jobs
33447  fi
33448
33449
33450
33451# Setup smart javac (after cores and memory have been setup)
33452
33453
33454# Check whether --with-sjavac-server-java was given.
33455if test "${with_sjavac_server_java+set}" = set; then :
33456  withval=$with_sjavac_server_java;
33457fi
33458
33459
33460if test "x$with_sjavac_server_java" != x; then
33461    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33462    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33463    if test "x$FOUND_VERSION" = x; then
33464        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33465    fi
33466else
33467    SJAVAC_SERVER_JAVA=""
33468    # Hotspot specific options.
33469
33470    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
33471    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
33472    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
33473    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
33474    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33475        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33476    fi
33477
33478    # JRockit specific options.
33479
33480    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
33481    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
33482    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
33483    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
33484    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33485        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33486    fi
33487
33488    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33489fi
33490
33491
33492
33493# Check whether --with-sjavac-server-cores was given.
33494if test "${with_sjavac_server_cores+set}" = set; then :
33495  withval=$with_sjavac_server_cores;
33496fi
33497
33498if test "x$with_sjavac_server_cores" != x; then
33499    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
33500else
33501    if test "$NUM_CORES" -gt 16; then
33502        # We set this arbitrary limit because we want to limit the heap
33503        # size of the javac server.
33504        # In the future we will make the javac compilers in the server
33505        # share more and more state, thus enabling us to use more and
33506        # more concurrent threads in the server.
33507        SJAVAC_SERVER_CORES="16"
33508    else
33509        SJAVAC_SERVER_CORES="$NUM_CORES"
33510    fi
33511
33512    if test "$MEMORY_SIZE" -gt "17000"; then
33513        MAX_HEAP_MEM=10000
33514
33515    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33516    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33517    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33518    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33519    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33520        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33521    fi
33522
33523
33524    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33525    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
33526    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
33527    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
33528    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33529        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33530    fi
33531
33532    elif test "$MEMORY_SIZE" -gt "10000"; then
33533        MAX_HEAP_MEM=6000
33534
33535    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33536    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33537    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33538    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33539    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33540        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33541    fi
33542
33543
33544    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33545    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
33546    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
33547    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
33548    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33549        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33550    fi
33551
33552    elif test "$MEMORY_SIZE" -gt "5000"; then
33553        MAX_HEAP_MEM=3000
33554
33555    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33556    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33557    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33558    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33559    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33560        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33561    fi
33562
33563
33564    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33565    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
33566    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
33567    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
33568    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33569        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33570    fi
33571
33572    elif test "$MEMORY_SIZE" -gt "3800"; then
33573        MAX_HEAP_MEM=2500
33574
33575    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33576    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
33577    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
33578    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
33579    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33580        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33581    fi
33582
33583    elif test "$MEMORY_SIZE" -gt "1900"; then
33584        MAX_HEAP_MEM=1200
33585
33586    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33587    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
33588    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
33589    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
33590    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33591        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
33592    fi
33593
33594    elif test "$MEMORY_SIZE" -gt "1000"; then
33595        MAX_HEAP_MEM=900
33596
33597    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33598    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
33599    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
33600    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
33601    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33602        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33603    fi
33604
33605    else
33606        MAX_HEAP_MEM=512
33607
33608    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33609    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
33610    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
33611    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
33612    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33613        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33614    fi
33615
33616    fi
33617
33618
33619    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33620    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
33621    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
33622    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
33623    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33624        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
33625    fi
33626
33627
33628    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33629    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
33630    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
33631    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
33632    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33633        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
33634    fi
33635
33636
33637    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33638    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
33639    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
33640    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
33641    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33642        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
33643    fi
33644
33645
33646    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
33647    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
33648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
33649$as_echo_n "checking if number of server cores must be reduced... " >&6; }
33650        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
33651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
33652$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
33653    fi
33654fi
33655
33656
33657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33658$as_echo_n "checking whether to use sjavac... " >&6; }
33659# Check whether --enable-sjavac was given.
33660if test "${enable_sjavac+set}" = set; then :
33661  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33662else
33663  ENABLE_SJAVAC='no'
33664fi
33665
33666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33667$as_echo "$ENABLE_SJAVAC" >&6; }
33668
33669
33670if test "x$ENABLE_SJAVAC" = xyes; then
33671    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33672else
33673    SJAVAC_SERVER_DIR=
33674fi
33675
33676
33677
33678
33679# Can the C/C++ compiler use precompiled headers?
33680
33681
33682###############################################################################
33683#
33684# Can the C/C++ compiler use precompiled headers?
33685#
33686# Check whether --enable-precompiled-headers was given.
33687if test "${enable_precompiled_headers+set}" = set; then :
33688  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33689else
33690  ENABLE_PRECOMPH=yes
33691fi
33692
33693
33694USE_PRECOMPILED_HEADER=1
33695if test "x$ENABLE_PRECOMPH" = xno; then
33696    USE_PRECOMPILED_HEADER=0
33697fi
33698
33699if test "x$ENABLE_PRECOMPH" = xyes; then
33700    # Check that the compiler actually supports precomp headers.
33701    if test "x$GCC" = xyes; then
33702         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33703$as_echo_n "checking that precompiled headers work... " >&6; }
33704         echo "int alfa();" > conftest.h
33705         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33706         if test ! -f conftest.hpp.gch; then
33707             USE_PRECOMPILED_HEADER=0
33708             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33709$as_echo "no" >&6; }
33710         else
33711             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33712$as_echo "yes" >&6; }
33713         fi
33714         rm -f conftest.h conftest.hpp.gch
33715    fi
33716fi
33717
33718
33719
33720
33721# Setup use of ccache, if available
33722
33723    # Check whether --enable-ccache was given.
33724if test "${enable_ccache+set}" = set; then :
33725  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33726else
33727  ENABLE_CCACHE=yes
33728fi
33729
33730    if test "x$ENABLE_CCACHE" = xyes; then
33731        # Extract the first word of "ccache", so it can be a program name with args.
33732set dummy ccache; ac_word=$2
33733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33734$as_echo_n "checking for $ac_word... " >&6; }
33735if ${ac_cv_path_CCACHE+:} false; then :
33736  $as_echo_n "(cached) " >&6
33737else
33738  case $CCACHE in
33739  [\\/]* | ?:[\\/]*)
33740  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33741  ;;
33742  *)
33743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33744for as_dir in $PATH
33745do
33746  IFS=$as_save_IFS
33747  test -z "$as_dir" && as_dir=.
33748    for ac_exec_ext in '' $ac_executable_extensions; do
33749  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33750    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33752    break 2
33753  fi
33754done
33755  done
33756IFS=$as_save_IFS
33757
33758  ;;
33759esac
33760fi
33761CCACHE=$ac_cv_path_CCACHE
33762if test -n "$CCACHE"; then
33763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33764$as_echo "$CCACHE" >&6; }
33765else
33766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33767$as_echo "no" >&6; }
33768fi
33769
33770
33771    else
33772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33773$as_echo_n "checking for ccache... " >&6; }
33774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33775$as_echo "explicitly disabled" >&6; }
33776        CCACHE=
33777    fi
33778
33779
33780
33781# Check whether --with-ccache-dir was given.
33782if test "${with_ccache_dir+set}" = set; then :
33783  withval=$with_ccache_dir;
33784fi
33785
33786
33787    if test "x$with_ccache_dir" != x; then
33788        # When using a non home ccache directory, assume the use is to share ccache files
33789        # with other users. Thus change the umask.
33790        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33791    fi
33792    CCACHE_FOUND=""
33793    if test "x$CCACHE" != x; then
33794
33795    if test "x$CCACHE" != x; then
33796        CCACHE_FOUND="true"
33797        # Only use ccache if it is 3.1.4 or later, which supports
33798        # precompiled headers.
33799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33800$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33801        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33802        if test "x$HAS_GOOD_CCACHE" = x; then
33803            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33804$as_echo "no, disabling ccache" >&6; }
33805            CCACHE=
33806        else
33807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33808$as_echo "yes" >&6; }
33809            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33810$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33811            PUSHED_FLAGS="$CXXFLAGS"
33812            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33813            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33814/* end confdefs.h.  */
33815
33816int
33817main ()
33818{
33819
33820  ;
33821  return 0;
33822}
33823_ACEOF
33824if ac_fn_cxx_try_compile "$LINENO"; then :
33825  CC_KNOWS_CCACHE_TRICK=yes
33826else
33827  CC_KNOWS_CCACHE_TRICK=no
33828fi
33829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33830            CXXFLAGS="$PUSHED_FLAGS"
33831            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33832                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33833$as_echo "yes" >&6; }
33834            else
33835                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33836$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33837                CCACHE=
33838            fi
33839        fi
33840    fi
33841
33842    if test "x$CCACHE" != x; then
33843        CCACHE_SLOPPINESS=time_macros
33844        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33845        CCACHE_FLAGS=-fpch-preprocess
33846
33847        if test "x$SET_CCACHE_DIR" != x; then
33848            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33849	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33850        fi
33851    fi
33852
33853    fi
33854
33855
33856###############################################################################
33857#
33858# And now the finish...
33859#
33860###############################################################################
33861
33862# Check for some common pitfalls
33863
33864  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33865    file_to_test="$SRC_ROOT/LICENSE"
33866    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33867      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
33868    fi
33869  fi
33870
33871
33872
33873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33874$as_echo_n "checking if build directory is on local disk... " >&6; }
33875
33876	# df -l lists only local disks; if the given directory is not found then
33877	# a non-zero exit code is given
33878  if test "x$DF" = x; then
33879    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33880      # msys does not have df; use Windows "net use" instead.
33881      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33882      if test "x$IS_NETWORK_DISK" = x; then
33883        OUTPUT_DIR_IS_LOCAL="yes"
33884      else
33885        OUTPUT_DIR_IS_LOCAL="no"
33886      fi
33887    else
33888      # No df here, say it's local
33889      OUTPUT_DIR_IS_LOCAL="yes"
33890    fi
33891  else
33892    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33893      OUTPUT_DIR_IS_LOCAL="yes"
33894    else
33895      OUTPUT_DIR_IS_LOCAL="no"
33896    fi
33897  fi
33898
33899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33900$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33901
33902
33903
33904# Check if the user has any old-style ALT_ variables set.
33905FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33906
33907# Before generating output files, test if they exist. If they do, this is a reconfigure.
33908# Since we can't properly handle the dependencies for this, warn the user about the situation
33909if test -e $OUTPUT_ROOT/spec.gmk; then
33910  IS_RECONFIGURE=yes
33911else
33912  IS_RECONFIGURE=no
33913fi
33914
33915if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33916  HIDE_PERFORMANCE_HINTS=yes
33917else
33918  HIDE_PERFORMANCE_HINTS=no
33919  # Hide it the next time around...
33920  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33921fi
33922
33923
33924
33925# At the end, call the custom hook. (Dummy macro if no custom sources available)
33926
33927
33928# We're messing a bit with internal autoconf variables to put the config.status
33929# in the output directory instead of the current directory.
33930CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33931# Create the actual output files. Now the main work of configure is done.
33932cat >confcache <<\_ACEOF
33933# This file is a shell script that caches the results of configure
33934# tests run on this system so they can be shared between configure
33935# scripts and configure runs, see configure's option --config-cache.
33936# It is not useful on other systems.  If it contains results you don't
33937# want to keep, you may remove or edit it.
33938#
33939# config.status only pays attention to the cache file if you give it
33940# the --recheck option to rerun configure.
33941#
33942# `ac_cv_env_foo' variables (set or unset) will be overridden when
33943# loading this file, other *unset* `ac_cv_foo' will be assigned the
33944# following values.
33945
33946_ACEOF
33947
33948# The following way of writing the cache mishandles newlines in values,
33949# but we know of no workaround that is simple, portable, and efficient.
33950# So, we kill variables containing newlines.
33951# Ultrix sh set writes to stderr and can't be redirected directly,
33952# and sets the high bit in the cache file unless we assign to the vars.
33953(
33954  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33955    eval ac_val=\$$ac_var
33956    case $ac_val in #(
33957    *${as_nl}*)
33958      case $ac_var in #(
33959      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33960$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33961      esac
33962      case $ac_var in #(
33963      _ | IFS | as_nl) ;; #(
33964      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33965      *) { eval $ac_var=; unset $ac_var;} ;;
33966      esac ;;
33967    esac
33968  done
33969
33970  (set) 2>&1 |
33971    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33972    *${as_nl}ac_space=\ *)
33973      # `set' does not quote correctly, so add quotes: double-quote
33974      # substitution turns \\\\ into \\, and sed turns \\ into \.
33975      sed -n \
33976	"s/'/'\\\\''/g;
33977	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33978      ;; #(
33979    *)
33980      # `set' quotes correctly as required by POSIX, so do not add quotes.
33981      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33982      ;;
33983    esac |
33984    sort
33985) |
33986  sed '
33987     /^ac_cv_env_/b end
33988     t clear
33989     :clear
33990     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33991     t end
33992     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33993     :end' >>confcache
33994if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33995  if test -w "$cache_file"; then
33996    if test "x$cache_file" != "x/dev/null"; then
33997      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33998$as_echo "$as_me: updating cache $cache_file" >&6;}
33999      if test ! -f "$cache_file" || test -h "$cache_file"; then
34000	cat confcache >"$cache_file"
34001      else
34002        case $cache_file in #(
34003        */* | ?:*)
34004	  mv -f confcache "$cache_file"$$ &&
34005	  mv -f "$cache_file"$$ "$cache_file" ;; #(
34006        *)
34007	  mv -f confcache "$cache_file" ;;
34008	esac
34009      fi
34010    fi
34011  else
34012    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
34013$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
34014  fi
34015fi
34016rm -f confcache
34017
34018test "x$prefix" = xNONE && prefix=$ac_default_prefix
34019# Let make expand exec_prefix.
34020test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
34021
34022DEFS=-DHAVE_CONFIG_H
34023
34024ac_libobjs=
34025ac_ltlibobjs=
34026U=
34027for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
34028  # 1. Remove the extension, and $U if already installed.
34029  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
34030  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
34031  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
34032  #    will be set to the directory where LIBOBJS objects are built.
34033  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
34034  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
34035done
34036LIBOBJS=$ac_libobjs
34037
34038LTLIBOBJS=$ac_ltlibobjs
34039
34040
34041
34042: "${CONFIG_STATUS=./config.status}"
34043ac_write_fail=0
34044ac_clean_files_save=$ac_clean_files
34045ac_clean_files="$ac_clean_files $CONFIG_STATUS"
34046{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
34047$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
34048as_write_fail=0
34049cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
34050#! $SHELL
34051# Generated by $as_me.
34052# Run this file to recreate the current configuration.
34053# Compiler output produced by configure, useful for debugging
34054# configure, is in config.log if it exists.
34055
34056debug=false
34057ac_cs_recheck=false
34058ac_cs_silent=false
34059
34060SHELL=\${CONFIG_SHELL-$SHELL}
34061export SHELL
34062_ASEOF
34063cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
34064## -------------------- ##
34065## M4sh Initialization. ##
34066## -------------------- ##
34067
34068# Be more Bourne compatible
34069DUALCASE=1; export DUALCASE # for MKS sh
34070if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
34071  emulate sh
34072  NULLCMD=:
34073  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
34074  # is contrary to our usage.  Disable this feature.
34075  alias -g '${1+"$@"}'='"$@"'
34076  setopt NO_GLOB_SUBST
34077else
34078  case `(set -o) 2>/dev/null` in #(
34079  *posix*) :
34080    set -o posix ;; #(
34081  *) :
34082     ;;
34083esac
34084fi
34085
34086
34087as_nl='
34088'
34089export as_nl
34090# Printing a long string crashes Solaris 7 /usr/bin/printf.
34091as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
34092as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
34093as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
34094# Prefer a ksh shell builtin over an external printf program on Solaris,
34095# but without wasting forks for bash or zsh.
34096if test -z "$BASH_VERSION$ZSH_VERSION" \
34097    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
34098  as_echo='print -r --'
34099  as_echo_n='print -rn --'
34100elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
34101  as_echo='printf %s\n'
34102  as_echo_n='printf %s'
34103else
34104  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
34105    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
34106    as_echo_n='/usr/ucb/echo -n'
34107  else
34108    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
34109    as_echo_n_body='eval
34110      arg=$1;
34111      case $arg in #(
34112      *"$as_nl"*)
34113	expr "X$arg" : "X\\(.*\\)$as_nl";
34114	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
34115      esac;
34116      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
34117    '
34118    export as_echo_n_body
34119    as_echo_n='sh -c $as_echo_n_body as_echo'
34120  fi
34121  export as_echo_body
34122  as_echo='sh -c $as_echo_body as_echo'
34123fi
34124
34125# The user is always right.
34126if test "${PATH_SEPARATOR+set}" != set; then
34127  PATH_SEPARATOR=:
34128  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
34129    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
34130      PATH_SEPARATOR=';'
34131  }
34132fi
34133
34134
34135# IFS
34136# We need space, tab and new line, in precisely that order.  Quoting is
34137# there to prevent editors from complaining about space-tab.
34138# (If _AS_PATH_WALK were called with IFS unset, it would disable word
34139# splitting by setting IFS to empty value.)
34140IFS=" ""	$as_nl"
34141
34142# Find who we are.  Look in the path if we contain no directory separator.
34143as_myself=
34144case $0 in #((
34145  *[\\/]* ) as_myself=$0 ;;
34146  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34147for as_dir in $PATH
34148do
34149  IFS=$as_save_IFS
34150  test -z "$as_dir" && as_dir=.
34151    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
34152  done
34153IFS=$as_save_IFS
34154
34155     ;;
34156esac
34157# We did not find ourselves, most probably we were run as `sh COMMAND'
34158# in which case we are not to be found in the path.
34159if test "x$as_myself" = x; then
34160  as_myself=$0
34161fi
34162if test ! -f "$as_myself"; then
34163  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
34164  exit 1
34165fi
34166
34167# Unset variables that we do not need and which cause bugs (e.g. in
34168# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
34169# suppresses any "Segmentation fault" message there.  '((' could
34170# trigger a bug in pdksh 5.2.14.
34171for as_var in BASH_ENV ENV MAIL MAILPATH
34172do eval test x\${$as_var+set} = xset \
34173  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
34174done
34175PS1='$ '
34176PS2='> '
34177PS4='+ '
34178
34179# NLS nuisances.
34180LC_ALL=C
34181export LC_ALL
34182LANGUAGE=C
34183export LANGUAGE
34184
34185# CDPATH.
34186(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
34187
34188
34189# as_fn_error STATUS ERROR [LINENO LOG_FD]
34190# ----------------------------------------
34191# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
34192# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
34193# script with STATUS, using 1 if that was 0.
34194as_fn_error ()
34195{
34196  as_status=$1; test $as_status -eq 0 && as_status=1
34197  if test "$4"; then
34198    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
34199    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
34200  fi
34201  $as_echo "$as_me: error: $2" >&2
34202  as_fn_exit $as_status
34203} # as_fn_error
34204
34205
34206# as_fn_set_status STATUS
34207# -----------------------
34208# Set $? to STATUS, without forking.
34209as_fn_set_status ()
34210{
34211  return $1
34212} # as_fn_set_status
34213
34214# as_fn_exit STATUS
34215# -----------------
34216# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
34217as_fn_exit ()
34218{
34219  set +e
34220  as_fn_set_status $1
34221  exit $1
34222} # as_fn_exit
34223
34224# as_fn_unset VAR
34225# ---------------
34226# Portably unset VAR.
34227as_fn_unset ()
34228{
34229  { eval $1=; unset $1;}
34230}
34231as_unset=as_fn_unset
34232# as_fn_append VAR VALUE
34233# ----------------------
34234# Append the text in VALUE to the end of the definition contained in VAR. Take
34235# advantage of any shell optimizations that allow amortized linear growth over
34236# repeated appends, instead of the typical quadratic growth present in naive
34237# implementations.
34238if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
34239  eval 'as_fn_append ()
34240  {
34241    eval $1+=\$2
34242  }'
34243else
34244  as_fn_append ()
34245  {
34246    eval $1=\$$1\$2
34247  }
34248fi # as_fn_append
34249
34250# as_fn_arith ARG...
34251# ------------------
34252# Perform arithmetic evaluation on the ARGs, and store the result in the
34253# global $as_val. Take advantage of shells that can avoid forks. The arguments
34254# must be portable across $(()) and expr.
34255if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
34256  eval 'as_fn_arith ()
34257  {
34258    as_val=$(( $* ))
34259  }'
34260else
34261  as_fn_arith ()
34262  {
34263    as_val=`expr "$@" || test $? -eq 1`
34264  }
34265fi # as_fn_arith
34266
34267
34268if expr a : '\(a\)' >/dev/null 2>&1 &&
34269   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34270  as_expr=expr
34271else
34272  as_expr=false
34273fi
34274
34275if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34276  as_basename=basename
34277else
34278  as_basename=false
34279fi
34280
34281if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34282  as_dirname=dirname
34283else
34284  as_dirname=false
34285fi
34286
34287as_me=`$as_basename -- "$0" ||
34288$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34289	 X"$0" : 'X\(//\)$' \| \
34290	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34291$as_echo X/"$0" |
34292    sed '/^.*\/\([^/][^/]*\)\/*$/{
34293	    s//\1/
34294	    q
34295	  }
34296	  /^X\/\(\/\/\)$/{
34297	    s//\1/
34298	    q
34299	  }
34300	  /^X\/\(\/\).*/{
34301	    s//\1/
34302	    q
34303	  }
34304	  s/.*/./; q'`
34305
34306# Avoid depending upon Character Ranges.
34307as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34308as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34309as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34310as_cr_digits='0123456789'
34311as_cr_alnum=$as_cr_Letters$as_cr_digits
34312
34313ECHO_C= ECHO_N= ECHO_T=
34314case `echo -n x` in #(((((
34315-n*)
34316  case `echo 'xy\c'` in
34317  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34318  xy)  ECHO_C='\c';;
34319  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
34320       ECHO_T='	';;
34321  esac;;
34322*)
34323  ECHO_N='-n';;
34324esac
34325
34326rm -f conf$$ conf$$.exe conf$$.file
34327if test -d conf$$.dir; then
34328  rm -f conf$$.dir/conf$$.file
34329else
34330  rm -f conf$$.dir
34331  mkdir conf$$.dir 2>/dev/null
34332fi
34333if (echo >conf$$.file) 2>/dev/null; then
34334  if ln -s conf$$.file conf$$ 2>/dev/null; then
34335    as_ln_s='ln -s'
34336    # ... but there are two gotchas:
34337    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34338    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34339    # In both cases, we have to default to `cp -p'.
34340    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34341      as_ln_s='cp -p'
34342  elif ln conf$$.file conf$$ 2>/dev/null; then
34343    as_ln_s=ln
34344  else
34345    as_ln_s='cp -p'
34346  fi
34347else
34348  as_ln_s='cp -p'
34349fi
34350rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34351rmdir conf$$.dir 2>/dev/null
34352
34353
34354# as_fn_mkdir_p
34355# -------------
34356# Create "$as_dir" as a directory, including parents if necessary.
34357as_fn_mkdir_p ()
34358{
34359
34360  case $as_dir in #(
34361  -*) as_dir=./$as_dir;;
34362  esac
34363  test -d "$as_dir" || eval $as_mkdir_p || {
34364    as_dirs=
34365    while :; do
34366      case $as_dir in #(
34367      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34368      *) as_qdir=$as_dir;;
34369      esac
34370      as_dirs="'$as_qdir' $as_dirs"
34371      as_dir=`$as_dirname -- "$as_dir" ||
34372$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34373	 X"$as_dir" : 'X\(//\)[^/]' \| \
34374	 X"$as_dir" : 'X\(//\)$' \| \
34375	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34376$as_echo X"$as_dir" |
34377    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34378	    s//\1/
34379	    q
34380	  }
34381	  /^X\(\/\/\)[^/].*/{
34382	    s//\1/
34383	    q
34384	  }
34385	  /^X\(\/\/\)$/{
34386	    s//\1/
34387	    q
34388	  }
34389	  /^X\(\/\).*/{
34390	    s//\1/
34391	    q
34392	  }
34393	  s/.*/./; q'`
34394      test -d "$as_dir" && break
34395    done
34396    test -z "$as_dirs" || eval "mkdir $as_dirs"
34397  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34398
34399
34400} # as_fn_mkdir_p
34401if mkdir -p . 2>/dev/null; then
34402  as_mkdir_p='mkdir -p "$as_dir"'
34403else
34404  test -d ./-p && rmdir ./-p
34405  as_mkdir_p=false
34406fi
34407
34408if test -x / >/dev/null 2>&1; then
34409  as_test_x='test -x'
34410else
34411  if ls -dL / >/dev/null 2>&1; then
34412    as_ls_L_option=L
34413  else
34414    as_ls_L_option=
34415  fi
34416  as_test_x='
34417    eval sh -c '\''
34418      if test -d "$1"; then
34419	test -d "$1/.";
34420      else
34421	case $1 in #(
34422	-*)set "./$1";;
34423	esac;
34424	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
34425	???[sx]*):;;*)false;;esac;fi
34426    '\'' sh
34427  '
34428fi
34429as_executable_p=$as_test_x
34430
34431# Sed expression to map a string onto a valid CPP name.
34432as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34433
34434# Sed expression to map a string onto a valid variable name.
34435as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34436
34437
34438exec 6>&1
34439## ----------------------------------- ##
34440## Main body of $CONFIG_STATUS script. ##
34441## ----------------------------------- ##
34442_ASEOF
34443test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34444
34445cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34446# Save the log message, to keep $0 and so on meaningful, and to
34447# report actual input values of CONFIG_FILES etc. instead of their
34448# values after options handling.
34449ac_log="
34450This file was extended by OpenJDK $as_me jdk8, which was
34451generated by GNU Autoconf 2.68.  Invocation command line was
34452
34453  CONFIG_FILES    = $CONFIG_FILES
34454  CONFIG_HEADERS  = $CONFIG_HEADERS
34455  CONFIG_LINKS    = $CONFIG_LINKS
34456  CONFIG_COMMANDS = $CONFIG_COMMANDS
34457  $ $0 $@
34458
34459on `(hostname || uname -n) 2>/dev/null | sed 1q`
34460"
34461
34462_ACEOF
34463
34464case $ac_config_files in *"
34465"*) set x $ac_config_files; shift; ac_config_files=$*;;
34466esac
34467
34468case $ac_config_headers in *"
34469"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34470esac
34471
34472
34473cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34474# Files that config.status was made for.
34475config_files="$ac_config_files"
34476config_headers="$ac_config_headers"
34477
34478_ACEOF
34479
34480cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34481ac_cs_usage="\
34482\`$as_me' instantiates files and other configuration actions
34483from templates according to the current configuration.  Unless the files
34484and actions are specified as TAGs, all are instantiated by default.
34485
34486Usage: $0 [OPTION]... [TAG]...
34487
34488  -h, --help       print this help, then exit
34489  -V, --version    print version number and configuration settings, then exit
34490      --config     print configuration, then exit
34491  -q, --quiet, --silent
34492                   do not print progress messages
34493  -d, --debug      don't remove temporary files
34494      --recheck    update $as_me by reconfiguring in the same conditions
34495      --file=FILE[:TEMPLATE]
34496                   instantiate the configuration file FILE
34497      --header=FILE[:TEMPLATE]
34498                   instantiate the configuration header FILE
34499
34500Configuration files:
34501$config_files
34502
34503Configuration headers:
34504$config_headers
34505
34506Report bugs to <build-dev@openjdk.java.net>.
34507OpenJDK home page: <http://openjdk.java.net>."
34508
34509_ACEOF
34510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34511ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34512ac_cs_version="\\
34513OpenJDK config.status jdk8
34514configured by $0, generated by GNU Autoconf 2.68,
34515  with options \\"\$ac_cs_config\\"
34516
34517Copyright (C) 2010 Free Software Foundation, Inc.
34518This config.status script is free software; the Free Software Foundation
34519gives unlimited permission to copy, distribute and modify it."
34520
34521ac_pwd='$ac_pwd'
34522srcdir='$srcdir'
34523AWK='$AWK'
34524test -n "\$AWK" || AWK=awk
34525_ACEOF
34526
34527cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34528# The default lists apply if the user does not specify any file.
34529ac_need_defaults=:
34530while test $# != 0
34531do
34532  case $1 in
34533  --*=?*)
34534    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34535    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34536    ac_shift=:
34537    ;;
34538  --*=)
34539    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34540    ac_optarg=
34541    ac_shift=:
34542    ;;
34543  *)
34544    ac_option=$1
34545    ac_optarg=$2
34546    ac_shift=shift
34547    ;;
34548  esac
34549
34550  case $ac_option in
34551  # Handling of the options.
34552  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34553    ac_cs_recheck=: ;;
34554  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34555    $as_echo "$ac_cs_version"; exit ;;
34556  --config | --confi | --conf | --con | --co | --c )
34557    $as_echo "$ac_cs_config"; exit ;;
34558  --debug | --debu | --deb | --de | --d | -d )
34559    debug=: ;;
34560  --file | --fil | --fi | --f )
34561    $ac_shift
34562    case $ac_optarg in
34563    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34564    '') as_fn_error $? "missing file argument" ;;
34565    esac
34566    as_fn_append CONFIG_FILES " '$ac_optarg'"
34567    ac_need_defaults=false;;
34568  --header | --heade | --head | --hea )
34569    $ac_shift
34570    case $ac_optarg in
34571    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34572    esac
34573    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34574    ac_need_defaults=false;;
34575  --he | --h)
34576    # Conflict between --help and --header
34577    as_fn_error $? "ambiguous option: \`$1'
34578Try \`$0 --help' for more information.";;
34579  --help | --hel | -h )
34580    $as_echo "$ac_cs_usage"; exit ;;
34581  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34582  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34583    ac_cs_silent=: ;;
34584
34585  # This is an error.
34586  -*) as_fn_error $? "unrecognized option: \`$1'
34587Try \`$0 --help' for more information." ;;
34588
34589  *) as_fn_append ac_config_targets " $1"
34590     ac_need_defaults=false ;;
34591
34592  esac
34593  shift
34594done
34595
34596ac_configure_extra_args=
34597
34598if $ac_cs_silent; then
34599  exec 6>/dev/null
34600  ac_configure_extra_args="$ac_configure_extra_args --silent"
34601fi
34602
34603_ACEOF
34604cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34605if \$ac_cs_recheck; then
34606  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34607  shift
34608  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34609  CONFIG_SHELL='$SHELL'
34610  export CONFIG_SHELL
34611  exec "\$@"
34612fi
34613
34614_ACEOF
34615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34616exec 5>>config.log
34617{
34618  echo
34619  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34620## Running $as_me. ##
34621_ASBOX
34622  $as_echo "$ac_log"
34623} >&5
34624
34625_ACEOF
34626cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34627_ACEOF
34628
34629cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34630
34631# Handling of arguments.
34632for ac_config_target in $ac_config_targets
34633do
34634  case $ac_config_target in
34635    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34636    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34637    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34638    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34639    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34640    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34641    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34642
34643  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34644  esac
34645done
34646
34647
34648# If the user did not use the arguments to specify the items to instantiate,
34649# then the envvar interface is used.  Set only those that are not.
34650# We use the long form for the default assignment because of an extremely
34651# bizarre bug on SunOS 4.1.3.
34652if $ac_need_defaults; then
34653  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34654  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34655fi
34656
34657# Have a temporary directory for convenience.  Make it in the build tree
34658# simply because there is no reason against having it here, and in addition,
34659# creating and moving files from /tmp can sometimes cause problems.
34660# Hook for its removal unless debugging.
34661# Note that there is a small window in which the directory will not be cleaned:
34662# after its creation but before its name has been assigned to `$tmp'.
34663$debug ||
34664{
34665  tmp= ac_tmp=
34666  trap 'exit_status=$?
34667  : "${ac_tmp:=$tmp}"
34668  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34669' 0
34670  trap 'as_fn_exit 1' 1 2 13 15
34671}
34672# Create a (secure) tmp directory for tmp files.
34673
34674{
34675  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34676  test -d "$tmp"
34677}  ||
34678{
34679  tmp=./conf$$-$RANDOM
34680  (umask 077 && mkdir "$tmp")
34681} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34682ac_tmp=$tmp
34683
34684# Set up the scripts for CONFIG_FILES section.
34685# No need to generate them if there are no CONFIG_FILES.
34686# This happens for instance with `./config.status config.h'.
34687if test -n "$CONFIG_FILES"; then
34688
34689
34690ac_cr=`echo X | tr X '\015'`
34691# On cygwin, bash can eat \r inside `` if the user requested igncr.
34692# But we know of no other shell where ac_cr would be empty at this
34693# point, so we can use a bashism as a fallback.
34694if test "x$ac_cr" = x; then
34695  eval ac_cr=\$\'\\r\'
34696fi
34697ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34698if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34699  ac_cs_awk_cr='\\r'
34700else
34701  ac_cs_awk_cr=$ac_cr
34702fi
34703
34704echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34705_ACEOF
34706
34707
34708{
34709  echo "cat >conf$$subs.awk <<_ACEOF" &&
34710  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34711  echo "_ACEOF"
34712} >conf$$subs.sh ||
34713  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34714ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34715ac_delim='%!_!# '
34716for ac_last_try in false false false false false :; do
34717  . ./conf$$subs.sh ||
34718    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34719
34720  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34721  if test $ac_delim_n = $ac_delim_num; then
34722    break
34723  elif $ac_last_try; then
34724    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34725  else
34726    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34727  fi
34728done
34729rm -f conf$$subs.sh
34730
34731cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34732cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34733_ACEOF
34734sed -n '
34735h
34736s/^/S["/; s/!.*/"]=/
34737p
34738g
34739s/^[^!]*!//
34740:repl
34741t repl
34742s/'"$ac_delim"'$//
34743t delim
34744:nl
34745h
34746s/\(.\{148\}\)..*/\1/
34747t more1
34748s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34749p
34750n
34751b repl
34752:more1
34753s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34754p
34755g
34756s/.\{148\}//
34757t nl
34758:delim
34759h
34760s/\(.\{148\}\)..*/\1/
34761t more2
34762s/["\\]/\\&/g; s/^/"/; s/$/"/
34763p
34764b
34765:more2
34766s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34767p
34768g
34769s/.\{148\}//
34770t delim
34771' <conf$$subs.awk | sed '
34772/^[^""]/{
34773  N
34774  s/\n//
34775}
34776' >>$CONFIG_STATUS || ac_write_fail=1
34777rm -f conf$$subs.awk
34778cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34779_ACAWK
34780cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34781  for (key in S) S_is_set[key] = 1
34782  FS = ""
34783
34784}
34785{
34786  line = $ 0
34787  nfields = split(line, field, "@")
34788  substed = 0
34789  len = length(field[1])
34790  for (i = 2; i < nfields; i++) {
34791    key = field[i]
34792    keylen = length(key)
34793    if (S_is_set[key]) {
34794      value = S[key]
34795      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34796      len += length(value) + length(field[++i])
34797      substed = 1
34798    } else
34799      len += 1 + keylen
34800  }
34801
34802  print line
34803}
34804
34805_ACAWK
34806_ACEOF
34807cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34808if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34809  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34810else
34811  cat
34812fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34813  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34814_ACEOF
34815
34816# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34817# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34818# trailing colons and then remove the whole line if VPATH becomes empty
34819# (actually we leave an empty line to preserve line numbers).
34820if test "x$srcdir" = x.; then
34821  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34822h
34823s///
34824s/^/:/
34825s/[	 ]*$/:/
34826s/:\$(srcdir):/:/g
34827s/:\${srcdir}:/:/g
34828s/:@srcdir@:/:/g
34829s/^:*//
34830s/:*$//
34831x
34832s/\(=[	 ]*\).*/\1/
34833G
34834s/\n//
34835s/^[^=]*=[	 ]*$//
34836}'
34837fi
34838
34839cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34840fi # test -n "$CONFIG_FILES"
34841
34842# Set up the scripts for CONFIG_HEADERS section.
34843# No need to generate them if there are no CONFIG_HEADERS.
34844# This happens for instance with `./config.status Makefile'.
34845if test -n "$CONFIG_HEADERS"; then
34846cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34847BEGIN {
34848_ACEOF
34849
34850# Transform confdefs.h into an awk script `defines.awk', embedded as
34851# here-document in config.status, that substitutes the proper values into
34852# config.h.in to produce config.h.
34853
34854# Create a delimiter string that does not exist in confdefs.h, to ease
34855# handling of long lines.
34856ac_delim='%!_!# '
34857for ac_last_try in false false :; do
34858  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34859  if test -z "$ac_tt"; then
34860    break
34861  elif $ac_last_try; then
34862    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34863  else
34864    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34865  fi
34866done
34867
34868# For the awk script, D is an array of macro values keyed by name,
34869# likewise P contains macro parameters if any.  Preserve backslash
34870# newline sequences.
34871
34872ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34873sed -n '
34874s/.\{148\}/&'"$ac_delim"'/g
34875t rset
34876:rset
34877s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34878t def
34879d
34880:def
34881s/\\$//
34882t bsnl
34883s/["\\]/\\&/g
34884s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34885D["\1"]=" \3"/p
34886s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34887d
34888:bsnl
34889s/["\\]/\\&/g
34890s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34891D["\1"]=" \3\\\\\\n"\\/p
34892t cont
34893s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34894t cont
34895d
34896:cont
34897n
34898s/.\{148\}/&'"$ac_delim"'/g
34899t clear
34900:clear
34901s/\\$//
34902t bsnlc
34903s/["\\]/\\&/g; s/^/"/; s/$/"/p
34904d
34905:bsnlc
34906s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34907b cont
34908' <confdefs.h | sed '
34909s/'"$ac_delim"'/"\\\
34910"/g' >>$CONFIG_STATUS || ac_write_fail=1
34911
34912cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34913  for (key in D) D_is_set[key] = 1
34914  FS = ""
34915}
34916/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34917  line = \$ 0
34918  split(line, arg, " ")
34919  if (arg[1] == "#") {
34920    defundef = arg[2]
34921    mac1 = arg[3]
34922  } else {
34923    defundef = substr(arg[1], 2)
34924    mac1 = arg[2]
34925  }
34926  split(mac1, mac2, "(") #)
34927  macro = mac2[1]
34928  prefix = substr(line, 1, index(line, defundef) - 1)
34929  if (D_is_set[macro]) {
34930    # Preserve the white space surrounding the "#".
34931    print prefix "define", macro P[macro] D[macro]
34932    next
34933  } else {
34934    # Replace #undef with comments.  This is necessary, for example,
34935    # in the case of _POSIX_SOURCE, which is predefined and required
34936    # on some systems where configure will not decide to define it.
34937    if (defundef == "undef") {
34938      print "/*", prefix defundef, macro, "*/"
34939      next
34940    }
34941  }
34942}
34943{ print }
34944_ACAWK
34945_ACEOF
34946cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34947  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34948fi # test -n "$CONFIG_HEADERS"
34949
34950
34951eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34952shift
34953for ac_tag
34954do
34955  case $ac_tag in
34956  :[FHLC]) ac_mode=$ac_tag; continue;;
34957  esac
34958  case $ac_mode$ac_tag in
34959  :[FHL]*:*);;
34960  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34961  :[FH]-) ac_tag=-:-;;
34962  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34963  esac
34964  ac_save_IFS=$IFS
34965  IFS=:
34966  set x $ac_tag
34967  IFS=$ac_save_IFS
34968  shift
34969  ac_file=$1
34970  shift
34971
34972  case $ac_mode in
34973  :L) ac_source=$1;;
34974  :[FH])
34975    ac_file_inputs=
34976    for ac_f
34977    do
34978      case $ac_f in
34979      -) ac_f="$ac_tmp/stdin";;
34980      *) # Look for the file first in the build tree, then in the source tree
34981	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34982	 # because $ac_f cannot contain `:'.
34983	 test -f "$ac_f" ||
34984	   case $ac_f in
34985	   [\\/$]*) false;;
34986	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34987	   esac ||
34988	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34989      esac
34990      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34991      as_fn_append ac_file_inputs " '$ac_f'"
34992    done
34993
34994    # Let's still pretend it is `configure' which instantiates (i.e., don't
34995    # use $as_me), people would be surprised to read:
34996    #    /* config.h.  Generated by config.status.  */
34997    configure_input='Generated from '`
34998	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34999	`' by configure.'
35000    if test x"$ac_file" != x-; then
35001      configure_input="$ac_file.  $configure_input"
35002      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
35003$as_echo "$as_me: creating $ac_file" >&6;}
35004    fi
35005    # Neutralize special characters interpreted by sed in replacement strings.
35006    case $configure_input in #(
35007    *\&* | *\|* | *\\* )
35008       ac_sed_conf_input=`$as_echo "$configure_input" |
35009       sed 's/[\\\\&|]/\\\\&/g'`;; #(
35010    *) ac_sed_conf_input=$configure_input;;
35011    esac
35012
35013    case $ac_tag in
35014    *:-:* | *:-) cat >"$ac_tmp/stdin" \
35015      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
35016    esac
35017    ;;
35018  esac
35019
35020  ac_dir=`$as_dirname -- "$ac_file" ||
35021$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35022	 X"$ac_file" : 'X\(//\)[^/]' \| \
35023	 X"$ac_file" : 'X\(//\)$' \| \
35024	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
35025$as_echo X"$ac_file" |
35026    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35027	    s//\1/
35028	    q
35029	  }
35030	  /^X\(\/\/\)[^/].*/{
35031	    s//\1/
35032	    q
35033	  }
35034	  /^X\(\/\/\)$/{
35035	    s//\1/
35036	    q
35037	  }
35038	  /^X\(\/\).*/{
35039	    s//\1/
35040	    q
35041	  }
35042	  s/.*/./; q'`
35043  as_dir="$ac_dir"; as_fn_mkdir_p
35044  ac_builddir=.
35045
35046case "$ac_dir" in
35047.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
35048*)
35049  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
35050  # A ".." for each directory in $ac_dir_suffix.
35051  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
35052  case $ac_top_builddir_sub in
35053  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
35054  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
35055  esac ;;
35056esac
35057ac_abs_top_builddir=$ac_pwd
35058ac_abs_builddir=$ac_pwd$ac_dir_suffix
35059# for backward compatibility:
35060ac_top_builddir=$ac_top_build_prefix
35061
35062case $srcdir in
35063  .)  # We are building in place.
35064    ac_srcdir=.
35065    ac_top_srcdir=$ac_top_builddir_sub
35066    ac_abs_top_srcdir=$ac_pwd ;;
35067  [\\/]* | ?:[\\/]* )  # Absolute name.
35068    ac_srcdir=$srcdir$ac_dir_suffix;
35069    ac_top_srcdir=$srcdir
35070    ac_abs_top_srcdir=$srcdir ;;
35071  *) # Relative name.
35072    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
35073    ac_top_srcdir=$ac_top_build_prefix$srcdir
35074    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
35075esac
35076ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
35077
35078
35079  case $ac_mode in
35080  :F)
35081  #
35082  # CONFIG_FILE
35083  #
35084
35085_ACEOF
35086
35087cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35088# If the template does not know about datarootdir, expand it.
35089# FIXME: This hack should be removed a few years after 2.60.
35090ac_datarootdir_hack=; ac_datarootdir_seen=
35091ac_sed_dataroot='
35092/datarootdir/ {
35093  p
35094  q
35095}
35096/@datadir@/p
35097/@docdir@/p
35098/@infodir@/p
35099/@localedir@/p
35100/@mandir@/p'
35101case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
35102*datarootdir*) ac_datarootdir_seen=yes;;
35103*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
35104  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
35105$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
35106_ACEOF
35107cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35108  ac_datarootdir_hack='
35109  s&@datadir@&$datadir&g
35110  s&@docdir@&$docdir&g
35111  s&@infodir@&$infodir&g
35112  s&@localedir@&$localedir&g
35113  s&@mandir@&$mandir&g
35114  s&\\\${datarootdir}&$datarootdir&g' ;;
35115esac
35116_ACEOF
35117
35118# Neutralize VPATH when `$srcdir' = `.'.
35119# Shell code in configure.ac might set extrasub.
35120# FIXME: do we really want to maintain this feature?
35121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35122ac_sed_extra="$ac_vpsub
35123$extrasub
35124_ACEOF
35125cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35126:t
35127/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
35128s|@configure_input@|$ac_sed_conf_input|;t t
35129s&@top_builddir@&$ac_top_builddir_sub&;t t
35130s&@top_build_prefix@&$ac_top_build_prefix&;t t
35131s&@srcdir@&$ac_srcdir&;t t
35132s&@abs_srcdir@&$ac_abs_srcdir&;t t
35133s&@top_srcdir@&$ac_top_srcdir&;t t
35134s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
35135s&@builddir@&$ac_builddir&;t t
35136s&@abs_builddir@&$ac_abs_builddir&;t t
35137s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
35138$ac_datarootdir_hack
35139"
35140eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
35141  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35142
35143test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
35144  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
35145  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
35146      "$ac_tmp/out"`; test -z "$ac_out"; } &&
35147  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35148which seems to be undefined.  Please make sure it is defined" >&5
35149$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35150which seems to be undefined.  Please make sure it is defined" >&2;}
35151
35152  rm -f "$ac_tmp/stdin"
35153  case $ac_file in
35154  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
35155  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
35156  esac \
35157  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35158 ;;
35159  :H)
35160  #
35161  # CONFIG_HEADER
35162  #
35163  if test x"$ac_file" != x-; then
35164    {
35165      $as_echo "/* $configure_input  */" \
35166      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
35167    } >"$ac_tmp/config.h" \
35168      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35169    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
35170      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
35171$as_echo "$as_me: $ac_file is unchanged" >&6;}
35172    else
35173      rm -f "$ac_file"
35174      mv "$ac_tmp/config.h" "$ac_file" \
35175	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
35176    fi
35177  else
35178    $as_echo "/* $configure_input  */" \
35179      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
35180      || as_fn_error $? "could not create -" "$LINENO" 5
35181  fi
35182 ;;
35183
35184
35185  esac
35186
35187done # for ac_tag
35188
35189
35190as_fn_exit 0
35191_ACEOF
35192ac_clean_files=$ac_clean_files_save
35193
35194test $ac_write_fail = 0 ||
35195  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
35196
35197
35198# configure is writing to config.log, and then calls config.status.
35199# config.status does its own redirection, appending to config.log.
35200# Unfortunately, on DOS this fails, as config.log is still kept open
35201# by configure, so config.status won't be able to write to it; its
35202# output is simply discarded.  So we exec the FD to /dev/null,
35203# effectively closing config.log, so it can be properly (re)opened and
35204# appended to by config.status.  When coming back to configure, we
35205# need to make the FD available again.
35206if test "$no_create" != yes; then
35207  ac_cs_success=:
35208  ac_config_status_args=
35209  test "$silent" = yes &&
35210    ac_config_status_args="$ac_config_status_args --quiet"
35211  exec 5>/dev/null
35212  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
35213  exec 5>>config.log
35214  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
35215  # would make configure fail if this is the last instruction.
35216  $ac_cs_success || as_fn_exit 1
35217fi
35218if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
35219  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
35220$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
35221fi
35222
35223
35224# Make the compare script executable
35225$CHMOD +x $OUTPUT_ROOT/compare.sh
35226
35227# Finally output some useful information to the user
35228
35229# Finally output some useful information to the user
35230
35231if test "x$CCACHE_FOUND" != x; then
35232	if  test "x$HAS_GOOD_CCACHE" = x; then
35233		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
35234		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
35235	else
35236		CCACHE_STATUS="installed and in use"
35237	fi
35238else
35239	if test "x$GCC" = xyes; then
35240		CCACHE_STATUS="not installed (consider installing)"
35241		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
35242	else
35243		CCACHE_STATUS="not available for your system"
35244	fi
35245fi
35246
35247printf "\n"
35248printf "====================================================\n"
35249printf "A new configuration has been successfully created in\n"
35250printf "$OUTPUT_ROOT\n"
35251if test "x$CONFIGURE_COMMAND_LINE" != x; then
35252	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
35253else
35254	printf "using default settings.\n"
35255fi
35256
35257printf "\n"
35258printf "Configuration summary:\n"
35259printf "* Debug level:    $DEBUG_LEVEL\n"
35260printf "* JDK variant:    $JDK_VARIANT\n"
35261printf "* JVM variants:   $with_jvm_variants\n"
35262printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
35263
35264printf "\n"
35265printf "Tools summary:\n"
35266if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
35267  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
35268fi
35269printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
35270printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
35271printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
35272
35273printf "\n"
35274printf "Build performance summary:\n"
35275printf "* Cores to use:   $JOBS\n"
35276printf "* Memory limit:   $MEMORY_SIZE MB\n"
35277printf "* ccache status:  $CCACHE_STATUS\n"
35278printf "\n"
35279
35280if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
35281	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
35282	printf "$CCACHE_HELP_MSG\n"
35283
35284    # Print a helpful message on how to acquire the necessary build dependency.
35285    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
35286    MISSING_DEPENDENCY=ccache
35287    PKGHANDLER_COMMAND=
35288
35289    case $PKGHANDLER in
35290	apt-get)
35291                apt_help     $MISSING_DEPENDENCY ;;
35292    yum)
35293                yum_help     $MISSING_DEPENDENCY ;;
35294	port)
35295                port_help    $MISSING_DEPENDENCY ;;
35296	pkgutil)
35297                pkgutil_help $MISSING_DEPENDENCY ;;
35298	pkgadd)
35299                pkgadd_help  $MISSING_DEPENDENCY ;;
35300    * )
35301      break ;;
35302    esac
35303
35304    if test "x$PKGHANDLER_COMMAND" != x; then
35305        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35306    fi
35307
35308	printf "$HELP_MSG\n"
35309	printf "\n"
35310fi
35311
35312if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35313	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35314	printf "will result in longer build times.\n"
35315	printf "\n"
35316fi
35317
35318if test "x$FOUND_ALT_VARIABLES" != "x"; then
35319	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35320	printf "These are not respected, and will be ignored. It is recommended\n"
35321	printf "that you clean your environment. The following variables are set:\n"
35322	printf "$FOUND_ALT_VARIABLES\n"
35323	printf "\n"
35324fi
35325
35326if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35327	printf "WARNING: Your build output directory is not on a local disk.\n"
35328	printf "This will severely degrade build performance!\n"
35329	printf "It is recommended that you create an output directory on a local disk,\n"
35330	printf "and run the configure script again from that directory.\n"
35331	printf "\n"
35332fi
35333
35334if test "x$IS_RECONFIGURE" = "xyes"; then
35335	printf "WARNING: The result of this configuration has overridden an older\n"
35336	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35337	printf "proper build. Failure to do so might result in strange build problems.\n"
35338	printf "\n"
35339fi
35340
35341