generated-configure.sh revision 896:67dc3d7d5b5f
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_JAVA
611JOBS
612MEMORY_SIZE
613NUM_CORES
614ENABLE_INTREE_EC
615SALIB_NAME
616HOTSPOT_MAKE_ARGS
617FIXPATH
618LIBCXX
619LLVM_LIBS
620LLVM_LDFLAGS
621LLVM_CFLAGS
622LLVM_CONFIG
623LIBFFI_LIBS
624LIBFFI_CFLAGS
625STATIC_CXX_SETTING
626LIBDL
627LIBM
628LIBZIP_CAN_USE_MMAP
629USE_EXTERNAL_LIBZ
630USE_EXTERNAL_LIBGIF
631USE_EXTERNAL_LIBJPEG
632ALSA_LIBS
633ALSA_CFLAGS
634FREETYPE2_LIB_PATH
635USING_SYSTEM_FT_LIB
636FREETYPE2_LIBS
637FREETYPE2_CFLAGS
638CUPS_CFLAGS
639OPENWIN_HOME
640X_EXTRA_LIBS
641X_LIBS
642X_PRE_LIBS
643X_CFLAGS
644XMKMF
645CXXFLAGS_DEBUG_SYMBOLS
646CFLAGS_DEBUG_SYMBOLS
647ZIP_DEBUGINFO_FILES
648ENABLE_DEBUG_SYMBOLS
649COMPILER_SUPPORTS_TARGET_BITS_FLAG
650ZERO_ARCHFLAG
651LDFLAGS_CXX_JDK
652LDFLAGS_JDKEXE_SUFFIX
653LDFLAGS_JDKLIB_SUFFIX
654LDFLAGS_JDKEXE
655LDFLAGS_JDKLIB
656CXXFLAGS_JDKEXE
657CXXFLAGS_JDKLIB
658CFLAGS_JDKEXE
659CFLAGS_JDKLIB
660MACOSX_VERSION_MIN
661PACKAGE_PATH
662LEGACY_EXTRA_LDFLAGS
663LEGACY_EXTRA_CXXFLAGS
664LEGACY_EXTRA_CFLAGS
665CXX_FLAG_DEPS
666C_FLAG_DEPS
667CXX_O_FLAG_NONE
668CXX_O_FLAG_NORM
669CXX_O_FLAG_HI
670CXX_O_FLAG_HIGHEST
671C_O_FLAG_NONE
672C_O_FLAG_NORM
673C_O_FLAG_HI
674C_O_FLAG_HIGHEST
675POST_MCS_CMD
676POST_STRIP_CMD
677SET_EXECUTABLE_ORIGIN
678SET_SHARED_LIBRARY_ORIGIN
679CXX_FLAG_REORDER
680C_FLAG_REORDER
681SET_SHARED_LIBRARY_MAPFILE
682SET_SHARED_LIBRARY_NAME
683SHARED_LIBRARY_FLAGS
684EXE_SUFFIX
685STATIC_LIBRARY_SUFFIX
686SHARED_LIBRARY_SUFFIX
687LIBRARY_PREFIX
688STATIC_LIBRARY
689SHARED_LIBRARY
690OBJ_SUFFIX
691COMPILER_NAME
692JT_HOME
693JTREGEXE
694LIPO
695ac_ct_OBJDUMP
696OBJDUMP
697ac_ct_OBJCOPY
698OBJCOPY
699MCS
700STRIP
701GNM
702NM
703AS
704CXXCPP
705CPP
706COMPILER_TYPE
707RC_FLAGS
708DUMPBIN
709WINAR
710HOTSPOT_RC
711HOTSPOT_MT
712RC
713MT
714WINLD
715HOTSPOT_LD
716HOTSPOT_CXX
717ARFLAGS
718AR
719LDEXECXX
720LDCXX
721LDEXE
722LD
723ac_ct_OBJC
724OBJCFLAGS
725OBJC
726ac_ct_CXX
727CXXFLAGS
728CXX
729ac_ct_PROPER_COMPILER_CXX
730PROPER_COMPILER_CXX
731POTENTIAL_CXX
732TOOLS_DIR_CXX
733OBJEXT
734EXEEXT
735ac_ct_CC
736CPPFLAGS
737LDFLAGS
738CFLAGS
739CC
740ac_ct_PROPER_COMPILER_CC
741PROPER_COMPILER_CC
742POTENTIAL_CC
743TOOLS_DIR_CC
744BUILD_LD
745BUILD_CXX
746BUILD_CC
747MSVCR_DLL
748DXSDK_INCLUDE_PATH
749DXSDK_LIB_PATH
750VS_PATH
751VS_LIB
752VS_INCLUDE
753CYGWIN_LINK
754AR_OUT_OPTION
755LD_OUT_OPTION
756EXE_OUT_OPTION
757CC_OUT_OPTION
758BUILD_HOTSPOT
759HOTSPOT_DIST
760BUILD_OUTPUT
761OVERRIDE_SRC_ROOT
762ADD_SRC_ROOT
763JDK_TOPDIR
764NASHORN_TOPDIR
765HOTSPOT_TOPDIR
766JAXWS_TOPDIR
767JAXP_TOPDIR
768CORBA_TOPDIR
769LANGTOOLS_TOPDIR
770BOOT_JDK_JVMARGS
771JAVAC_FLAGS
772BOOT_JDK_SOURCETARGET
773BOOT_JDK
774BOOT_TOOLSJAR
775BOOT_RTJAR
776JAVA_CHECK
777JAVAC_CHECK
778COOKED_BUILD_NUMBER
779JDK_VERSION
780COPYRIGHT_YEAR
781MACOSX_BUNDLE_ID_BASE
782MACOSX_BUNDLE_NAME_BASE
783COMPANY_NAME
784JDK_RC_PLATFORM_NAME
785PRODUCT_SUFFIX
786PRODUCT_NAME
787LAUNCHER_NAME
788MILESTONE
789JDK_BUILD_NUMBER
790JDK_UPDATE_VERSION
791JDK_MICRO_VERSION
792JDK_MINOR_VERSION
793JDK_MAJOR_VERSION
794USER_RELEASE_SUFFIX
795COMPRESS_JARS
796UNLIMITED_CRYPTO
797CACERTS_FILE
798TEST_IN_BUILD
799BUILD_HEADLESS
800SUPPORT_HEADFUL
801SUPPORT_HEADLESS
802BDEPS_FTP
803BDEPS_UNZIP
804OS_VERSION_MICRO
805OS_VERSION_MINOR
806OS_VERSION_MAJOR
807PKG_CONFIG
808CODESIGN
809XATTR
810IS_GNU_TIME
811TIME
812STAT
813HG
814READELF
815OTOOL
816LDD
817ZIP
818UNZIP
819FIND_DELETE
820MAKE
821CHECK_TOOLSDIR_MAKE
822CHECK_TOOLSDIR_GMAKE
823CHECK_MAKE
824CHECK_GMAKE
825PKGHANDLER
826OUTPUT_ROOT
827CONF_NAME
828SPEC
829BUILD_VARIANT_RELEASE
830DEBUG_CLASSFILES
831FASTDEBUG
832VARIANT
833DEBUG_LEVEL
834MACOSX_UNIVERSAL
835INCLUDE_SA
836JVM_VARIANT_ZEROSHARK
837JVM_VARIANT_ZERO
838JVM_VARIANT_KERNEL
839JVM_VARIANT_MINIMAL1
840JVM_VARIANT_CLIENT
841JVM_VARIANT_SERVER
842JVM_VARIANTS
843JDK_VARIANT
844SET_OPENJDK
845BUILD_LOG_WRAPPER
846BUILD_LOG_PREVIOUS
847BUILD_LOG
848SYS_ROOT
849PATH_SEP
850SRC_ROOT
851ZERO_ARCHDEF
852DEFINE_CROSS_COMPILE_ARCH
853LP64
854OPENJDK_TARGET_OS_API_DIR
855OPENJDK_TARGET_CPU_JLI_CFLAGS
856OPENJDK_TARGET_CPU_OSARCH
857OPENJDK_TARGET_CPU_ISADIR
858OPENJDK_TARGET_CPU_LIBDIR
859OPENJDK_TARGET_CPU_LEGACY_LIB
860OPENJDK_TARGET_CPU_LEGACY
861REQUIRED_OS_VERSION
862REQUIRED_OS_NAME
863COMPILE_TYPE
864OPENJDK_TARGET_CPU_ENDIAN
865OPENJDK_TARGET_CPU_BITS
866OPENJDK_TARGET_CPU_ARCH
867OPENJDK_TARGET_CPU
868OPENJDK_TARGET_OS_API
869OPENJDK_TARGET_OS
870OPENJDK_BUILD_CPU_ENDIAN
871OPENJDK_BUILD_CPU_BITS
872OPENJDK_BUILD_CPU_ARCH
873OPENJDK_BUILD_CPU
874OPENJDK_BUILD_OS_API
875OPENJDK_BUILD_OS
876OPENJDK_BUILD_AUTOCONF_NAME
877OPENJDK_TARGET_AUTOCONF_NAME
878target_os
879target_vendor
880target_cpu
881target
882host_os
883host_vendor
884host_cpu
885host
886build_os
887build_vendor
888build_cpu
889build
890SETFILE
891DF
892READLINK
893CYGPATH
894NAWK
895SED
896FGREP
897EGREP
898GREP
899AWK
900XARGS
901WHICH
902WC
903UNIQ
904UNAME
905TR
906TOUCH
907TEE
908TAR
909TAIL
910SORT
911SH
912RM
913PRINTF
914MV
915MKTEMP
916MKDIR
917LS
918LN
919HEAD
920FIND
921FILE
922EXPR
923ECHO
924DIRNAME
925DIFF
926DATE
927CUT
928CPIO
929CP
930COMM
931CMP
932CHMOD
933CAT
934BASH
935BASENAME
936DATE_WHEN_CONFIGURED
937CONFIGURE_COMMAND_LINE
938CUSTOM_MAKE_DIR
939target_alias
940host_alias
941build_alias
942LIBS
943ECHO_T
944ECHO_N
945ECHO_C
946DEFS
947mandir
948localedir
949libdir
950psdir
951pdfdir
952dvidir
953htmldir
954infodir
955docdir
956oldincludedir
957includedir
958localstatedir
959sharedstatedir
960sysconfdir
961datadir
962datarootdir
963libexecdir
964sbindir
965bindir
966program_transform_name
967prefix
968exec_prefix
969PACKAGE_URL
970PACKAGE_BUGREPORT
971PACKAGE_STRING
972PACKAGE_VERSION
973PACKAGE_TARNAME
974PACKAGE_NAME
975PATH_SEPARATOR
976SHELL'
977ac_subst_files=''
978ac_user_opts='
979enable_option_checking
980with_custom_make_dir
981with_target_bits
982with_sys_root
983with_tools_dir
984with_devkit
985enable_openjdk_only
986with_jdk_variant
987with_jvm_variants
988enable_debug
989with_debug_level
990with_conf_name
991with_builddeps_conf
992with_builddeps_server
993with_builddeps_dir
994with_builddeps_group
995enable_headful
996enable_hotspot_test_in_build
997with_cacerts_file
998enable_unlimited_crypto
999with_milestone
1000with_update_version
1001with_build_number
1002with_user_release_suffix
1003with_boot_jdk
1004with_boot_jdk_jvmargs
1005with_add_source_root
1006with_override_source_root
1007with_adds_and_overrides
1008with_override_langtools
1009with_override_corba
1010with_override_jaxp
1011with_override_jaxws
1012with_override_hotspot
1013with_override_jdk
1014with_import_hotspot
1015with_msvcr_dll
1016with_dxsdk
1017with_dxsdk_lib
1018with_dxsdk_include
1019with_jtreg
1020with_extra_cflags
1021with_extra_cxxflags
1022with_extra_ldflags
1023enable_debug_symbols
1024enable_zip_debug_info
1025enable_macosx_runtime_support
1026with_x
1027with_cups
1028with_cups_include
1029with_freetype
1030with_alsa
1031with_alsa_include
1032with_alsa_lib
1033with_giflib
1034with_zlib
1035with_stdc__lib
1036with_num_cores
1037with_memory_size
1038with_jobs
1039with_sjavac_server_java
1040enable_sjavac
1041enable_precompiled_headers
1042enable_ccache
1043with_ccache_dir
1044'
1045      ac_precious_vars='build_alias
1046host_alias
1047target_alias
1048PKG_CONFIG
1049CC
1050CFLAGS
1051LDFLAGS
1052LIBS
1053CPPFLAGS
1054CXX
1055CXXFLAGS
1056CCC
1057OBJC
1058OBJCFLAGS
1059CPP
1060CXXCPP
1061XMKMF
1062FREETYPE2_CFLAGS
1063FREETYPE2_LIBS
1064ALSA_CFLAGS
1065ALSA_LIBS
1066LIBFFI_CFLAGS
1067LIBFFI_LIBS'
1068
1069
1070# Initialize some variables set by options.
1071ac_init_help=
1072ac_init_version=false
1073ac_unrecognized_opts=
1074ac_unrecognized_sep=
1075# The variables have the same names as the options, with
1076# dashes changed to underlines.
1077cache_file=/dev/null
1078exec_prefix=NONE
1079no_create=
1080no_recursion=
1081prefix=NONE
1082program_prefix=NONE
1083program_suffix=NONE
1084program_transform_name=s,x,x,
1085silent=
1086site=
1087srcdir=
1088verbose=
1089x_includes=NONE
1090x_libraries=NONE
1091
1092# Installation directory options.
1093# These are left unexpanded so users can "make install exec_prefix=/foo"
1094# and all the variables that are supposed to be based on exec_prefix
1095# by default will actually change.
1096# Use braces instead of parens because sh, perl, etc. also accept them.
1097# (The list follows the same order as the GNU Coding Standards.)
1098bindir='${exec_prefix}/bin'
1099sbindir='${exec_prefix}/sbin'
1100libexecdir='${exec_prefix}/libexec'
1101datarootdir='${prefix}/share'
1102datadir='${datarootdir}'
1103sysconfdir='${prefix}/etc'
1104sharedstatedir='${prefix}/com'
1105localstatedir='${prefix}/var'
1106includedir='${prefix}/include'
1107oldincludedir='/usr/include'
1108docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1109infodir='${datarootdir}/info'
1110htmldir='${docdir}'
1111dvidir='${docdir}'
1112pdfdir='${docdir}'
1113psdir='${docdir}'
1114libdir='${exec_prefix}/lib'
1115localedir='${datarootdir}/locale'
1116mandir='${datarootdir}/man'
1117
1118ac_prev=
1119ac_dashdash=
1120for ac_option
1121do
1122  # If the previous option needs an argument, assign it.
1123  if test -n "$ac_prev"; then
1124    eval $ac_prev=\$ac_option
1125    ac_prev=
1126    continue
1127  fi
1128
1129  case $ac_option in
1130  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1131  *=)   ac_optarg= ;;
1132  *)    ac_optarg=yes ;;
1133  esac
1134
1135  # Accept the important Cygnus configure options, so we can diagnose typos.
1136
1137  case $ac_dashdash$ac_option in
1138  --)
1139    ac_dashdash=yes ;;
1140
1141  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1142    ac_prev=bindir ;;
1143  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1144    bindir=$ac_optarg ;;
1145
1146  -build | --build | --buil | --bui | --bu)
1147    ac_prev=build_alias ;;
1148  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1149    build_alias=$ac_optarg ;;
1150
1151  -cache-file | --cache-file | --cache-fil | --cache-fi \
1152  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1153    ac_prev=cache_file ;;
1154  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1155  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1156    cache_file=$ac_optarg ;;
1157
1158  --config-cache | -C)
1159    cache_file=config.cache ;;
1160
1161  -datadir | --datadir | --datadi | --datad)
1162    ac_prev=datadir ;;
1163  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1164    datadir=$ac_optarg ;;
1165
1166  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1167  | --dataroo | --dataro | --datar)
1168    ac_prev=datarootdir ;;
1169  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1170  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1171    datarootdir=$ac_optarg ;;
1172
1173  -disable-* | --disable-*)
1174    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1175    # Reject names that are not valid shell variable names.
1176    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1177      as_fn_error $? "invalid feature name: $ac_useropt"
1178    ac_useropt_orig=$ac_useropt
1179    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1180    case $ac_user_opts in
1181      *"
1182"enable_$ac_useropt"
1183"*) ;;
1184      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1185	 ac_unrecognized_sep=', ';;
1186    esac
1187    eval enable_$ac_useropt=no ;;
1188
1189  -docdir | --docdir | --docdi | --doc | --do)
1190    ac_prev=docdir ;;
1191  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1192    docdir=$ac_optarg ;;
1193
1194  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1195    ac_prev=dvidir ;;
1196  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1197    dvidir=$ac_optarg ;;
1198
1199  -enable-* | --enable-*)
1200    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1201    # Reject names that are not valid shell variable names.
1202    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1203      as_fn_error $? "invalid feature name: $ac_useropt"
1204    ac_useropt_orig=$ac_useropt
1205    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1206    case $ac_user_opts in
1207      *"
1208"enable_$ac_useropt"
1209"*) ;;
1210      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1211	 ac_unrecognized_sep=', ';;
1212    esac
1213    eval enable_$ac_useropt=\$ac_optarg ;;
1214
1215  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1216  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1217  | --exec | --exe | --ex)
1218    ac_prev=exec_prefix ;;
1219  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1220  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1221  | --exec=* | --exe=* | --ex=*)
1222    exec_prefix=$ac_optarg ;;
1223
1224  -gas | --gas | --ga | --g)
1225    # Obsolete; use --with-gas.
1226    with_gas=yes ;;
1227
1228  -help | --help | --hel | --he | -h)
1229    ac_init_help=long ;;
1230  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1231    ac_init_help=recursive ;;
1232  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1233    ac_init_help=short ;;
1234
1235  -host | --host | --hos | --ho)
1236    ac_prev=host_alias ;;
1237  -host=* | --host=* | --hos=* | --ho=*)
1238    host_alias=$ac_optarg ;;
1239
1240  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1241    ac_prev=htmldir ;;
1242  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1243  | --ht=*)
1244    htmldir=$ac_optarg ;;
1245
1246  -includedir | --includedir | --includedi | --included | --include \
1247  | --includ | --inclu | --incl | --inc)
1248    ac_prev=includedir ;;
1249  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1250  | --includ=* | --inclu=* | --incl=* | --inc=*)
1251    includedir=$ac_optarg ;;
1252
1253  -infodir | --infodir | --infodi | --infod | --info | --inf)
1254    ac_prev=infodir ;;
1255  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1256    infodir=$ac_optarg ;;
1257
1258  -libdir | --libdir | --libdi | --libd)
1259    ac_prev=libdir ;;
1260  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1261    libdir=$ac_optarg ;;
1262
1263  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1264  | --libexe | --libex | --libe)
1265    ac_prev=libexecdir ;;
1266  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1267  | --libexe=* | --libex=* | --libe=*)
1268    libexecdir=$ac_optarg ;;
1269
1270  -localedir | --localedir | --localedi | --localed | --locale)
1271    ac_prev=localedir ;;
1272  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1273    localedir=$ac_optarg ;;
1274
1275  -localstatedir | --localstatedir | --localstatedi | --localstated \
1276  | --localstate | --localstat | --localsta | --localst | --locals)
1277    ac_prev=localstatedir ;;
1278  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1279  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1280    localstatedir=$ac_optarg ;;
1281
1282  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1283    ac_prev=mandir ;;
1284  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1285    mandir=$ac_optarg ;;
1286
1287  -nfp | --nfp | --nf)
1288    # Obsolete; use --without-fp.
1289    with_fp=no ;;
1290
1291  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1292  | --no-cr | --no-c | -n)
1293    no_create=yes ;;
1294
1295  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1296  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1297    no_recursion=yes ;;
1298
1299  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1300  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1301  | --oldin | --oldi | --old | --ol | --o)
1302    ac_prev=oldincludedir ;;
1303  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1304  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1305  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1306    oldincludedir=$ac_optarg ;;
1307
1308  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1309    ac_prev=prefix ;;
1310  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1311    prefix=$ac_optarg ;;
1312
1313  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1314  | --program-pre | --program-pr | --program-p)
1315    ac_prev=program_prefix ;;
1316  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1317  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1318    program_prefix=$ac_optarg ;;
1319
1320  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1321  | --program-suf | --program-su | --program-s)
1322    ac_prev=program_suffix ;;
1323  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1324  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1325    program_suffix=$ac_optarg ;;
1326
1327  -program-transform-name | --program-transform-name \
1328  | --program-transform-nam | --program-transform-na \
1329  | --program-transform-n | --program-transform- \
1330  | --program-transform | --program-transfor \
1331  | --program-transfo | --program-transf \
1332  | --program-trans | --program-tran \
1333  | --progr-tra | --program-tr | --program-t)
1334    ac_prev=program_transform_name ;;
1335  -program-transform-name=* | --program-transform-name=* \
1336  | --program-transform-nam=* | --program-transform-na=* \
1337  | --program-transform-n=* | --program-transform-=* \
1338  | --program-transform=* | --program-transfor=* \
1339  | --program-transfo=* | --program-transf=* \
1340  | --program-trans=* | --program-tran=* \
1341  | --progr-tra=* | --program-tr=* | --program-t=*)
1342    program_transform_name=$ac_optarg ;;
1343
1344  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1345    ac_prev=pdfdir ;;
1346  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1347    pdfdir=$ac_optarg ;;
1348
1349  -psdir | --psdir | --psdi | --psd | --ps)
1350    ac_prev=psdir ;;
1351  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1352    psdir=$ac_optarg ;;
1353
1354  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1355  | -silent | --silent | --silen | --sile | --sil)
1356    silent=yes ;;
1357
1358  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1359    ac_prev=sbindir ;;
1360  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1361  | --sbi=* | --sb=*)
1362    sbindir=$ac_optarg ;;
1363
1364  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1365  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1366  | --sharedst | --shareds | --shared | --share | --shar \
1367  | --sha | --sh)
1368    ac_prev=sharedstatedir ;;
1369  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1370  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1371  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1372  | --sha=* | --sh=*)
1373    sharedstatedir=$ac_optarg ;;
1374
1375  -site | --site | --sit)
1376    ac_prev=site ;;
1377  -site=* | --site=* | --sit=*)
1378    site=$ac_optarg ;;
1379
1380  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1381    ac_prev=srcdir ;;
1382  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1383    srcdir=$ac_optarg ;;
1384
1385  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1386  | --syscon | --sysco | --sysc | --sys | --sy)
1387    ac_prev=sysconfdir ;;
1388  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1389  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1390    sysconfdir=$ac_optarg ;;
1391
1392  -target | --target | --targe | --targ | --tar | --ta | --t)
1393    ac_prev=target_alias ;;
1394  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1395    target_alias=$ac_optarg ;;
1396
1397  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1398    verbose=yes ;;
1399
1400  -version | --version | --versio | --versi | --vers | -V)
1401    ac_init_version=: ;;
1402
1403  -with-* | --with-*)
1404    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1405    # Reject names that are not valid shell variable names.
1406    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1407      as_fn_error $? "invalid package name: $ac_useropt"
1408    ac_useropt_orig=$ac_useropt
1409    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1410    case $ac_user_opts in
1411      *"
1412"with_$ac_useropt"
1413"*) ;;
1414      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1415	 ac_unrecognized_sep=', ';;
1416    esac
1417    eval with_$ac_useropt=\$ac_optarg ;;
1418
1419  -without-* | --without-*)
1420    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1421    # Reject names that are not valid shell variable names.
1422    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1423      as_fn_error $? "invalid package name: $ac_useropt"
1424    ac_useropt_orig=$ac_useropt
1425    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1426    case $ac_user_opts in
1427      *"
1428"with_$ac_useropt"
1429"*) ;;
1430      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1431	 ac_unrecognized_sep=', ';;
1432    esac
1433    eval with_$ac_useropt=no ;;
1434
1435  --x)
1436    # Obsolete; use --with-x.
1437    with_x=yes ;;
1438
1439  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1440  | --x-incl | --x-inc | --x-in | --x-i)
1441    ac_prev=x_includes ;;
1442  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1443  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1444    x_includes=$ac_optarg ;;
1445
1446  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1447  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1448    ac_prev=x_libraries ;;
1449  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1450  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1451    x_libraries=$ac_optarg ;;
1452
1453  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1454Try \`$0 --help' for more information"
1455    ;;
1456
1457  *=*)
1458    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1459    # Reject names that are not valid shell variable names.
1460    case $ac_envvar in #(
1461      '' | [0-9]* | *[!_$as_cr_alnum]* )
1462      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1463    esac
1464    eval $ac_envvar=\$ac_optarg
1465    export $ac_envvar ;;
1466
1467  *)
1468    # FIXME: should be removed in autoconf 3.0.
1469    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1470    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1471      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1472    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1473    ;;
1474
1475  esac
1476done
1477
1478if test -n "$ac_prev"; then
1479  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1480  as_fn_error $? "missing argument to $ac_option"
1481fi
1482
1483if test -n "$ac_unrecognized_opts"; then
1484  case $enable_option_checking in
1485    no) ;;
1486    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1487    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1488  esac
1489fi
1490
1491# Check all directory arguments for consistency.
1492for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1493		datadir sysconfdir sharedstatedir localstatedir includedir \
1494		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1495		libdir localedir mandir
1496do
1497  eval ac_val=\$$ac_var
1498  # Remove trailing slashes.
1499  case $ac_val in
1500    */ )
1501      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1502      eval $ac_var=\$ac_val;;
1503  esac
1504  # Be sure to have absolute directory names.
1505  case $ac_val in
1506    [\\/$]* | ?:[\\/]* )  continue;;
1507    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1508  esac
1509  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1510done
1511
1512# There might be people who depend on the old broken behavior: `$host'
1513# used to hold the argument of --host etc.
1514# FIXME: To remove some day.
1515build=$build_alias
1516host=$host_alias
1517target=$target_alias
1518
1519# FIXME: To remove some day.
1520if test "x$host_alias" != x; then
1521  if test "x$build_alias" = x; then
1522    cross_compiling=maybe
1523    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1524    If a cross compiler is detected then cross compile mode will be used" >&2
1525  elif test "x$build_alias" != "x$host_alias"; then
1526    cross_compiling=yes
1527  fi
1528fi
1529
1530ac_tool_prefix=
1531test -n "$host_alias" && ac_tool_prefix=$host_alias-
1532
1533test "$silent" = yes && exec 6>/dev/null
1534
1535
1536ac_pwd=`pwd` && test -n "$ac_pwd" &&
1537ac_ls_di=`ls -di .` &&
1538ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1539  as_fn_error $? "working directory cannot be determined"
1540test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1541  as_fn_error $? "pwd does not report name of working directory"
1542
1543
1544# Find the source files, if location was not specified.
1545if test -z "$srcdir"; then
1546  ac_srcdir_defaulted=yes
1547  # Try the directory containing this script, then the parent directory.
1548  ac_confdir=`$as_dirname -- "$as_myself" ||
1549$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1550	 X"$as_myself" : 'X\(//\)[^/]' \| \
1551	 X"$as_myself" : 'X\(//\)$' \| \
1552	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1553$as_echo X"$as_myself" |
1554    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1555	    s//\1/
1556	    q
1557	  }
1558	  /^X\(\/\/\)[^/].*/{
1559	    s//\1/
1560	    q
1561	  }
1562	  /^X\(\/\/\)$/{
1563	    s//\1/
1564	    q
1565	  }
1566	  /^X\(\/\).*/{
1567	    s//\1/
1568	    q
1569	  }
1570	  s/.*/./; q'`
1571  srcdir=$ac_confdir
1572  if test ! -r "$srcdir/$ac_unique_file"; then
1573    srcdir=..
1574  fi
1575else
1576  ac_srcdir_defaulted=no
1577fi
1578if test ! -r "$srcdir/$ac_unique_file"; then
1579  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1580  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1581fi
1582ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1583ac_abs_confdir=`(
1584	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1585	pwd)`
1586# When building in place, set srcdir=.
1587if test "$ac_abs_confdir" = "$ac_pwd"; then
1588  srcdir=.
1589fi
1590# Remove unnecessary trailing slashes from srcdir.
1591# Double slashes in file names in object file debugging info
1592# mess up M-x gdb in Emacs.
1593case $srcdir in
1594*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1595esac
1596for ac_var in $ac_precious_vars; do
1597  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1598  eval ac_env_${ac_var}_value=\$${ac_var}
1599  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1600  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1601done
1602
1603#
1604# Report the --help message.
1605#
1606if test "$ac_init_help" = "long"; then
1607  # Omit some internal or obsolete options to make the list less imposing.
1608  # This message is too long to be a string in the A/UX 3.1 sh.
1609  cat <<_ACEOF
1610\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1611
1612Usage: $0 [OPTION]... [VAR=VALUE]...
1613
1614To assign environment variables (e.g., CC, CFLAGS...), specify them as
1615VAR=VALUE.  See below for descriptions of some of the useful variables.
1616
1617Defaults for the options are specified in brackets.
1618
1619Configuration:
1620  -h, --help              display this help and exit
1621      --help=short        display options specific to this package
1622      --help=recursive    display the short help of all the included packages
1623  -V, --version           display version information and exit
1624  -q, --quiet, --silent   do not print \`checking ...' messages
1625      --cache-file=FILE   cache test results in FILE [disabled]
1626  -C, --config-cache      alias for \`--cache-file=config.cache'
1627  -n, --no-create         do not create output files
1628      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1629
1630Installation directories:
1631  --prefix=PREFIX         install architecture-independent files in PREFIX
1632                          [$ac_default_prefix]
1633  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1634                          [PREFIX]
1635
1636By default, \`make install' will install all the files in
1637\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1638an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1639for instance \`--prefix=\$HOME'.
1640
1641For better control, use the options below.
1642
1643Fine tuning of the installation directories:
1644  --bindir=DIR            user executables [EPREFIX/bin]
1645  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1646  --libexecdir=DIR        program executables [EPREFIX/libexec]
1647  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1648  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1649  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1650  --libdir=DIR            object code libraries [EPREFIX/lib]
1651  --includedir=DIR        C header files [PREFIX/include]
1652  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1653  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1654  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1655  --infodir=DIR           info documentation [DATAROOTDIR/info]
1656  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1657  --mandir=DIR            man documentation [DATAROOTDIR/man]
1658  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1659  --htmldir=DIR           html documentation [DOCDIR]
1660  --dvidir=DIR            dvi documentation [DOCDIR]
1661  --pdfdir=DIR            pdf documentation [DOCDIR]
1662  --psdir=DIR             ps documentation [DOCDIR]
1663_ACEOF
1664
1665  cat <<\_ACEOF
1666
1667X features:
1668  --x-includes=DIR    X include files are in DIR
1669  --x-libraries=DIR   X library files are in DIR
1670
1671System types:
1672  --build=BUILD     configure for building on BUILD [guessed]
1673  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1674  --target=TARGET   configure for building compilers for TARGET [HOST]
1675_ACEOF
1676fi
1677
1678if test -n "$ac_init_help"; then
1679  case $ac_init_help in
1680     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1681   esac
1682  cat <<\_ACEOF
1683
1684Optional Features:
1685  --disable-option-checking  ignore unrecognized --enable/--with options
1686  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1687  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1688  --enable-openjdk-only   suppress building custom source even if present
1689                          [disabled]
1690  --enable-debug          set the debug level to fastdebug (shorthand for
1691                          --with-debug-level=fastdebug) [disabled]
1692  --disable-headful       disable building headful support (graphical UI
1693                          support) [enabled]
1694  --enable-hotspot-test-in-build
1695                          run the Queens test after Hotspot build [disabled]
1696  --enable-unlimited-crypto
1697                          Enable unlimited crypto policy [disabled]
1698  --disable-debug-symbols disable generation of debug symbols [enabled]
1699  --disable-zip-debug-info
1700                          disable zipping of debug-info files [enabled]
1701  --disable-macosx-runtime-support
1702                          disable the use of MacOSX Java runtime support
1703                          framework [enabled]
1704  --enable-sjavac         use sjavac to do fast incremental compiles
1705                          [disabled]
1706  --disable-precompiled-headers
1707                          disable using precompiled headers when compiling C++
1708                          [enabled]
1709  --disable-ccache        disable using ccache to speed up recompilations
1710                          [enabled]
1711
1712Optional Packages:
1713  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1714  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1715  --with-custom-make-dir  use this directory for custom build/make files
1716  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1717                          support it), e.g. --with-target-bits=32 [guessed]
1718  --with-sys-root         pass this sys-root to the compilers and tools (for
1719                          cross-compiling)
1720  --with-tools-dir        search this directory for compilers and tools (for
1721                          cross-compiling)
1722  --with-devkit           use this directory as base for tools-dir and
1723                          sys-root (for cross-compiling)
1724  --with-jdk-variant      JDK variant to build (normal) [normal]
1725  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1726                          client, minimal1, kernel, zero, zeroshark) [server]
1727  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1728                          [release]
1729  --with-conf-name        use this as the name of the configuration [generated
1730                          from important configuration options]
1731  --with-builddeps-conf   use this configuration file for the builddeps
1732  --with-builddeps-server download and use build dependencies from this server
1733                          url
1734  --with-builddeps-dir    store downloaded build dependencies here
1735                          [/localhome/builddeps]
1736  --with-builddeps-group  chgrp the downloaded build dependencies to this
1737                          group
1738  --with-cacerts-file     specify alternative cacerts file
1739  --with-milestone        Set milestone value for build [internal]
1740  --with-update-version   Set update version value for build [b00]
1741  --with-build-number     Set build number value for build [b00]
1742  --with-user-release-suffix
1743                          Add a custom string to the version string if build
1744                          number isn't set.[username_builddateb00]
1745  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1746  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1747                          invocations of the Boot JDK, overriding the default
1748                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1749                          -enableassertions"
1750  --with-add-source-root  for each and every source directory, look in this
1751                          additional source root for the same directory; if it
1752                          exists and have files in it, include it in the build
1753  --with-override-source-root
1754                          for each and every source directory, look in this
1755                          override source root for the same directory; if it
1756                          exists, use that directory instead and ignore the
1757                          directory in the original source root
1758  --with-adds-and-overrides
1759                          use the subdirs 'adds' and 'overrides' in the
1760                          specified directory as add-source-root and
1761                          override-source-root
1762  --with-override-langtools
1763                          use this langtools dir for the build
1764  --with-override-corba   use this corba dir for the build
1765  --with-override-jaxp    use this jaxp dir for the build
1766  --with-override-jaxws   use this jaxws dir for the build
1767  --with-override-hotspot use this hotspot dir for the build
1768  --with-override-jdk     use this jdk dir for the build
1769  --with-import-hotspot   import hotspot binaries from this jdk image or
1770                          hotspot build dist dir instead of building from
1771                          source
1772  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1773                          only) [probed]
1774  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1775  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1776                          [probed]
1777  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1778                          [probed]
1779  --with-jtreg            Regression Test Harness [probed]
1780  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1781  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1782  --with-extra-ldflags    extra flags to be used when linking jdk
1783  --with-x                use the X Window System
1784  --with-cups             specify prefix directory for the cups package
1785                          (expecting the headers under PATH/include)
1786  --with-cups-include     specify directory for the cups include files
1787  --with-freetype         specify prefix directory for the freetype2 package
1788                          (expecting the libraries under PATH/lib and the
1789                          headers under PATH/include)
1790  --with-alsa             specify prefix directory for the alsa package
1791                          (expecting the libraries under PATH/lib and the
1792                          headers under PATH/include)
1793  --with-alsa-include     specify directory for the alsa include files
1794  --with-alsa-lib         specify directory for the alsa library
1795  --with-giflib           use giflib from build system or OpenJDK source
1796                          (system, bundled) [bundled]
1797  --with-zlib             use zlib from build system or OpenJDK source
1798                          (system, bundled) [bundled]
1799  --with-stdc++lib=<static>,<dynamic>,<default>
1800                          force linking of the C++ runtime on Linux to either
1801                          static or dynamic, default is static with dynamic as
1802                          fallback
1803  --with-num-cores        number of cores in the build system, e.g.
1804                          --with-num-cores=8 [probed]
1805  --with-memory-size      memory (in MB) available in the build system, e.g.
1806                          --with-memory-size=1024 [probed]
1807  --with-jobs             number of parallel jobs to let make run [calculated
1808                          based on cores and memory]
1809  --with-sjavac-server-java
1810                          use this java binary for running the sjavac
1811                          background server [Boot JDK java]
1812  --with-ccache-dir       where to store ccache files [~/.ccache]
1813
1814Some influential environment variables:
1815  PKG_CONFIG  path to pkg-config utility
1816  CC          C compiler command
1817  CFLAGS      C compiler flags
1818  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1819              nonstandard directory <lib dir>
1820  LIBS        libraries to pass to the linker, e.g. -l<library>
1821  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1822              you have headers in a nonstandard directory <include dir>
1823  CXX         C++ compiler command
1824  CXXFLAGS    C++ compiler flags
1825  OBJC        Objective C compiler command
1826  OBJCFLAGS   Objective C compiler flags
1827  CPP         C preprocessor
1828  CXXCPP      C++ preprocessor
1829  XMKMF       Path to xmkmf, Makefile generator for X Window System
1830  FREETYPE2_CFLAGS
1831              C compiler flags for FREETYPE2, overriding pkg-config
1832  FREETYPE2_LIBS
1833              linker flags for FREETYPE2, overriding pkg-config
1834  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1835  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1836  LIBFFI_CFLAGS
1837              C compiler flags for LIBFFI, overriding pkg-config
1838  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1839
1840Use these variables to override the choices made by `configure' or to help
1841it to find libraries and programs with nonstandard names/locations.
1842
1843Report bugs to <build-dev@openjdk.java.net>.
1844OpenJDK home page: <http://openjdk.java.net>.
1845_ACEOF
1846ac_status=$?
1847fi
1848
1849if test "$ac_init_help" = "recursive"; then
1850  # If there are subdirs, report their specific --help.
1851  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1852    test -d "$ac_dir" ||
1853      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1854      continue
1855    ac_builddir=.
1856
1857case "$ac_dir" in
1858.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1859*)
1860  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1861  # A ".." for each directory in $ac_dir_suffix.
1862  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1863  case $ac_top_builddir_sub in
1864  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1865  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1866  esac ;;
1867esac
1868ac_abs_top_builddir=$ac_pwd
1869ac_abs_builddir=$ac_pwd$ac_dir_suffix
1870# for backward compatibility:
1871ac_top_builddir=$ac_top_build_prefix
1872
1873case $srcdir in
1874  .)  # We are building in place.
1875    ac_srcdir=.
1876    ac_top_srcdir=$ac_top_builddir_sub
1877    ac_abs_top_srcdir=$ac_pwd ;;
1878  [\\/]* | ?:[\\/]* )  # Absolute name.
1879    ac_srcdir=$srcdir$ac_dir_suffix;
1880    ac_top_srcdir=$srcdir
1881    ac_abs_top_srcdir=$srcdir ;;
1882  *) # Relative name.
1883    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1884    ac_top_srcdir=$ac_top_build_prefix$srcdir
1885    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1886esac
1887ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1888
1889    cd "$ac_dir" || { ac_status=$?; continue; }
1890    # Check for guested configure.
1891    if test -f "$ac_srcdir/configure.gnu"; then
1892      echo &&
1893      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1894    elif test -f "$ac_srcdir/configure"; then
1895      echo &&
1896      $SHELL "$ac_srcdir/configure" --help=recursive
1897    else
1898      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1899    fi || ac_status=$?
1900    cd "$ac_pwd" || { ac_status=$?; break; }
1901  done
1902fi
1903
1904test -n "$ac_init_help" && exit $ac_status
1905if $ac_init_version; then
1906  cat <<\_ACEOF
1907OpenJDK configure jdk8
1908generated by GNU Autoconf 2.68
1909
1910Copyright (C) 2010 Free Software Foundation, Inc.
1911This configure script is free software; the Free Software Foundation
1912gives unlimited permission to copy, distribute and modify it.
1913_ACEOF
1914  exit
1915fi
1916
1917## ------------------------ ##
1918## Autoconf initialization. ##
1919## ------------------------ ##
1920
1921# ac_fn_c_try_compile LINENO
1922# --------------------------
1923# Try to compile conftest.$ac_ext, and return whether this succeeded.
1924ac_fn_c_try_compile ()
1925{
1926  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927  rm -f conftest.$ac_objext
1928  if { { ac_try="$ac_compile"
1929case "(($ac_try" in
1930  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1931  *) ac_try_echo=$ac_try;;
1932esac
1933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1934$as_echo "$ac_try_echo"; } >&5
1935  (eval "$ac_compile") 2>conftest.err
1936  ac_status=$?
1937  if test -s conftest.err; then
1938    grep -v '^ *+' conftest.err >conftest.er1
1939    cat conftest.er1 >&5
1940    mv -f conftest.er1 conftest.err
1941  fi
1942  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1943  test $ac_status = 0; } && {
1944	 test -z "$ac_c_werror_flag" ||
1945	 test ! -s conftest.err
1946       } && test -s conftest.$ac_objext; then :
1947  ac_retval=0
1948else
1949  $as_echo "$as_me: failed program was:" >&5
1950sed 's/^/| /' conftest.$ac_ext >&5
1951
1952	ac_retval=1
1953fi
1954  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1955  as_fn_set_status $ac_retval
1956
1957} # ac_fn_c_try_compile
1958
1959# ac_fn_cxx_try_compile LINENO
1960# ----------------------------
1961# Try to compile conftest.$ac_ext, and return whether this succeeded.
1962ac_fn_cxx_try_compile ()
1963{
1964  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1965  rm -f conftest.$ac_objext
1966  if { { ac_try="$ac_compile"
1967case "(($ac_try" in
1968  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1969  *) ac_try_echo=$ac_try;;
1970esac
1971eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1972$as_echo "$ac_try_echo"; } >&5
1973  (eval "$ac_compile") 2>conftest.err
1974  ac_status=$?
1975  if test -s conftest.err; then
1976    grep -v '^ *+' conftest.err >conftest.er1
1977    cat conftest.er1 >&5
1978    mv -f conftest.er1 conftest.err
1979  fi
1980  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1981  test $ac_status = 0; } && {
1982	 test -z "$ac_cxx_werror_flag" ||
1983	 test ! -s conftest.err
1984       } && test -s conftest.$ac_objext; then :
1985  ac_retval=0
1986else
1987  $as_echo "$as_me: failed program was:" >&5
1988sed 's/^/| /' conftest.$ac_ext >&5
1989
1990	ac_retval=1
1991fi
1992  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1993  as_fn_set_status $ac_retval
1994
1995} # ac_fn_cxx_try_compile
1996
1997# ac_fn_objc_try_compile LINENO
1998# -----------------------------
1999# Try to compile conftest.$ac_ext, and return whether this succeeded.
2000ac_fn_objc_try_compile ()
2001{
2002  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2003  rm -f conftest.$ac_objext
2004  if { { ac_try="$ac_compile"
2005case "(($ac_try" in
2006  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2007  *) ac_try_echo=$ac_try;;
2008esac
2009eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2010$as_echo "$ac_try_echo"; } >&5
2011  (eval "$ac_compile") 2>conftest.err
2012  ac_status=$?
2013  if test -s conftest.err; then
2014    grep -v '^ *+' conftest.err >conftest.er1
2015    cat conftest.er1 >&5
2016    mv -f conftest.er1 conftest.err
2017  fi
2018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2019  test $ac_status = 0; } && {
2020	 test -z "$ac_objc_werror_flag" ||
2021	 test ! -s conftest.err
2022       } && test -s conftest.$ac_objext; then :
2023  ac_retval=0
2024else
2025  $as_echo "$as_me: failed program was:" >&5
2026sed 's/^/| /' conftest.$ac_ext >&5
2027
2028	ac_retval=1
2029fi
2030  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2031  as_fn_set_status $ac_retval
2032
2033} # ac_fn_objc_try_compile
2034
2035# ac_fn_c_try_cpp LINENO
2036# ----------------------
2037# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2038ac_fn_c_try_cpp ()
2039{
2040  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2041  if { { ac_try="$ac_cpp conftest.$ac_ext"
2042case "(($ac_try" in
2043  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2044  *) ac_try_echo=$ac_try;;
2045esac
2046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2047$as_echo "$ac_try_echo"; } >&5
2048  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2049  ac_status=$?
2050  if test -s conftest.err; then
2051    grep -v '^ *+' conftest.err >conftest.er1
2052    cat conftest.er1 >&5
2053    mv -f conftest.er1 conftest.err
2054  fi
2055  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2056  test $ac_status = 0; } > conftest.i && {
2057	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2058	 test ! -s conftest.err
2059       }; then :
2060  ac_retval=0
2061else
2062  $as_echo "$as_me: failed program was:" >&5
2063sed 's/^/| /' conftest.$ac_ext >&5
2064
2065    ac_retval=1
2066fi
2067  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2068  as_fn_set_status $ac_retval
2069
2070} # ac_fn_c_try_cpp
2071
2072# ac_fn_cxx_try_cpp LINENO
2073# ------------------------
2074# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2075ac_fn_cxx_try_cpp ()
2076{
2077  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2078  if { { ac_try="$ac_cpp conftest.$ac_ext"
2079case "(($ac_try" in
2080  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2081  *) ac_try_echo=$ac_try;;
2082esac
2083eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2084$as_echo "$ac_try_echo"; } >&5
2085  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2086  ac_status=$?
2087  if test -s conftest.err; then
2088    grep -v '^ *+' conftest.err >conftest.er1
2089    cat conftest.er1 >&5
2090    mv -f conftest.er1 conftest.err
2091  fi
2092  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2093  test $ac_status = 0; } > conftest.i && {
2094	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2095	 test ! -s conftest.err
2096       }; then :
2097  ac_retval=0
2098else
2099  $as_echo "$as_me: failed program was:" >&5
2100sed 's/^/| /' conftest.$ac_ext >&5
2101
2102    ac_retval=1
2103fi
2104  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2105  as_fn_set_status $ac_retval
2106
2107} # ac_fn_cxx_try_cpp
2108
2109# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2110# ---------------------------------------------------------
2111# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2112# the include files in INCLUDES and setting the cache variable VAR
2113# accordingly.
2114ac_fn_cxx_check_header_mongrel ()
2115{
2116  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2117  if eval \${$3+:} false; then :
2118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2119$as_echo_n "checking for $2... " >&6; }
2120if eval \${$3+:} false; then :
2121  $as_echo_n "(cached) " >&6
2122fi
2123eval ac_res=\$$3
2124	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2125$as_echo "$ac_res" >&6; }
2126else
2127  # Is the header compilable?
2128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2129$as_echo_n "checking $2 usability... " >&6; }
2130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h.  */
2132$4
2133#include <$2>
2134_ACEOF
2135if ac_fn_cxx_try_compile "$LINENO"; then :
2136  ac_header_compiler=yes
2137else
2138  ac_header_compiler=no
2139fi
2140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2142$as_echo "$ac_header_compiler" >&6; }
2143
2144# Is the header present?
2145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2146$as_echo_n "checking $2 presence... " >&6; }
2147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h.  */
2149#include <$2>
2150_ACEOF
2151if ac_fn_cxx_try_cpp "$LINENO"; then :
2152  ac_header_preproc=yes
2153else
2154  ac_header_preproc=no
2155fi
2156rm -f conftest.err conftest.i conftest.$ac_ext
2157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2158$as_echo "$ac_header_preproc" >&6; }
2159
2160# So?  What about this header?
2161case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2162  yes:no: )
2163    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2164$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2165    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2166$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2167    ;;
2168  no:yes:* )
2169    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2170$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2171    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2172$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2173    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2174$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2175    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2176$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2177    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2178$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2179( $as_echo "## ----------------------------------------- ##
2180## Report this to build-dev@openjdk.java.net ##
2181## ----------------------------------------- ##"
2182     ) | sed "s/^/$as_me: WARNING:     /" >&2
2183    ;;
2184esac
2185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
2187if eval \${$3+:} false; then :
2188  $as_echo_n "(cached) " >&6
2189else
2190  eval "$3=\$ac_header_compiler"
2191fi
2192eval ac_res=\$$3
2193	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2194$as_echo "$ac_res" >&6; }
2195fi
2196  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2197
2198} # ac_fn_cxx_check_header_mongrel
2199
2200# ac_fn_cxx_try_run LINENO
2201# ------------------------
2202# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2203# that executables *can* be run.
2204ac_fn_cxx_try_run ()
2205{
2206  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2207  if { { ac_try="$ac_link"
2208case "(($ac_try" in
2209  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2210  *) ac_try_echo=$ac_try;;
2211esac
2212eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2213$as_echo "$ac_try_echo"; } >&5
2214  (eval "$ac_link") 2>&5
2215  ac_status=$?
2216  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2217  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2218  { { case "(($ac_try" in
2219  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2220  *) ac_try_echo=$ac_try;;
2221esac
2222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2223$as_echo "$ac_try_echo"; } >&5
2224  (eval "$ac_try") 2>&5
2225  ac_status=$?
2226  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2227  test $ac_status = 0; }; }; then :
2228  ac_retval=0
2229else
2230  $as_echo "$as_me: program exited with status $ac_status" >&5
2231       $as_echo "$as_me: failed program was:" >&5
2232sed 's/^/| /' conftest.$ac_ext >&5
2233
2234       ac_retval=$ac_status
2235fi
2236  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2237  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2238  as_fn_set_status $ac_retval
2239
2240} # ac_fn_cxx_try_run
2241
2242# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2243# ---------------------------------------------------------
2244# Tests whether HEADER exists and can be compiled using the include files in
2245# INCLUDES, setting the cache variable VAR accordingly.
2246ac_fn_cxx_check_header_compile ()
2247{
2248  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2250$as_echo_n "checking for $2... " >&6; }
2251if eval \${$3+:} false; then :
2252  $as_echo_n "(cached) " >&6
2253else
2254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255/* end confdefs.h.  */
2256$4
2257#include <$2>
2258_ACEOF
2259if ac_fn_cxx_try_compile "$LINENO"; then :
2260  eval "$3=yes"
2261else
2262  eval "$3=no"
2263fi
2264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2265fi
2266eval ac_res=\$$3
2267	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2268$as_echo "$ac_res" >&6; }
2269  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2270
2271} # ac_fn_cxx_check_header_compile
2272
2273# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2274# ----------------------------------------------
2275# Tries to find the compile-time value of EXPR in a program that includes
2276# INCLUDES, setting VAR accordingly. Returns whether the value could be
2277# computed
2278ac_fn_cxx_compute_int ()
2279{
2280  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281  if test "$cross_compiling" = yes; then
2282    # Depending upon the size, compute the lo and hi bounds.
2283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2284/* end confdefs.h.  */
2285$4
2286int
2287main ()
2288{
2289static int test_array [1 - 2 * !(($2) >= 0)];
2290test_array [0] = 0
2291
2292  ;
2293  return 0;
2294}
2295_ACEOF
2296if ac_fn_cxx_try_compile "$LINENO"; then :
2297  ac_lo=0 ac_mid=0
2298  while :; do
2299    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300/* end confdefs.h.  */
2301$4
2302int
2303main ()
2304{
2305static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2306test_array [0] = 0
2307
2308  ;
2309  return 0;
2310}
2311_ACEOF
2312if ac_fn_cxx_try_compile "$LINENO"; then :
2313  ac_hi=$ac_mid; break
2314else
2315  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2316			if test $ac_lo -le $ac_mid; then
2317			  ac_lo= ac_hi=
2318			  break
2319			fi
2320			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323  done
2324else
2325  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2326/* end confdefs.h.  */
2327$4
2328int
2329main ()
2330{
2331static int test_array [1 - 2 * !(($2) < 0)];
2332test_array [0] = 0
2333
2334  ;
2335  return 0;
2336}
2337_ACEOF
2338if ac_fn_cxx_try_compile "$LINENO"; then :
2339  ac_hi=-1 ac_mid=-1
2340  while :; do
2341    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2342/* end confdefs.h.  */
2343$4
2344int
2345main ()
2346{
2347static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2348test_array [0] = 0
2349
2350  ;
2351  return 0;
2352}
2353_ACEOF
2354if ac_fn_cxx_try_compile "$LINENO"; then :
2355  ac_lo=$ac_mid; break
2356else
2357  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2358			if test $ac_mid -le $ac_hi; then
2359			  ac_lo= ac_hi=
2360			  break
2361			fi
2362			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2363fi
2364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2365  done
2366else
2367  ac_lo= ac_hi=
2368fi
2369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370fi
2371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2372# Binary search between lo and hi bounds.
2373while test "x$ac_lo" != "x$ac_hi"; do
2374  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2375  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h.  */
2377$4
2378int
2379main ()
2380{
2381static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2382test_array [0] = 0
2383
2384  ;
2385  return 0;
2386}
2387_ACEOF
2388if ac_fn_cxx_try_compile "$LINENO"; then :
2389  ac_hi=$ac_mid
2390else
2391  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394done
2395case $ac_lo in #((
2396?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2397'') ac_retval=1 ;;
2398esac
2399  else
2400    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2401/* end confdefs.h.  */
2402$4
2403static long int longval () { return $2; }
2404static unsigned long int ulongval () { return $2; }
2405#include <stdio.h>
2406#include <stdlib.h>
2407int
2408main ()
2409{
2410
2411  FILE *f = fopen ("conftest.val", "w");
2412  if (! f)
2413    return 1;
2414  if (($2) < 0)
2415    {
2416      long int i = longval ();
2417      if (i != ($2))
2418	return 1;
2419      fprintf (f, "%ld", i);
2420    }
2421  else
2422    {
2423      unsigned long int i = ulongval ();
2424      if (i != ($2))
2425	return 1;
2426      fprintf (f, "%lu", i);
2427    }
2428  /* Do not output a trailing newline, as this causes \r\n confusion
2429     on some platforms.  */
2430  return ferror (f) || fclose (f) != 0;
2431
2432  ;
2433  return 0;
2434}
2435_ACEOF
2436if ac_fn_cxx_try_run "$LINENO"; then :
2437  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2438else
2439  ac_retval=1
2440fi
2441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2442  conftest.$ac_objext conftest.beam conftest.$ac_ext
2443rm -f conftest.val
2444
2445  fi
2446  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2447  as_fn_set_status $ac_retval
2448
2449} # ac_fn_cxx_compute_int
2450
2451# ac_fn_cxx_try_link LINENO
2452# -------------------------
2453# Try to link conftest.$ac_ext, and return whether this succeeded.
2454ac_fn_cxx_try_link ()
2455{
2456  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2457  rm -f conftest.$ac_objext conftest$ac_exeext
2458  if { { ac_try="$ac_link"
2459case "(($ac_try" in
2460  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2461  *) ac_try_echo=$ac_try;;
2462esac
2463eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2464$as_echo "$ac_try_echo"; } >&5
2465  (eval "$ac_link") 2>conftest.err
2466  ac_status=$?
2467  if test -s conftest.err; then
2468    grep -v '^ *+' conftest.err >conftest.er1
2469    cat conftest.er1 >&5
2470    mv -f conftest.er1 conftest.err
2471  fi
2472  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2473  test $ac_status = 0; } && {
2474	 test -z "$ac_cxx_werror_flag" ||
2475	 test ! -s conftest.err
2476       } && test -s conftest$ac_exeext && {
2477	 test "$cross_compiling" = yes ||
2478	 $as_test_x conftest$ac_exeext
2479       }; then :
2480  ac_retval=0
2481else
2482  $as_echo "$as_me: failed program was:" >&5
2483sed 's/^/| /' conftest.$ac_ext >&5
2484
2485	ac_retval=1
2486fi
2487  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2488  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2489  # interfere with the next link command; also delete a directory that is
2490  # left behind by Apple's compiler.  We do this before executing the actions.
2491  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2492  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2493  as_fn_set_status $ac_retval
2494
2495} # ac_fn_cxx_try_link
2496
2497# ac_fn_cxx_check_func LINENO FUNC VAR
2498# ------------------------------------
2499# Tests whether FUNC exists, setting the cache variable VAR accordingly
2500ac_fn_cxx_check_func ()
2501{
2502  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2504$as_echo_n "checking for $2... " >&6; }
2505if eval \${$3+:} false; then :
2506  $as_echo_n "(cached) " >&6
2507else
2508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2509/* end confdefs.h.  */
2510/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2511   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2512#define $2 innocuous_$2
2513
2514/* System header to define __stub macros and hopefully few prototypes,
2515    which can conflict with char $2 (); below.
2516    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2517    <limits.h> exists even on freestanding compilers.  */
2518
2519#ifdef __STDC__
2520# include <limits.h>
2521#else
2522# include <assert.h>
2523#endif
2524
2525#undef $2
2526
2527/* Override any GCC internal prototype to avoid an error.
2528   Use char because int might match the return type of a GCC
2529   builtin and then its argument prototype would still apply.  */
2530#ifdef __cplusplus
2531extern "C"
2532#endif
2533char $2 ();
2534/* The GNU C library defines this for functions which it implements
2535    to always fail with ENOSYS.  Some functions are actually named
2536    something starting with __ and the normal name is an alias.  */
2537#if defined __stub_$2 || defined __stub___$2
2538choke me
2539#endif
2540
2541int
2542main ()
2543{
2544return $2 ();
2545  ;
2546  return 0;
2547}
2548_ACEOF
2549if ac_fn_cxx_try_link "$LINENO"; then :
2550  eval "$3=yes"
2551else
2552  eval "$3=no"
2553fi
2554rm -f core conftest.err conftest.$ac_objext \
2555    conftest$ac_exeext conftest.$ac_ext
2556fi
2557eval ac_res=\$$3
2558	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2559$as_echo "$ac_res" >&6; }
2560  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2561
2562} # ac_fn_cxx_check_func
2563
2564# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2565# -------------------------------------------------------
2566# Tests whether HEADER exists and can be compiled using the include files in
2567# INCLUDES, setting the cache variable VAR accordingly.
2568ac_fn_c_check_header_compile ()
2569{
2570  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2572$as_echo_n "checking for $2... " >&6; }
2573if eval \${$3+:} false; then :
2574  $as_echo_n "(cached) " >&6
2575else
2576  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2577/* end confdefs.h.  */
2578$4
2579#include <$2>
2580_ACEOF
2581if ac_fn_c_try_compile "$LINENO"; then :
2582  eval "$3=yes"
2583else
2584  eval "$3=no"
2585fi
2586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2587fi
2588eval ac_res=\$$3
2589	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2590$as_echo "$ac_res" >&6; }
2591  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2592
2593} # ac_fn_c_check_header_compile
2594cat >config.log <<_ACEOF
2595This file contains any messages produced by compilers while
2596running configure, to aid debugging if configure makes a mistake.
2597
2598It was created by OpenJDK $as_me jdk8, which was
2599generated by GNU Autoconf 2.68.  Invocation command line was
2600
2601  $ $0 $@
2602
2603_ACEOF
2604exec 5>>config.log
2605{
2606cat <<_ASUNAME
2607## --------- ##
2608## Platform. ##
2609## --------- ##
2610
2611hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2612uname -m = `(uname -m) 2>/dev/null || echo unknown`
2613uname -r = `(uname -r) 2>/dev/null || echo unknown`
2614uname -s = `(uname -s) 2>/dev/null || echo unknown`
2615uname -v = `(uname -v) 2>/dev/null || echo unknown`
2616
2617/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2618/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2619
2620/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2621/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2622/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2623/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2624/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2625/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2626/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2627
2628_ASUNAME
2629
2630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2631for as_dir in $PATH
2632do
2633  IFS=$as_save_IFS
2634  test -z "$as_dir" && as_dir=.
2635    $as_echo "PATH: $as_dir"
2636  done
2637IFS=$as_save_IFS
2638
2639} >&5
2640
2641cat >&5 <<_ACEOF
2642
2643
2644## ----------- ##
2645## Core tests. ##
2646## ----------- ##
2647
2648_ACEOF
2649
2650
2651# Keep a trace of the command line.
2652# Strip out --no-create and --no-recursion so they do not pile up.
2653# Strip out --silent because we don't want to record it for future runs.
2654# Also quote any args containing shell meta-characters.
2655# Make two passes to allow for proper duplicate-argument suppression.
2656ac_configure_args=
2657ac_configure_args0=
2658ac_configure_args1=
2659ac_must_keep_next=false
2660for ac_pass in 1 2
2661do
2662  for ac_arg
2663  do
2664    case $ac_arg in
2665    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2666    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2667    | -silent | --silent | --silen | --sile | --sil)
2668      continue ;;
2669    *\'*)
2670      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2671    esac
2672    case $ac_pass in
2673    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2674    2)
2675      as_fn_append ac_configure_args1 " '$ac_arg'"
2676      if test $ac_must_keep_next = true; then
2677	ac_must_keep_next=false # Got value, back to normal.
2678      else
2679	case $ac_arg in
2680	  *=* | --config-cache | -C | -disable-* | --disable-* \
2681	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2682	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2683	  | -with-* | --with-* | -without-* | --without-* | --x)
2684	    case "$ac_configure_args0 " in
2685	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2686	    esac
2687	    ;;
2688	  -* ) ac_must_keep_next=true ;;
2689	esac
2690      fi
2691      as_fn_append ac_configure_args " '$ac_arg'"
2692      ;;
2693    esac
2694  done
2695done
2696{ ac_configure_args0=; unset ac_configure_args0;}
2697{ ac_configure_args1=; unset ac_configure_args1;}
2698
2699# When interrupted or exit'd, cleanup temporary files, and complete
2700# config.log.  We remove comments because anyway the quotes in there
2701# would cause problems or look ugly.
2702# WARNING: Use '\'' to represent an apostrophe within the trap.
2703# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2704trap 'exit_status=$?
2705  # Save into config.log some information that might help in debugging.
2706  {
2707    echo
2708
2709    $as_echo "## ---------------- ##
2710## Cache variables. ##
2711## ---------------- ##"
2712    echo
2713    # The following way of writing the cache mishandles newlines in values,
2714(
2715  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2716    eval ac_val=\$$ac_var
2717    case $ac_val in #(
2718    *${as_nl}*)
2719      case $ac_var in #(
2720      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2721$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2722      esac
2723      case $ac_var in #(
2724      _ | IFS | as_nl) ;; #(
2725      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2726      *) { eval $ac_var=; unset $ac_var;} ;;
2727      esac ;;
2728    esac
2729  done
2730  (set) 2>&1 |
2731    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2732    *${as_nl}ac_space=\ *)
2733      sed -n \
2734	"s/'\''/'\''\\\\'\'''\''/g;
2735	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2736      ;; #(
2737    *)
2738      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2739      ;;
2740    esac |
2741    sort
2742)
2743    echo
2744
2745    $as_echo "## ----------------- ##
2746## Output variables. ##
2747## ----------------- ##"
2748    echo
2749    for ac_var in $ac_subst_vars
2750    do
2751      eval ac_val=\$$ac_var
2752      case $ac_val in
2753      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2754      esac
2755      $as_echo "$ac_var='\''$ac_val'\''"
2756    done | sort
2757    echo
2758
2759    if test -n "$ac_subst_files"; then
2760      $as_echo "## ------------------- ##
2761## File substitutions. ##
2762## ------------------- ##"
2763      echo
2764      for ac_var in $ac_subst_files
2765      do
2766	eval ac_val=\$$ac_var
2767	case $ac_val in
2768	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2769	esac
2770	$as_echo "$ac_var='\''$ac_val'\''"
2771      done | sort
2772      echo
2773    fi
2774
2775    if test -s confdefs.h; then
2776      $as_echo "## ----------- ##
2777## confdefs.h. ##
2778## ----------- ##"
2779      echo
2780      cat confdefs.h
2781      echo
2782    fi
2783    test "$ac_signal" != 0 &&
2784      $as_echo "$as_me: caught signal $ac_signal"
2785    $as_echo "$as_me: exit $exit_status"
2786  } >&5
2787  rm -f core *.core core.conftest.* &&
2788    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2789    exit $exit_status
2790' 0
2791for ac_signal in 1 2 13 15; do
2792  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2793done
2794ac_signal=0
2795
2796# confdefs.h avoids OS command line length limits that DEFS can exceed.
2797rm -f -r conftest* confdefs.h
2798
2799$as_echo "/* confdefs.h */" > confdefs.h
2800
2801# Predefined preprocessor variables.
2802
2803cat >>confdefs.h <<_ACEOF
2804#define PACKAGE_NAME "$PACKAGE_NAME"
2805_ACEOF
2806
2807cat >>confdefs.h <<_ACEOF
2808#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2809_ACEOF
2810
2811cat >>confdefs.h <<_ACEOF
2812#define PACKAGE_VERSION "$PACKAGE_VERSION"
2813_ACEOF
2814
2815cat >>confdefs.h <<_ACEOF
2816#define PACKAGE_STRING "$PACKAGE_STRING"
2817_ACEOF
2818
2819cat >>confdefs.h <<_ACEOF
2820#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2821_ACEOF
2822
2823cat >>confdefs.h <<_ACEOF
2824#define PACKAGE_URL "$PACKAGE_URL"
2825_ACEOF
2826
2827
2828# Let the site file select an alternate cache file if it wants to.
2829# Prefer an explicitly selected file to automatically selected ones.
2830ac_site_file1=NONE
2831ac_site_file2=NONE
2832if test -n "$CONFIG_SITE"; then
2833  # We do not want a PATH search for config.site.
2834  case $CONFIG_SITE in #((
2835    -*)  ac_site_file1=./$CONFIG_SITE;;
2836    */*) ac_site_file1=$CONFIG_SITE;;
2837    *)   ac_site_file1=./$CONFIG_SITE;;
2838  esac
2839elif test "x$prefix" != xNONE; then
2840  ac_site_file1=$prefix/share/config.site
2841  ac_site_file2=$prefix/etc/config.site
2842else
2843  ac_site_file1=$ac_default_prefix/share/config.site
2844  ac_site_file2=$ac_default_prefix/etc/config.site
2845fi
2846for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2847do
2848  test "x$ac_site_file" = xNONE && continue
2849  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2850    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2851$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2852    sed 's/^/| /' "$ac_site_file" >&5
2853    . "$ac_site_file" \
2854      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2856as_fn_error $? "failed to load site script $ac_site_file
2857See \`config.log' for more details" "$LINENO" 5; }
2858  fi
2859done
2860
2861if test -r "$cache_file"; then
2862  # Some versions of bash will fail to source /dev/null (special files
2863  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2864  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2865    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2866$as_echo "$as_me: loading cache $cache_file" >&6;}
2867    case $cache_file in
2868      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2869      *)                      . "./$cache_file";;
2870    esac
2871  fi
2872else
2873  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2874$as_echo "$as_me: creating cache $cache_file" >&6;}
2875  >$cache_file
2876fi
2877
2878# Check that the precious variables saved in the cache have kept the same
2879# value.
2880ac_cache_corrupted=false
2881for ac_var in $ac_precious_vars; do
2882  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2883  eval ac_new_set=\$ac_env_${ac_var}_set
2884  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2885  eval ac_new_val=\$ac_env_${ac_var}_value
2886  case $ac_old_set,$ac_new_set in
2887    set,)
2888      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2889$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2890      ac_cache_corrupted=: ;;
2891    ,set)
2892      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2893$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2894      ac_cache_corrupted=: ;;
2895    ,);;
2896    *)
2897      if test "x$ac_old_val" != "x$ac_new_val"; then
2898	# differences in whitespace do not lead to failure.
2899	ac_old_val_w=`echo x $ac_old_val`
2900	ac_new_val_w=`echo x $ac_new_val`
2901	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2902	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2903$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2904	  ac_cache_corrupted=:
2905	else
2906	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2907$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2908	  eval $ac_var=\$ac_old_val
2909	fi
2910	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2911$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2912	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2913$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2914      fi;;
2915  esac
2916  # Pass precious variables to config.status.
2917  if test "$ac_new_set" = set; then
2918    case $ac_new_val in
2919    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2920    *) ac_arg=$ac_var=$ac_new_val ;;
2921    esac
2922    case " $ac_configure_args " in
2923      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2924      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2925    esac
2926  fi
2927done
2928if $ac_cache_corrupted; then
2929  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2931  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2932$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2933  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2934fi
2935## -------------------- ##
2936## Main body of script. ##
2937## -------------------- ##
2938
2939ac_ext=c
2940ac_cpp='$CPP $CPPFLAGS'
2941ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2942ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2943ac_compiler_gnu=$ac_cv_c_compiler_gnu
2944
2945
2946
2947ac_aux_dir=
2948for ac_dir in build-aux "$srcdir"/build-aux; do
2949  if test -f "$ac_dir/install-sh"; then
2950    ac_aux_dir=$ac_dir
2951    ac_install_sh="$ac_aux_dir/install-sh -c"
2952    break
2953  elif test -f "$ac_dir/install.sh"; then
2954    ac_aux_dir=$ac_dir
2955    ac_install_sh="$ac_aux_dir/install.sh -c"
2956    break
2957  elif test -f "$ac_dir/shtool"; then
2958    ac_aux_dir=$ac_dir
2959    ac_install_sh="$ac_aux_dir/shtool install -c"
2960    break
2961  fi
2962done
2963if test -z "$ac_aux_dir"; then
2964  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2965fi
2966
2967# These three variables are undocumented and unsupported,
2968# and are intended to be withdrawn in a future Autoconf release.
2969# They can cause serious problems if a builder's source tree is in a directory
2970# whose full name contains unusual characters.
2971ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2972ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2973ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2974
2975
2976# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2977
2978#
2979# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2980# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2981#
2982# This code is free software; you can redistribute it and/or modify it
2983# under the terms of the GNU General Public License version 2 only, as
2984# published by the Free Software Foundation.  Oracle designates this
2985# particular file as subject to the "Classpath" exception as provided
2986# by Oracle in the LICENSE file that accompanied this code.
2987#
2988# This code is distributed in the hope that it will be useful, but WITHOUT
2989# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2990# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2991# version 2 for more details (a copy is included in the LICENSE file that
2992# accompanied this code).
2993#
2994# You should have received a copy of the GNU General Public License version
2995# 2 along with this work; if not, write to the Free Software Foundation,
2996# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2997#
2998# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2999# or visit www.oracle.com if you need additional information or have any
3000# questions.
3001#
3002
3003#
3004# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3005#
3006# This program is free software; you can redistribute it and/or modify
3007# it under the terms of the GNU General Public License as published by
3008# the Free Software Foundation; either version 2 of the License, or
3009# (at your option) any later version.
3010#
3011# This program is distributed in the hope that it will be useful, but
3012# WITHOUT ANY WARRANTY; without even the implied warranty of
3013# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3014# General Public License for more details.
3015#
3016# You should have received a copy of the GNU General Public License
3017# along with this program; if not, write to the Free Software
3018# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3019#
3020# As a special exception to the GNU General Public License, if you
3021# distribute this file as part of a program that contains a
3022# configuration script generated by Autoconf, you may include it under
3023# the same distribution terms that you use for the rest of that program.
3024
3025# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3026# ----------------------------------
3027# PKG_PROG_PKG_CONFIG
3028
3029# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3030#
3031# Check to see whether a particular set of modules exists.  Similar
3032# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3033#
3034#
3035# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3036# this or PKG_CHECK_MODULES is called, or make sure to call
3037# PKG_CHECK_EXISTS manually
3038# --------------------------------------------------------------
3039
3040
3041
3042# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3043# ---------------------------------------------
3044# _PKG_CONFIG
3045
3046# _PKG_SHORT_ERRORS_SUPPORTED
3047# -----------------------------
3048# _PKG_SHORT_ERRORS_SUPPORTED
3049
3050
3051# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3052# [ACTION-IF-NOT-FOUND])
3053#
3054#
3055# Note that if there is a possibility the first call to
3056# PKG_CHECK_MODULES might not happen, you should be sure to include an
3057# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3058#
3059#
3060# --------------------------------------------------------------
3061# PKG_CHECK_MODULES
3062
3063
3064# Include these first...
3065#
3066# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3067# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3068#
3069# This code is free software; you can redistribute it and/or modify it
3070# under the terms of the GNU General Public License version 2 only, as
3071# published by the Free Software Foundation.  Oracle designates this
3072# particular file as subject to the "Classpath" exception as provided
3073# by Oracle in the LICENSE file that accompanied this code.
3074#
3075# This code is distributed in the hope that it will be useful, but WITHOUT
3076# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3077# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3078# version 2 for more details (a copy is included in the LICENSE file that
3079# accompanied this code).
3080#
3081# You should have received a copy of the GNU General Public License version
3082# 2 along with this work; if not, write to the Free Software Foundation,
3083# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3084#
3085# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3086# or visit www.oracle.com if you need additional information or have any
3087# questions.
3088#
3089
3090# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3091# If so, then append $1 to $2\
3092# Also set JVM_ARG_OK to true/false depending on outcome.
3093
3094
3095# Appends a string to a path variable, only adding the : when needed.
3096
3097
3098# This will make sure the given variable points to a full and proper
3099# path. This means:
3100# 1) There will be no spaces in the path. On posix platforms,
3101#    spaces in the path will result in an error. On Windows,
3102#    the path will be rewritten using short-style to be space-free.
3103# 2) The path will be absolute, and it will be in unix-style (on
3104#     cygwin).
3105# $1: The name of the variable to fix
3106
3107
3108# This will make sure the given variable points to a executable
3109# with a full and proper path. This means:
3110# 1) There will be no spaces in the path. On posix platforms,
3111#    spaces in the path will result in an error. On Windows,
3112#    the path will be rewritten using short-style to be space-free.
3113# 2) The path will be absolute, and it will be in unix-style (on
3114#     cygwin).
3115# Any arguments given to the executable is preserved.
3116# If the input variable does not have a directory specification, then
3117# it need to be in the PATH.
3118# $1: The name of the variable to fix
3119
3120
3121
3122
3123
3124
3125# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3126# $1: variable to check
3127# $2: executable name to print in warning (optional)
3128
3129
3130# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3131# Arguments as AC_PATH_PROG:
3132# $1: variable to set
3133# $2: executable name to look for
3134
3135
3136# Setup the most fundamental tools that relies on not much else to set up,
3137# but is used by much of the early bootstrap code.
3138
3139
3140# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3141
3142
3143
3144
3145
3146
3147
3148#%%% Simple tools %%%
3149
3150# Check if we have found a usable version of make
3151# $1: the path to a potential make binary (or empty)
3152# $2: the description on how we found this
3153
3154
3155# Goes looking for a usable version of GNU make.
3156
3157
3158
3159
3160
3161
3162# Check if build directory is on local disk. If not possible to determine,
3163# we prefer to claim it's local.
3164# Argument 1: directory to test
3165# Argument 2: what to do if it is on local disk
3166# Argument 3: what to do otherwise (remote disk or failure)
3167
3168
3169# Check that source files have basic read permissions set. This might
3170# not be the case in cygwin in certain conditions.
3171
3172
3173
3174
3175#
3176# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3177# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3178#
3179# This code is free software; you can redistribute it and/or modify it
3180# under the terms of the GNU General Public License version 2 only, as
3181# published by the Free Software Foundation.  Oracle designates this
3182# particular file as subject to the "Classpath" exception as provided
3183# by Oracle in the LICENSE file that accompanied this code.
3184#
3185# This code is distributed in the hope that it will be useful, but WITHOUT
3186# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3187# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3188# version 2 for more details (a copy is included in the LICENSE file that
3189# accompanied this code).
3190#
3191# You should have received a copy of the GNU General Public License version
3192# 2 along with this work; if not, write to the Free Software Foundation,
3193# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3194#
3195# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3196# or visit www.oracle.com if you need additional information or have any
3197# questions.
3198#
3199
3200
3201
3202
3203
3204# Helper function which possibly converts a path using DOS-style short mode.
3205# If so, the updated path is stored in $new_path.
3206# $1: The path to check
3207
3208
3209# Helper function which possibly converts a path using DOS-style short mode.
3210# If so, the updated path is stored in $new_path.
3211# $1: The path to check
3212
3213
3214# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3215# and could probably be heavily simplified. However, all changes in this
3216# area tend to need lot of testing in different scenarios, and in lack of
3217# proper unit testing, cleaning this up has not been deemed worth the effort
3218# at the moment.
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3229
3230
3231
3232
3233#
3234# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3235# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3236#
3237# This code is free software; you can redistribute it and/or modify it
3238# under the terms of the GNU General Public License version 2 only, as
3239# published by the Free Software Foundation.  Oracle designates this
3240# particular file as subject to the "Classpath" exception as provided
3241# by Oracle in the LICENSE file that accompanied this code.
3242#
3243# This code is distributed in the hope that it will be useful, but WITHOUT
3244# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3245# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3246# version 2 for more details (a copy is included in the LICENSE file that
3247# accompanied this code).
3248#
3249# You should have received a copy of the GNU General Public License version
3250# 2 along with this work; if not, write to the Free Software Foundation,
3251# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3252#
3253# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3254# or visit www.oracle.com if you need additional information or have any
3255# questions.
3256#
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268# ... then the rest
3269#
3270# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3271# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3272#
3273# This code is free software; you can redistribute it and/or modify it
3274# under the terms of the GNU General Public License version 2 only, as
3275# published by the Free Software Foundation.  Oracle designates this
3276# particular file as subject to the "Classpath" exception as provided
3277# by Oracle in the LICENSE file that accompanied this code.
3278#
3279# This code is distributed in the hope that it will be useful, but WITHOUT
3280# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3281# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3282# version 2 for more details (a copy is included in the LICENSE file that
3283# accompanied this code).
3284#
3285# You should have received a copy of the GNU General Public License version
3286# 2 along with this work; if not, write to the Free Software Foundation,
3287# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3288#
3289# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3290# or visit www.oracle.com if you need additional information or have any
3291# questions.
3292#
3293
3294# Execute the check given as argument, and verify the result
3295# If the Boot JDK was previously found, do nothing
3296# $1 A command line (typically autoconf macro) to execute
3297
3298
3299# Test: Is bootjdk explicitely set by command line arguments?
3300
3301
3302# Test: Is bootjdk available from builddeps?
3303
3304
3305# Test: Is $JAVA_HOME set?
3306
3307
3308# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3309
3310
3311# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3312
3313
3314# Look for a jdk in the given path. If there are multiple, try to select the newest.
3315# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3316# $1 = Path to directory containing jdk installations.
3317# $2 = String to append to the found JDK directory to get the proper JDK home
3318
3319
3320# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3321# environmental variable as base for where to look.
3322# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3323
3324
3325# Test: Is there a JDK installed in default, well-known locations?
3326
3327
3328# Check that a command-line tool in the Boot JDK is correct
3329# $1 = name of variable to assign
3330# $2 = name of binary
3331
3332
3333###############################################################################
3334#
3335# We need a Boot JDK to bootstrap the build.
3336#
3337
3338
3339
3340
3341
3342#
3343# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3344# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3345#
3346# This code is free software; you can redistribute it and/or modify it
3347# under the terms of the GNU General Public License version 2 only, as
3348# published by the Free Software Foundation.  Oracle designates this
3349# particular file as subject to the "Classpath" exception as provided
3350# by Oracle in the LICENSE file that accompanied this code.
3351#
3352# This code is distributed in the hope that it will be useful, but WITHOUT
3353# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3354# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3355# version 2 for more details (a copy is included in the LICENSE file that
3356# accompanied this code).
3357#
3358# You should have received a copy of the GNU General Public License version
3359# 2 along with this work; if not, write to the Free Software Foundation,
3360# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3361#
3362# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3363# or visit www.oracle.com if you need additional information or have any
3364# questions.
3365#
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386#
3387# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3388# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3389#
3390# This code is free software; you can redistribute it and/or modify it
3391# under the terms of the GNU General Public License version 2 only, as
3392# published by the Free Software Foundation.  Oracle designates this
3393# particular file as subject to the "Classpath" exception as provided
3394# by Oracle in the LICENSE file that accompanied this code.
3395#
3396# This code is distributed in the hope that it will be useful, but WITHOUT
3397# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3398# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3399# version 2 for more details (a copy is included in the LICENSE file that
3400# accompanied this code).
3401#
3402# You should have received a copy of the GNU General Public License version
3403# 2 along with this work; if not, write to the Free Software Foundation,
3404# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3405#
3406# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3407# or visit www.oracle.com if you need additional information or have any
3408# questions.
3409#
3410
3411
3412
3413
3414
3415cygwin_help() {
3416    case $1 in
3417    unzip)
3418        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3419    zip)
3420        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3421    make)
3422        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3423    * )
3424       break ;;
3425    esac
3426}
3427
3428apt_help() {
3429    case $1 in
3430    devkit)
3431        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3432    openjdk)
3433        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3434    alsa)
3435        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3436    cups)
3437        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3438    freetype2)
3439        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3440    pulse)
3441        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3442    x11)
3443        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3444    ccache)
3445        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3446    * )
3447       break ;;
3448    esac
3449}
3450
3451yum_help() {
3452    case $1 in
3453    devkit)
3454        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3455    openjdk)
3456        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3457    alsa)
3458        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3459    cups)
3460        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3461    freetype2)
3462        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3463    pulse)
3464        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3465    x11)
3466        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3467    ccache)
3468        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3469    * )
3470       break ;;
3471    esac
3472}
3473
3474port_help() {
3475    PKGHANDLER_COMMAND=""
3476}
3477
3478pkgutil_help() {
3479    PKGHANDLER_COMMAND=""
3480}
3481
3482pkgadd_help() {
3483    PKGHANDLER_COMMAND=""
3484}
3485
3486
3487
3488#
3489# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3490# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3491#
3492# This code is free software; you can redistribute it and/or modify it
3493# under the terms of the GNU General Public License version 2 only, as
3494# published by the Free Software Foundation.  Oracle designates this
3495# particular file as subject to the "Classpath" exception as provided
3496# by Oracle in the LICENSE file that accompanied this code.
3497#
3498# This code is distributed in the hope that it will be useful, but WITHOUT
3499# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3500# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3501# version 2 for more details (a copy is included in the LICENSE file that
3502# accompanied this code).
3503#
3504# You should have received a copy of the GNU General Public License version
3505# 2 along with this work; if not, write to the Free Software Foundation,
3506# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3507#
3508# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3509# or visit www.oracle.com if you need additional information or have any
3510# questions.
3511#
3512
3513
3514
3515
3516
3517
3518
3519
3520###############################################################################
3521#
3522# Should we build only OpenJDK even if closed sources are present?
3523#
3524
3525
3526
3527
3528###############################################################################
3529#
3530# Setup version numbers
3531#
3532
3533
3534
3535
3536
3537
3538# Support for customization of the build process. Some build files
3539# will include counterparts from this location, if they exist. This allows
3540# for a degree of customization of the build targets and the rules/recipes
3541# to create them
3542
3543# Check whether --with-custom-make-dir was given.
3544if test "${with_custom_make_dir+set}" = set; then :
3545  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3546fi
3547
3548
3549
3550#
3551# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3553#
3554# This code is free software; you can redistribute it and/or modify it
3555# under the terms of the GNU General Public License version 2 only, as
3556# published by the Free Software Foundation.  Oracle designates this
3557# particular file as subject to the "Classpath" exception as provided
3558# by Oracle in the LICENSE file that accompanied this code.
3559#
3560# This code is distributed in the hope that it will be useful, but WITHOUT
3561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3563# version 2 for more details (a copy is included in the LICENSE file that
3564# accompanied this code).
3565#
3566# You should have received a copy of the GNU General Public License version
3567# 2 along with this work; if not, write to the Free Software Foundation,
3568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3569#
3570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3571# or visit www.oracle.com if you need additional information or have any
3572# questions.
3573#
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589#
3590# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3591# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3592#
3593# This code is free software; you can redistribute it and/or modify it
3594# under the terms of the GNU General Public License version 2 only, as
3595# published by the Free Software Foundation.  Oracle designates this
3596# particular file as subject to the "Classpath" exception as provided
3597# by Oracle in the LICENSE file that accompanied this code.
3598#
3599# This code is distributed in the hope that it will be useful, but WITHOUT
3600# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3601# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3602# version 2 for more details (a copy is included in the LICENSE file that
3603# accompanied this code).
3604#
3605# You should have received a copy of the GNU General Public License version
3606# 2 along with this work; if not, write to the Free Software Foundation,
3607# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3608#
3609# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3610# or visit www.oracle.com if you need additional information or have any
3611# questions.
3612#
3613
3614# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3615# Converts autoconf style CPU name to OpenJDK style, into
3616# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3617
3618
3619# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3620# Converts autoconf style OS name to OpenJDK style, into
3621# VAR_OS and VAR_OS_API.
3622
3623
3624# Expects $host_os $host_cpu $build_os and $build_cpu
3625# and $with_target_bits to have been setup!
3626#
3627# Translate the standard triplet(quadruplet) definition
3628# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3629# OPENJDK_BUILD_OS, etc.
3630
3631
3632# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3633# accordingly. Must be done after setting up build and target system, but before
3634# doing anything else with these values.
3635
3636
3637    # Setup the legacy variables, for controlling the old makefiles.
3638    #
3639
3640
3641
3642
3643#%%% Build and target systems %%%
3644
3645
3646
3647
3648# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3649# Add -mX to various FLAGS variables.
3650
3651
3652
3653
3654
3655
3656#
3657# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3658# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3659#
3660# This code is free software; you can redistribute it and/or modify it
3661# under the terms of the GNU General Public License version 2 only, as
3662# published by the Free Software Foundation.  Oracle designates this
3663# particular file as subject to the "Classpath" exception as provided
3664# by Oracle in the LICENSE file that accompanied this code.
3665#
3666# This code is distributed in the hope that it will be useful, but WITHOUT
3667# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3668# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3669# version 2 for more details (a copy is included in the LICENSE file that
3670# accompanied this code).
3671#
3672# You should have received a copy of the GNU General Public License version
3673# 2 along with this work; if not, write to the Free Software Foundation,
3674# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3675#
3676# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3677# or visit www.oracle.com if you need additional information or have any
3678# questions.
3679#
3680
3681
3682
3683
3684
3685
3686
3687
3688#
3689# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3690# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3691#
3692# This code is free software; you can redistribute it and/or modify it
3693# under the terms of the GNU General Public License version 2 only, as
3694# published by the Free Software Foundation.  Oracle designates this
3695# particular file as subject to the "Classpath" exception as provided
3696# by Oracle in the LICENSE file that accompanied this code.
3697#
3698# This code is distributed in the hope that it will be useful, but WITHOUT
3699# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3700# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3701# version 2 for more details (a copy is included in the LICENSE file that
3702# accompanied this code).
3703#
3704# You should have received a copy of the GNU General Public License version
3705# 2 along with this work; if not, write to the Free Software Foundation,
3706# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3707#
3708# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3709# or visit www.oracle.com if you need additional information or have any
3710# questions.
3711#
3712
3713# $1 = compiler to test (CC or CXX)
3714# $2 = human readable name of compiler (C or C++)
3715
3716
3717
3718
3719
3720# $1 = compiler to test (CC or CXX)
3721# $2 = human readable name of compiler (C or C++)
3722# $3 = list of compiler names to search for
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3737#                                   [RUN-IF-FALSE])
3738# ------------------------------------------------------------
3739# Check that the c and c++ compilers support an argument
3740
3741
3742
3743
3744# Setup the JTREG paths
3745
3746
3747#
3748# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3750#
3751# This code is free software; you can redistribute it and/or modify it
3752# under the terms of the GNU General Public License version 2 only, as
3753# published by the Free Software Foundation.  Oracle designates this
3754# particular file as subject to the "Classpath" exception as provided
3755# by Oracle in the LICENSE file that accompanied this code.
3756#
3757# This code is distributed in the hope that it will be useful, but WITHOUT
3758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3760# version 2 for more details (a copy is included in the LICENSE file that
3761# accompanied this code).
3762#
3763# You should have received a copy of the GNU General Public License version
3764# 2 along with this work; if not, write to the Free Software Foundation,
3765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3766#
3767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3768# or visit www.oracle.com if you need additional information or have any
3769# questions.
3770#
3771
3772
3773
3774
3775
3776
3777
3778# Check if the VS env variables were setup prior to running configure.
3779# If not, then find vcvarsall.bat and run it automatically, and integrate
3780# the set env variables into the spec file.
3781
3782
3783
3784# Setup the DXSDK paths
3785
3786
3787
3788
3789
3790
3791# This line needs to be here, verbatim, after all includes and the dummy hook
3792# definitions. It is replaced with custom functionality when building
3793# custom sources.
3794#CUSTOM_AUTOCONF_INCLUDE
3795
3796# Do not change or remove the following line, it is needed for consistency checks:
3797DATE_WHEN_GENERATED=1373384053
3798
3799###############################################################################
3800#
3801# Initialization / Boot-strapping
3802#
3803# The bootstrapping process needs to solve the "chicken or the egg" problem,
3804# thus it jumps back and forth, each time gaining something needed later on.
3805#
3806###############################################################################
3807
3808# Basic initialization that must happen first of all
3809
3810# Save the original command line. This is passed to us by the wrapper configure script.
3811
3812DATE_WHEN_CONFIGURED=`LANG=C date`
3813
3814{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3815$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3816{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3817$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3818
3819
3820
3821# Start with tools that do not need have cross compilation support
3822# and can be expected to be found in the default PATH. These tools are
3823# used by configure. Nor are these tools expected to be found in the
3824# devkit from the builddeps server either, since they are
3825# needed to download the devkit.
3826
3827# First are all the simple required tools.
3828
3829    for ac_prog in basename
3830do
3831  # Extract the first word of "$ac_prog", so it can be a program name with args.
3832set dummy $ac_prog; ac_word=$2
3833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3834$as_echo_n "checking for $ac_word... " >&6; }
3835if ${ac_cv_path_BASENAME+:} false; then :
3836  $as_echo_n "(cached) " >&6
3837else
3838  case $BASENAME in
3839  [\\/]* | ?:[\\/]*)
3840  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3841  ;;
3842  *)
3843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3844for as_dir in $PATH
3845do
3846  IFS=$as_save_IFS
3847  test -z "$as_dir" && as_dir=.
3848    for ac_exec_ext in '' $ac_executable_extensions; do
3849  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3850    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3852    break 2
3853  fi
3854done
3855  done
3856IFS=$as_save_IFS
3857
3858  ;;
3859esac
3860fi
3861BASENAME=$ac_cv_path_BASENAME
3862if test -n "$BASENAME"; then
3863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3864$as_echo "$BASENAME" >&6; }
3865else
3866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3867$as_echo "no" >&6; }
3868fi
3869
3870
3871  test -n "$BASENAME" && break
3872done
3873
3874
3875    if test "x$BASENAME" = x; then
3876        if test "xbasename" = x; then
3877          PROG_NAME=basename
3878        else
3879          PROG_NAME=basename
3880        fi
3881        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3882$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3883        as_fn_error $? "Cannot continue" "$LINENO" 5
3884    fi
3885
3886
3887
3888    for ac_prog in bash
3889do
3890  # Extract the first word of "$ac_prog", so it can be a program name with args.
3891set dummy $ac_prog; ac_word=$2
3892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3893$as_echo_n "checking for $ac_word... " >&6; }
3894if ${ac_cv_path_BASH+:} false; then :
3895  $as_echo_n "(cached) " >&6
3896else
3897  case $BASH in
3898  [\\/]* | ?:[\\/]*)
3899  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3900  ;;
3901  *)
3902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3903for as_dir in $PATH
3904do
3905  IFS=$as_save_IFS
3906  test -z "$as_dir" && as_dir=.
3907    for ac_exec_ext in '' $ac_executable_extensions; do
3908  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3909    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3911    break 2
3912  fi
3913done
3914  done
3915IFS=$as_save_IFS
3916
3917  ;;
3918esac
3919fi
3920BASH=$ac_cv_path_BASH
3921if test -n "$BASH"; then
3922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3923$as_echo "$BASH" >&6; }
3924else
3925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3926$as_echo "no" >&6; }
3927fi
3928
3929
3930  test -n "$BASH" && break
3931done
3932
3933
3934    if test "x$BASH" = x; then
3935        if test "xbash" = x; then
3936          PROG_NAME=bash
3937        else
3938          PROG_NAME=bash
3939        fi
3940        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3941$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3942        as_fn_error $? "Cannot continue" "$LINENO" 5
3943    fi
3944
3945
3946
3947    for ac_prog in cat
3948do
3949  # Extract the first word of "$ac_prog", so it can be a program name with args.
3950set dummy $ac_prog; ac_word=$2
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3952$as_echo_n "checking for $ac_word... " >&6; }
3953if ${ac_cv_path_CAT+:} false; then :
3954  $as_echo_n "(cached) " >&6
3955else
3956  case $CAT in
3957  [\\/]* | ?:[\\/]*)
3958  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3959  ;;
3960  *)
3961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3962for as_dir in $PATH
3963do
3964  IFS=$as_save_IFS
3965  test -z "$as_dir" && as_dir=.
3966    for ac_exec_ext in '' $ac_executable_extensions; do
3967  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3968    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3970    break 2
3971  fi
3972done
3973  done
3974IFS=$as_save_IFS
3975
3976  ;;
3977esac
3978fi
3979CAT=$ac_cv_path_CAT
3980if test -n "$CAT"; then
3981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3982$as_echo "$CAT" >&6; }
3983else
3984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3985$as_echo "no" >&6; }
3986fi
3987
3988
3989  test -n "$CAT" && break
3990done
3991
3992
3993    if test "x$CAT" = x; then
3994        if test "xcat" = x; then
3995          PROG_NAME=cat
3996        else
3997          PROG_NAME=cat
3998        fi
3999        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4000$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4001        as_fn_error $? "Cannot continue" "$LINENO" 5
4002    fi
4003
4004
4005
4006    for ac_prog in chmod
4007do
4008  # Extract the first word of "$ac_prog", so it can be a program name with args.
4009set dummy $ac_prog; ac_word=$2
4010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4011$as_echo_n "checking for $ac_word... " >&6; }
4012if ${ac_cv_path_CHMOD+:} false; then :
4013  $as_echo_n "(cached) " >&6
4014else
4015  case $CHMOD in
4016  [\\/]* | ?:[\\/]*)
4017  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4018  ;;
4019  *)
4020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4021for as_dir in $PATH
4022do
4023  IFS=$as_save_IFS
4024  test -z "$as_dir" && as_dir=.
4025    for ac_exec_ext in '' $ac_executable_extensions; do
4026  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4027    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4029    break 2
4030  fi
4031done
4032  done
4033IFS=$as_save_IFS
4034
4035  ;;
4036esac
4037fi
4038CHMOD=$ac_cv_path_CHMOD
4039if test -n "$CHMOD"; then
4040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4041$as_echo "$CHMOD" >&6; }
4042else
4043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4044$as_echo "no" >&6; }
4045fi
4046
4047
4048  test -n "$CHMOD" && break
4049done
4050
4051
4052    if test "x$CHMOD" = x; then
4053        if test "xchmod" = x; then
4054          PROG_NAME=chmod
4055        else
4056          PROG_NAME=chmod
4057        fi
4058        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4059$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4060        as_fn_error $? "Cannot continue" "$LINENO" 5
4061    fi
4062
4063
4064
4065    for ac_prog in cmp
4066do
4067  # Extract the first word of "$ac_prog", so it can be a program name with args.
4068set dummy $ac_prog; ac_word=$2
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4070$as_echo_n "checking for $ac_word... " >&6; }
4071if ${ac_cv_path_CMP+:} false; then :
4072  $as_echo_n "(cached) " >&6
4073else
4074  case $CMP in
4075  [\\/]* | ?:[\\/]*)
4076  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4077  ;;
4078  *)
4079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4080for as_dir in $PATH
4081do
4082  IFS=$as_save_IFS
4083  test -z "$as_dir" && as_dir=.
4084    for ac_exec_ext in '' $ac_executable_extensions; do
4085  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4086    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4088    break 2
4089  fi
4090done
4091  done
4092IFS=$as_save_IFS
4093
4094  ;;
4095esac
4096fi
4097CMP=$ac_cv_path_CMP
4098if test -n "$CMP"; then
4099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4100$as_echo "$CMP" >&6; }
4101else
4102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4103$as_echo "no" >&6; }
4104fi
4105
4106
4107  test -n "$CMP" && break
4108done
4109
4110
4111    if test "x$CMP" = x; then
4112        if test "xcmp" = x; then
4113          PROG_NAME=cmp
4114        else
4115          PROG_NAME=cmp
4116        fi
4117        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4118$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4119        as_fn_error $? "Cannot continue" "$LINENO" 5
4120    fi
4121
4122
4123
4124    for ac_prog in comm
4125do
4126  # Extract the first word of "$ac_prog", so it can be a program name with args.
4127set dummy $ac_prog; ac_word=$2
4128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4129$as_echo_n "checking for $ac_word... " >&6; }
4130if ${ac_cv_path_COMM+:} false; then :
4131  $as_echo_n "(cached) " >&6
4132else
4133  case $COMM in
4134  [\\/]* | ?:[\\/]*)
4135  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4136  ;;
4137  *)
4138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4139for as_dir in $PATH
4140do
4141  IFS=$as_save_IFS
4142  test -z "$as_dir" && as_dir=.
4143    for ac_exec_ext in '' $ac_executable_extensions; do
4144  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4145    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4147    break 2
4148  fi
4149done
4150  done
4151IFS=$as_save_IFS
4152
4153  ;;
4154esac
4155fi
4156COMM=$ac_cv_path_COMM
4157if test -n "$COMM"; then
4158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4159$as_echo "$COMM" >&6; }
4160else
4161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4162$as_echo "no" >&6; }
4163fi
4164
4165
4166  test -n "$COMM" && break
4167done
4168
4169
4170    if test "x$COMM" = x; then
4171        if test "xcomm" = x; then
4172          PROG_NAME=comm
4173        else
4174          PROG_NAME=comm
4175        fi
4176        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4177$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4178        as_fn_error $? "Cannot continue" "$LINENO" 5
4179    fi
4180
4181
4182
4183    for ac_prog in cp
4184do
4185  # Extract the first word of "$ac_prog", so it can be a program name with args.
4186set dummy $ac_prog; ac_word=$2
4187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4188$as_echo_n "checking for $ac_word... " >&6; }
4189if ${ac_cv_path_CP+:} false; then :
4190  $as_echo_n "(cached) " >&6
4191else
4192  case $CP in
4193  [\\/]* | ?:[\\/]*)
4194  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4195  ;;
4196  *)
4197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4198for as_dir in $PATH
4199do
4200  IFS=$as_save_IFS
4201  test -z "$as_dir" && as_dir=.
4202    for ac_exec_ext in '' $ac_executable_extensions; do
4203  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4204    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4206    break 2
4207  fi
4208done
4209  done
4210IFS=$as_save_IFS
4211
4212  ;;
4213esac
4214fi
4215CP=$ac_cv_path_CP
4216if test -n "$CP"; then
4217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4218$as_echo "$CP" >&6; }
4219else
4220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4221$as_echo "no" >&6; }
4222fi
4223
4224
4225  test -n "$CP" && break
4226done
4227
4228
4229    if test "x$CP" = x; then
4230        if test "xcp" = x; then
4231          PROG_NAME=cp
4232        else
4233          PROG_NAME=cp
4234        fi
4235        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4236$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4237        as_fn_error $? "Cannot continue" "$LINENO" 5
4238    fi
4239
4240
4241
4242    for ac_prog in cpio
4243do
4244  # Extract the first word of "$ac_prog", so it can be a program name with args.
4245set dummy $ac_prog; ac_word=$2
4246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4247$as_echo_n "checking for $ac_word... " >&6; }
4248if ${ac_cv_path_CPIO+:} false; then :
4249  $as_echo_n "(cached) " >&6
4250else
4251  case $CPIO in
4252  [\\/]* | ?:[\\/]*)
4253  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4254  ;;
4255  *)
4256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4257for as_dir in $PATH
4258do
4259  IFS=$as_save_IFS
4260  test -z "$as_dir" && as_dir=.
4261    for ac_exec_ext in '' $ac_executable_extensions; do
4262  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4263    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4265    break 2
4266  fi
4267done
4268  done
4269IFS=$as_save_IFS
4270
4271  ;;
4272esac
4273fi
4274CPIO=$ac_cv_path_CPIO
4275if test -n "$CPIO"; then
4276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4277$as_echo "$CPIO" >&6; }
4278else
4279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4280$as_echo "no" >&6; }
4281fi
4282
4283
4284  test -n "$CPIO" && break
4285done
4286
4287
4288    if test "x$CPIO" = x; then
4289        if test "xcpio" = x; then
4290          PROG_NAME=cpio
4291        else
4292          PROG_NAME=cpio
4293        fi
4294        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4295$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4296        as_fn_error $? "Cannot continue" "$LINENO" 5
4297    fi
4298
4299
4300
4301    for ac_prog in cut
4302do
4303  # Extract the first word of "$ac_prog", so it can be a program name with args.
4304set dummy $ac_prog; ac_word=$2
4305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4306$as_echo_n "checking for $ac_word... " >&6; }
4307if ${ac_cv_path_CUT+:} false; then :
4308  $as_echo_n "(cached) " >&6
4309else
4310  case $CUT in
4311  [\\/]* | ?:[\\/]*)
4312  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4313  ;;
4314  *)
4315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4316for as_dir in $PATH
4317do
4318  IFS=$as_save_IFS
4319  test -z "$as_dir" && as_dir=.
4320    for ac_exec_ext in '' $ac_executable_extensions; do
4321  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4322    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4324    break 2
4325  fi
4326done
4327  done
4328IFS=$as_save_IFS
4329
4330  ;;
4331esac
4332fi
4333CUT=$ac_cv_path_CUT
4334if test -n "$CUT"; then
4335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4336$as_echo "$CUT" >&6; }
4337else
4338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4339$as_echo "no" >&6; }
4340fi
4341
4342
4343  test -n "$CUT" && break
4344done
4345
4346
4347    if test "x$CUT" = x; then
4348        if test "xcut" = x; then
4349          PROG_NAME=cut
4350        else
4351          PROG_NAME=cut
4352        fi
4353        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4354$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4355        as_fn_error $? "Cannot continue" "$LINENO" 5
4356    fi
4357
4358
4359
4360    for ac_prog in date
4361do
4362  # Extract the first word of "$ac_prog", so it can be a program name with args.
4363set dummy $ac_prog; ac_word=$2
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4365$as_echo_n "checking for $ac_word... " >&6; }
4366if ${ac_cv_path_DATE+:} false; then :
4367  $as_echo_n "(cached) " >&6
4368else
4369  case $DATE in
4370  [\\/]* | ?:[\\/]*)
4371  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4372  ;;
4373  *)
4374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4375for as_dir in $PATH
4376do
4377  IFS=$as_save_IFS
4378  test -z "$as_dir" && as_dir=.
4379    for ac_exec_ext in '' $ac_executable_extensions; do
4380  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4381    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4383    break 2
4384  fi
4385done
4386  done
4387IFS=$as_save_IFS
4388
4389  ;;
4390esac
4391fi
4392DATE=$ac_cv_path_DATE
4393if test -n "$DATE"; then
4394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4395$as_echo "$DATE" >&6; }
4396else
4397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4398$as_echo "no" >&6; }
4399fi
4400
4401
4402  test -n "$DATE" && break
4403done
4404
4405
4406    if test "x$DATE" = x; then
4407        if test "xdate" = x; then
4408          PROG_NAME=date
4409        else
4410          PROG_NAME=date
4411        fi
4412        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4413$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4414        as_fn_error $? "Cannot continue" "$LINENO" 5
4415    fi
4416
4417
4418
4419    for ac_prog in gdiff diff
4420do
4421  # Extract the first word of "$ac_prog", so it can be a program name with args.
4422set dummy $ac_prog; ac_word=$2
4423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4424$as_echo_n "checking for $ac_word... " >&6; }
4425if ${ac_cv_path_DIFF+:} false; then :
4426  $as_echo_n "(cached) " >&6
4427else
4428  case $DIFF in
4429  [\\/]* | ?:[\\/]*)
4430  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4431  ;;
4432  *)
4433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4434for as_dir in $PATH
4435do
4436  IFS=$as_save_IFS
4437  test -z "$as_dir" && as_dir=.
4438    for ac_exec_ext in '' $ac_executable_extensions; do
4439  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4440    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4442    break 2
4443  fi
4444done
4445  done
4446IFS=$as_save_IFS
4447
4448  ;;
4449esac
4450fi
4451DIFF=$ac_cv_path_DIFF
4452if test -n "$DIFF"; then
4453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4454$as_echo "$DIFF" >&6; }
4455else
4456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4457$as_echo "no" >&6; }
4458fi
4459
4460
4461  test -n "$DIFF" && break
4462done
4463
4464
4465    if test "x$DIFF" = x; then
4466        if test "xgdiff diff" = x; then
4467          PROG_NAME=diff
4468        else
4469          PROG_NAME=gdiff diff
4470        fi
4471        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4472$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4473        as_fn_error $? "Cannot continue" "$LINENO" 5
4474    fi
4475
4476
4477
4478    for ac_prog in dirname
4479do
4480  # Extract the first word of "$ac_prog", so it can be a program name with args.
4481set dummy $ac_prog; ac_word=$2
4482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4483$as_echo_n "checking for $ac_word... " >&6; }
4484if ${ac_cv_path_DIRNAME+:} false; then :
4485  $as_echo_n "(cached) " >&6
4486else
4487  case $DIRNAME in
4488  [\\/]* | ?:[\\/]*)
4489  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4490  ;;
4491  *)
4492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4493for as_dir in $PATH
4494do
4495  IFS=$as_save_IFS
4496  test -z "$as_dir" && as_dir=.
4497    for ac_exec_ext in '' $ac_executable_extensions; do
4498  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4499    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4501    break 2
4502  fi
4503done
4504  done
4505IFS=$as_save_IFS
4506
4507  ;;
4508esac
4509fi
4510DIRNAME=$ac_cv_path_DIRNAME
4511if test -n "$DIRNAME"; then
4512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4513$as_echo "$DIRNAME" >&6; }
4514else
4515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4516$as_echo "no" >&6; }
4517fi
4518
4519
4520  test -n "$DIRNAME" && break
4521done
4522
4523
4524    if test "x$DIRNAME" = x; then
4525        if test "xdirname" = x; then
4526          PROG_NAME=dirname
4527        else
4528          PROG_NAME=dirname
4529        fi
4530        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4531$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4532        as_fn_error $? "Cannot continue" "$LINENO" 5
4533    fi
4534
4535
4536
4537    for ac_prog in echo
4538do
4539  # Extract the first word of "$ac_prog", so it can be a program name with args.
4540set dummy $ac_prog; ac_word=$2
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4542$as_echo_n "checking for $ac_word... " >&6; }
4543if ${ac_cv_path_ECHO+:} false; then :
4544  $as_echo_n "(cached) " >&6
4545else
4546  case $ECHO in
4547  [\\/]* | ?:[\\/]*)
4548  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4549  ;;
4550  *)
4551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4552for as_dir in $PATH
4553do
4554  IFS=$as_save_IFS
4555  test -z "$as_dir" && as_dir=.
4556    for ac_exec_ext in '' $ac_executable_extensions; do
4557  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4558    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4560    break 2
4561  fi
4562done
4563  done
4564IFS=$as_save_IFS
4565
4566  ;;
4567esac
4568fi
4569ECHO=$ac_cv_path_ECHO
4570if test -n "$ECHO"; then
4571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4572$as_echo "$ECHO" >&6; }
4573else
4574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4575$as_echo "no" >&6; }
4576fi
4577
4578
4579  test -n "$ECHO" && break
4580done
4581
4582
4583    if test "x$ECHO" = x; then
4584        if test "xecho" = x; then
4585          PROG_NAME=echo
4586        else
4587          PROG_NAME=echo
4588        fi
4589        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4590$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4591        as_fn_error $? "Cannot continue" "$LINENO" 5
4592    fi
4593
4594
4595
4596    for ac_prog in expr
4597do
4598  # Extract the first word of "$ac_prog", so it can be a program name with args.
4599set dummy $ac_prog; ac_word=$2
4600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4601$as_echo_n "checking for $ac_word... " >&6; }
4602if ${ac_cv_path_EXPR+:} false; then :
4603  $as_echo_n "(cached) " >&6
4604else
4605  case $EXPR in
4606  [\\/]* | ?:[\\/]*)
4607  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4608  ;;
4609  *)
4610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4611for as_dir in $PATH
4612do
4613  IFS=$as_save_IFS
4614  test -z "$as_dir" && as_dir=.
4615    for ac_exec_ext in '' $ac_executable_extensions; do
4616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4617    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4619    break 2
4620  fi
4621done
4622  done
4623IFS=$as_save_IFS
4624
4625  ;;
4626esac
4627fi
4628EXPR=$ac_cv_path_EXPR
4629if test -n "$EXPR"; then
4630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4631$as_echo "$EXPR" >&6; }
4632else
4633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4634$as_echo "no" >&6; }
4635fi
4636
4637
4638  test -n "$EXPR" && break
4639done
4640
4641
4642    if test "x$EXPR" = x; then
4643        if test "xexpr" = x; then
4644          PROG_NAME=expr
4645        else
4646          PROG_NAME=expr
4647        fi
4648        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4649$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4650        as_fn_error $? "Cannot continue" "$LINENO" 5
4651    fi
4652
4653
4654
4655    for ac_prog in file
4656do
4657  # Extract the first word of "$ac_prog", so it can be a program name with args.
4658set dummy $ac_prog; ac_word=$2
4659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4660$as_echo_n "checking for $ac_word... " >&6; }
4661if ${ac_cv_path_FILE+:} false; then :
4662  $as_echo_n "(cached) " >&6
4663else
4664  case $FILE in
4665  [\\/]* | ?:[\\/]*)
4666  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4667  ;;
4668  *)
4669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4670for as_dir in $PATH
4671do
4672  IFS=$as_save_IFS
4673  test -z "$as_dir" && as_dir=.
4674    for ac_exec_ext in '' $ac_executable_extensions; do
4675  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4676    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4678    break 2
4679  fi
4680done
4681  done
4682IFS=$as_save_IFS
4683
4684  ;;
4685esac
4686fi
4687FILE=$ac_cv_path_FILE
4688if test -n "$FILE"; then
4689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4690$as_echo "$FILE" >&6; }
4691else
4692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693$as_echo "no" >&6; }
4694fi
4695
4696
4697  test -n "$FILE" && break
4698done
4699
4700
4701    if test "x$FILE" = x; then
4702        if test "xfile" = x; then
4703          PROG_NAME=file
4704        else
4705          PROG_NAME=file
4706        fi
4707        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4708$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4709        as_fn_error $? "Cannot continue" "$LINENO" 5
4710    fi
4711
4712
4713
4714    for ac_prog in find
4715do
4716  # Extract the first word of "$ac_prog", so it can be a program name with args.
4717set dummy $ac_prog; ac_word=$2
4718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4719$as_echo_n "checking for $ac_word... " >&6; }
4720if ${ac_cv_path_FIND+:} false; then :
4721  $as_echo_n "(cached) " >&6
4722else
4723  case $FIND in
4724  [\\/]* | ?:[\\/]*)
4725  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4726  ;;
4727  *)
4728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4729for as_dir in $PATH
4730do
4731  IFS=$as_save_IFS
4732  test -z "$as_dir" && as_dir=.
4733    for ac_exec_ext in '' $ac_executable_extensions; do
4734  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4735    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4737    break 2
4738  fi
4739done
4740  done
4741IFS=$as_save_IFS
4742
4743  ;;
4744esac
4745fi
4746FIND=$ac_cv_path_FIND
4747if test -n "$FIND"; then
4748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4749$as_echo "$FIND" >&6; }
4750else
4751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4752$as_echo "no" >&6; }
4753fi
4754
4755
4756  test -n "$FIND" && break
4757done
4758
4759
4760    if test "x$FIND" = x; then
4761        if test "xfind" = x; then
4762          PROG_NAME=find
4763        else
4764          PROG_NAME=find
4765        fi
4766        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4767$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4768        as_fn_error $? "Cannot continue" "$LINENO" 5
4769    fi
4770
4771
4772
4773    for ac_prog in head
4774do
4775  # Extract the first word of "$ac_prog", so it can be a program name with args.
4776set dummy $ac_prog; ac_word=$2
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4778$as_echo_n "checking for $ac_word... " >&6; }
4779if ${ac_cv_path_HEAD+:} false; then :
4780  $as_echo_n "(cached) " >&6
4781else
4782  case $HEAD in
4783  [\\/]* | ?:[\\/]*)
4784  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4785  ;;
4786  *)
4787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in $PATH
4789do
4790  IFS=$as_save_IFS
4791  test -z "$as_dir" && as_dir=.
4792    for ac_exec_ext in '' $ac_executable_extensions; do
4793  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4794    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4796    break 2
4797  fi
4798done
4799  done
4800IFS=$as_save_IFS
4801
4802  ;;
4803esac
4804fi
4805HEAD=$ac_cv_path_HEAD
4806if test -n "$HEAD"; then
4807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4808$as_echo "$HEAD" >&6; }
4809else
4810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4811$as_echo "no" >&6; }
4812fi
4813
4814
4815  test -n "$HEAD" && break
4816done
4817
4818
4819    if test "x$HEAD" = x; then
4820        if test "xhead" = x; then
4821          PROG_NAME=head
4822        else
4823          PROG_NAME=head
4824        fi
4825        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4826$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4827        as_fn_error $? "Cannot continue" "$LINENO" 5
4828    fi
4829
4830
4831
4832    for ac_prog in ln
4833do
4834  # Extract the first word of "$ac_prog", so it can be a program name with args.
4835set dummy $ac_prog; ac_word=$2
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4837$as_echo_n "checking for $ac_word... " >&6; }
4838if ${ac_cv_path_LN+:} false; then :
4839  $as_echo_n "(cached) " >&6
4840else
4841  case $LN in
4842  [\\/]* | ?:[\\/]*)
4843  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4844  ;;
4845  *)
4846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4847for as_dir in $PATH
4848do
4849  IFS=$as_save_IFS
4850  test -z "$as_dir" && as_dir=.
4851    for ac_exec_ext in '' $ac_executable_extensions; do
4852  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4853    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4855    break 2
4856  fi
4857done
4858  done
4859IFS=$as_save_IFS
4860
4861  ;;
4862esac
4863fi
4864LN=$ac_cv_path_LN
4865if test -n "$LN"; then
4866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4867$as_echo "$LN" >&6; }
4868else
4869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870$as_echo "no" >&6; }
4871fi
4872
4873
4874  test -n "$LN" && break
4875done
4876
4877
4878    if test "x$LN" = x; then
4879        if test "xln" = x; then
4880          PROG_NAME=ln
4881        else
4882          PROG_NAME=ln
4883        fi
4884        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4885$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4886        as_fn_error $? "Cannot continue" "$LINENO" 5
4887    fi
4888
4889
4890
4891    for ac_prog in ls
4892do
4893  # Extract the first word of "$ac_prog", so it can be a program name with args.
4894set dummy $ac_prog; ac_word=$2
4895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4896$as_echo_n "checking for $ac_word... " >&6; }
4897if ${ac_cv_path_LS+:} false; then :
4898  $as_echo_n "(cached) " >&6
4899else
4900  case $LS in
4901  [\\/]* | ?:[\\/]*)
4902  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4903  ;;
4904  *)
4905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4906for as_dir in $PATH
4907do
4908  IFS=$as_save_IFS
4909  test -z "$as_dir" && as_dir=.
4910    for ac_exec_ext in '' $ac_executable_extensions; do
4911  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4912    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4914    break 2
4915  fi
4916done
4917  done
4918IFS=$as_save_IFS
4919
4920  ;;
4921esac
4922fi
4923LS=$ac_cv_path_LS
4924if test -n "$LS"; then
4925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4926$as_echo "$LS" >&6; }
4927else
4928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4929$as_echo "no" >&6; }
4930fi
4931
4932
4933  test -n "$LS" && break
4934done
4935
4936
4937    if test "x$LS" = x; then
4938        if test "xls" = x; then
4939          PROG_NAME=ls
4940        else
4941          PROG_NAME=ls
4942        fi
4943        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4944$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4945        as_fn_error $? "Cannot continue" "$LINENO" 5
4946    fi
4947
4948
4949
4950    for ac_prog in mkdir
4951do
4952  # Extract the first word of "$ac_prog", so it can be a program name with args.
4953set dummy $ac_prog; ac_word=$2
4954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4955$as_echo_n "checking for $ac_word... " >&6; }
4956if ${ac_cv_path_MKDIR+:} false; then :
4957  $as_echo_n "(cached) " >&6
4958else
4959  case $MKDIR in
4960  [\\/]* | ?:[\\/]*)
4961  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4962  ;;
4963  *)
4964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4965for as_dir in $PATH
4966do
4967  IFS=$as_save_IFS
4968  test -z "$as_dir" && as_dir=.
4969    for ac_exec_ext in '' $ac_executable_extensions; do
4970  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4971    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4973    break 2
4974  fi
4975done
4976  done
4977IFS=$as_save_IFS
4978
4979  ;;
4980esac
4981fi
4982MKDIR=$ac_cv_path_MKDIR
4983if test -n "$MKDIR"; then
4984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4985$as_echo "$MKDIR" >&6; }
4986else
4987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4988$as_echo "no" >&6; }
4989fi
4990
4991
4992  test -n "$MKDIR" && break
4993done
4994
4995
4996    if test "x$MKDIR" = x; then
4997        if test "xmkdir" = x; then
4998          PROG_NAME=mkdir
4999        else
5000          PROG_NAME=mkdir
5001        fi
5002        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5003$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5004        as_fn_error $? "Cannot continue" "$LINENO" 5
5005    fi
5006
5007
5008
5009    for ac_prog in mktemp
5010do
5011  # Extract the first word of "$ac_prog", so it can be a program name with args.
5012set dummy $ac_prog; ac_word=$2
5013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014$as_echo_n "checking for $ac_word... " >&6; }
5015if ${ac_cv_path_MKTEMP+:} false; then :
5016  $as_echo_n "(cached) " >&6
5017else
5018  case $MKTEMP in
5019  [\\/]* | ?:[\\/]*)
5020  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5021  ;;
5022  *)
5023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024for as_dir in $PATH
5025do
5026  IFS=$as_save_IFS
5027  test -z "$as_dir" && as_dir=.
5028    for ac_exec_ext in '' $ac_executable_extensions; do
5029  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5030    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5032    break 2
5033  fi
5034done
5035  done
5036IFS=$as_save_IFS
5037
5038  ;;
5039esac
5040fi
5041MKTEMP=$ac_cv_path_MKTEMP
5042if test -n "$MKTEMP"; then
5043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5044$as_echo "$MKTEMP" >&6; }
5045else
5046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5047$as_echo "no" >&6; }
5048fi
5049
5050
5051  test -n "$MKTEMP" && break
5052done
5053
5054
5055    if test "x$MKTEMP" = x; then
5056        if test "xmktemp" = x; then
5057          PROG_NAME=mktemp
5058        else
5059          PROG_NAME=mktemp
5060        fi
5061        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5062$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5063        as_fn_error $? "Cannot continue" "$LINENO" 5
5064    fi
5065
5066
5067
5068    for ac_prog in mv
5069do
5070  # Extract the first word of "$ac_prog", so it can be a program name with args.
5071set dummy $ac_prog; ac_word=$2
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
5074if ${ac_cv_path_MV+:} false; then :
5075  $as_echo_n "(cached) " >&6
5076else
5077  case $MV in
5078  [\\/]* | ?:[\\/]*)
5079  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5080  ;;
5081  *)
5082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083for as_dir in $PATH
5084do
5085  IFS=$as_save_IFS
5086  test -z "$as_dir" && as_dir=.
5087    for ac_exec_ext in '' $ac_executable_extensions; do
5088  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5089    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5091    break 2
5092  fi
5093done
5094  done
5095IFS=$as_save_IFS
5096
5097  ;;
5098esac
5099fi
5100MV=$ac_cv_path_MV
5101if test -n "$MV"; then
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5103$as_echo "$MV" >&6; }
5104else
5105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106$as_echo "no" >&6; }
5107fi
5108
5109
5110  test -n "$MV" && break
5111done
5112
5113
5114    if test "x$MV" = x; then
5115        if test "xmv" = x; then
5116          PROG_NAME=mv
5117        else
5118          PROG_NAME=mv
5119        fi
5120        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5121$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5122        as_fn_error $? "Cannot continue" "$LINENO" 5
5123    fi
5124
5125
5126
5127    for ac_prog in printf
5128do
5129  # Extract the first word of "$ac_prog", so it can be a program name with args.
5130set dummy $ac_prog; ac_word=$2
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5132$as_echo_n "checking for $ac_word... " >&6; }
5133if ${ac_cv_path_PRINTF+:} false; then :
5134  $as_echo_n "(cached) " >&6
5135else
5136  case $PRINTF in
5137  [\\/]* | ?:[\\/]*)
5138  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5139  ;;
5140  *)
5141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5142for as_dir in $PATH
5143do
5144  IFS=$as_save_IFS
5145  test -z "$as_dir" && as_dir=.
5146    for ac_exec_ext in '' $ac_executable_extensions; do
5147  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5148    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5150    break 2
5151  fi
5152done
5153  done
5154IFS=$as_save_IFS
5155
5156  ;;
5157esac
5158fi
5159PRINTF=$ac_cv_path_PRINTF
5160if test -n "$PRINTF"; then
5161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5162$as_echo "$PRINTF" >&6; }
5163else
5164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5165$as_echo "no" >&6; }
5166fi
5167
5168
5169  test -n "$PRINTF" && break
5170done
5171
5172
5173    if test "x$PRINTF" = x; then
5174        if test "xprintf" = x; then
5175          PROG_NAME=printf
5176        else
5177          PROG_NAME=printf
5178        fi
5179        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5180$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5181        as_fn_error $? "Cannot continue" "$LINENO" 5
5182    fi
5183
5184
5185
5186    for ac_prog in rm
5187do
5188  # Extract the first word of "$ac_prog", so it can be a program name with args.
5189set dummy $ac_prog; ac_word=$2
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5191$as_echo_n "checking for $ac_word... " >&6; }
5192if ${ac_cv_path_RM+:} false; then :
5193  $as_echo_n "(cached) " >&6
5194else
5195  case $RM in
5196  [\\/]* | ?:[\\/]*)
5197  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5198  ;;
5199  *)
5200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5201for as_dir in $PATH
5202do
5203  IFS=$as_save_IFS
5204  test -z "$as_dir" && as_dir=.
5205    for ac_exec_ext in '' $ac_executable_extensions; do
5206  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5207    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5209    break 2
5210  fi
5211done
5212  done
5213IFS=$as_save_IFS
5214
5215  ;;
5216esac
5217fi
5218RM=$ac_cv_path_RM
5219if test -n "$RM"; then
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5221$as_echo "$RM" >&6; }
5222else
5223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5224$as_echo "no" >&6; }
5225fi
5226
5227
5228  test -n "$RM" && break
5229done
5230
5231
5232    if test "x$RM" = x; then
5233        if test "xrm" = x; then
5234          PROG_NAME=rm
5235        else
5236          PROG_NAME=rm
5237        fi
5238        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5239$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5240        as_fn_error $? "Cannot continue" "$LINENO" 5
5241    fi
5242
5243
5244
5245    for ac_prog in sh
5246do
5247  # Extract the first word of "$ac_prog", so it can be a program name with args.
5248set dummy $ac_prog; ac_word=$2
5249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5250$as_echo_n "checking for $ac_word... " >&6; }
5251if ${ac_cv_path_SH+:} false; then :
5252  $as_echo_n "(cached) " >&6
5253else
5254  case $SH in
5255  [\\/]* | ?:[\\/]*)
5256  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5257  ;;
5258  *)
5259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260for as_dir in $PATH
5261do
5262  IFS=$as_save_IFS
5263  test -z "$as_dir" && as_dir=.
5264    for ac_exec_ext in '' $ac_executable_extensions; do
5265  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5266    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5268    break 2
5269  fi
5270done
5271  done
5272IFS=$as_save_IFS
5273
5274  ;;
5275esac
5276fi
5277SH=$ac_cv_path_SH
5278if test -n "$SH"; then
5279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5280$as_echo "$SH" >&6; }
5281else
5282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283$as_echo "no" >&6; }
5284fi
5285
5286
5287  test -n "$SH" && break
5288done
5289
5290
5291    if test "x$SH" = x; then
5292        if test "xsh" = x; then
5293          PROG_NAME=sh
5294        else
5295          PROG_NAME=sh
5296        fi
5297        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5298$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5299        as_fn_error $? "Cannot continue" "$LINENO" 5
5300    fi
5301
5302
5303
5304    for ac_prog in sort
5305do
5306  # Extract the first word of "$ac_prog", so it can be a program name with args.
5307set dummy $ac_prog; ac_word=$2
5308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5309$as_echo_n "checking for $ac_word... " >&6; }
5310if ${ac_cv_path_SORT+:} false; then :
5311  $as_echo_n "(cached) " >&6
5312else
5313  case $SORT in
5314  [\\/]* | ?:[\\/]*)
5315  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5316  ;;
5317  *)
5318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5319for as_dir in $PATH
5320do
5321  IFS=$as_save_IFS
5322  test -z "$as_dir" && as_dir=.
5323    for ac_exec_ext in '' $ac_executable_extensions; do
5324  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5325    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5327    break 2
5328  fi
5329done
5330  done
5331IFS=$as_save_IFS
5332
5333  ;;
5334esac
5335fi
5336SORT=$ac_cv_path_SORT
5337if test -n "$SORT"; then
5338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5339$as_echo "$SORT" >&6; }
5340else
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5342$as_echo "no" >&6; }
5343fi
5344
5345
5346  test -n "$SORT" && break
5347done
5348
5349
5350    if test "x$SORT" = x; then
5351        if test "xsort" = x; then
5352          PROG_NAME=sort
5353        else
5354          PROG_NAME=sort
5355        fi
5356        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5357$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5358        as_fn_error $? "Cannot continue" "$LINENO" 5
5359    fi
5360
5361
5362
5363    for ac_prog in tail
5364do
5365  # Extract the first word of "$ac_prog", so it can be a program name with args.
5366set dummy $ac_prog; ac_word=$2
5367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5368$as_echo_n "checking for $ac_word... " >&6; }
5369if ${ac_cv_path_TAIL+:} false; then :
5370  $as_echo_n "(cached) " >&6
5371else
5372  case $TAIL in
5373  [\\/]* | ?:[\\/]*)
5374  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5375  ;;
5376  *)
5377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5378for as_dir in $PATH
5379do
5380  IFS=$as_save_IFS
5381  test -z "$as_dir" && as_dir=.
5382    for ac_exec_ext in '' $ac_executable_extensions; do
5383  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5384    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5386    break 2
5387  fi
5388done
5389  done
5390IFS=$as_save_IFS
5391
5392  ;;
5393esac
5394fi
5395TAIL=$ac_cv_path_TAIL
5396if test -n "$TAIL"; then
5397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5398$as_echo "$TAIL" >&6; }
5399else
5400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5401$as_echo "no" >&6; }
5402fi
5403
5404
5405  test -n "$TAIL" && break
5406done
5407
5408
5409    if test "x$TAIL" = x; then
5410        if test "xtail" = x; then
5411          PROG_NAME=tail
5412        else
5413          PROG_NAME=tail
5414        fi
5415        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5416$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5417        as_fn_error $? "Cannot continue" "$LINENO" 5
5418    fi
5419
5420
5421
5422    for ac_prog in tar
5423do
5424  # Extract the first word of "$ac_prog", so it can be a program name with args.
5425set dummy $ac_prog; ac_word=$2
5426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5427$as_echo_n "checking for $ac_word... " >&6; }
5428if ${ac_cv_path_TAR+:} false; then :
5429  $as_echo_n "(cached) " >&6
5430else
5431  case $TAR in
5432  [\\/]* | ?:[\\/]*)
5433  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5434  ;;
5435  *)
5436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5437for as_dir in $PATH
5438do
5439  IFS=$as_save_IFS
5440  test -z "$as_dir" && as_dir=.
5441    for ac_exec_ext in '' $ac_executable_extensions; do
5442  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5443    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5445    break 2
5446  fi
5447done
5448  done
5449IFS=$as_save_IFS
5450
5451  ;;
5452esac
5453fi
5454TAR=$ac_cv_path_TAR
5455if test -n "$TAR"; then
5456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5457$as_echo "$TAR" >&6; }
5458else
5459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5460$as_echo "no" >&6; }
5461fi
5462
5463
5464  test -n "$TAR" && break
5465done
5466
5467
5468    if test "x$TAR" = x; then
5469        if test "xtar" = x; then
5470          PROG_NAME=tar
5471        else
5472          PROG_NAME=tar
5473        fi
5474        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5475$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5476        as_fn_error $? "Cannot continue" "$LINENO" 5
5477    fi
5478
5479
5480
5481    for ac_prog in tee
5482do
5483  # Extract the first word of "$ac_prog", so it can be a program name with args.
5484set dummy $ac_prog; ac_word=$2
5485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5486$as_echo_n "checking for $ac_word... " >&6; }
5487if ${ac_cv_path_TEE+:} false; then :
5488  $as_echo_n "(cached) " >&6
5489else
5490  case $TEE in
5491  [\\/]* | ?:[\\/]*)
5492  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5493  ;;
5494  *)
5495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5496for as_dir in $PATH
5497do
5498  IFS=$as_save_IFS
5499  test -z "$as_dir" && as_dir=.
5500    for ac_exec_ext in '' $ac_executable_extensions; do
5501  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5502    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5504    break 2
5505  fi
5506done
5507  done
5508IFS=$as_save_IFS
5509
5510  ;;
5511esac
5512fi
5513TEE=$ac_cv_path_TEE
5514if test -n "$TEE"; then
5515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5516$as_echo "$TEE" >&6; }
5517else
5518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5519$as_echo "no" >&6; }
5520fi
5521
5522
5523  test -n "$TEE" && break
5524done
5525
5526
5527    if test "x$TEE" = x; then
5528        if test "xtee" = x; then
5529          PROG_NAME=tee
5530        else
5531          PROG_NAME=tee
5532        fi
5533        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5534$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5535        as_fn_error $? "Cannot continue" "$LINENO" 5
5536    fi
5537
5538
5539
5540    for ac_prog in touch
5541do
5542  # Extract the first word of "$ac_prog", so it can be a program name with args.
5543set dummy $ac_prog; ac_word=$2
5544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5545$as_echo_n "checking for $ac_word... " >&6; }
5546if ${ac_cv_path_TOUCH+:} false; then :
5547  $as_echo_n "(cached) " >&6
5548else
5549  case $TOUCH in
5550  [\\/]* | ?:[\\/]*)
5551  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5552  ;;
5553  *)
5554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5555for as_dir in $PATH
5556do
5557  IFS=$as_save_IFS
5558  test -z "$as_dir" && as_dir=.
5559    for ac_exec_ext in '' $ac_executable_extensions; do
5560  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5561    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5563    break 2
5564  fi
5565done
5566  done
5567IFS=$as_save_IFS
5568
5569  ;;
5570esac
5571fi
5572TOUCH=$ac_cv_path_TOUCH
5573if test -n "$TOUCH"; then
5574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5575$as_echo "$TOUCH" >&6; }
5576else
5577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578$as_echo "no" >&6; }
5579fi
5580
5581
5582  test -n "$TOUCH" && break
5583done
5584
5585
5586    if test "x$TOUCH" = x; then
5587        if test "xtouch" = x; then
5588          PROG_NAME=touch
5589        else
5590          PROG_NAME=touch
5591        fi
5592        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5593$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5594        as_fn_error $? "Cannot continue" "$LINENO" 5
5595    fi
5596
5597
5598
5599    for ac_prog in tr
5600do
5601  # Extract the first word of "$ac_prog", so it can be a program name with args.
5602set dummy $ac_prog; ac_word=$2
5603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5604$as_echo_n "checking for $ac_word... " >&6; }
5605if ${ac_cv_path_TR+:} false; then :
5606  $as_echo_n "(cached) " >&6
5607else
5608  case $TR in
5609  [\\/]* | ?:[\\/]*)
5610  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5611  ;;
5612  *)
5613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5614for as_dir in $PATH
5615do
5616  IFS=$as_save_IFS
5617  test -z "$as_dir" && as_dir=.
5618    for ac_exec_ext in '' $ac_executable_extensions; do
5619  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5620    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5622    break 2
5623  fi
5624done
5625  done
5626IFS=$as_save_IFS
5627
5628  ;;
5629esac
5630fi
5631TR=$ac_cv_path_TR
5632if test -n "$TR"; then
5633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5634$as_echo "$TR" >&6; }
5635else
5636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5637$as_echo "no" >&6; }
5638fi
5639
5640
5641  test -n "$TR" && break
5642done
5643
5644
5645    if test "x$TR" = x; then
5646        if test "xtr" = x; then
5647          PROG_NAME=tr
5648        else
5649          PROG_NAME=tr
5650        fi
5651        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5652$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5653        as_fn_error $? "Cannot continue" "$LINENO" 5
5654    fi
5655
5656
5657
5658    for ac_prog in uname
5659do
5660  # Extract the first word of "$ac_prog", so it can be a program name with args.
5661set dummy $ac_prog; ac_word=$2
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663$as_echo_n "checking for $ac_word... " >&6; }
5664if ${ac_cv_path_UNAME+:} false; then :
5665  $as_echo_n "(cached) " >&6
5666else
5667  case $UNAME in
5668  [\\/]* | ?:[\\/]*)
5669  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5670  ;;
5671  *)
5672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673for as_dir in $PATH
5674do
5675  IFS=$as_save_IFS
5676  test -z "$as_dir" && as_dir=.
5677    for ac_exec_ext in '' $ac_executable_extensions; do
5678  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5679    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681    break 2
5682  fi
5683done
5684  done
5685IFS=$as_save_IFS
5686
5687  ;;
5688esac
5689fi
5690UNAME=$ac_cv_path_UNAME
5691if test -n "$UNAME"; then
5692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5693$as_echo "$UNAME" >&6; }
5694else
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696$as_echo "no" >&6; }
5697fi
5698
5699
5700  test -n "$UNAME" && break
5701done
5702
5703
5704    if test "x$UNAME" = x; then
5705        if test "xuname" = x; then
5706          PROG_NAME=uname
5707        else
5708          PROG_NAME=uname
5709        fi
5710        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5711$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5712        as_fn_error $? "Cannot continue" "$LINENO" 5
5713    fi
5714
5715
5716
5717    for ac_prog in uniq
5718do
5719  # Extract the first word of "$ac_prog", so it can be a program name with args.
5720set dummy $ac_prog; ac_word=$2
5721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5722$as_echo_n "checking for $ac_word... " >&6; }
5723if ${ac_cv_path_UNIQ+:} false; then :
5724  $as_echo_n "(cached) " >&6
5725else
5726  case $UNIQ in
5727  [\\/]* | ?:[\\/]*)
5728  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5729  ;;
5730  *)
5731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5732for as_dir in $PATH
5733do
5734  IFS=$as_save_IFS
5735  test -z "$as_dir" && as_dir=.
5736    for ac_exec_ext in '' $ac_executable_extensions; do
5737  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5738    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5740    break 2
5741  fi
5742done
5743  done
5744IFS=$as_save_IFS
5745
5746  ;;
5747esac
5748fi
5749UNIQ=$ac_cv_path_UNIQ
5750if test -n "$UNIQ"; then
5751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5752$as_echo "$UNIQ" >&6; }
5753else
5754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5755$as_echo "no" >&6; }
5756fi
5757
5758
5759  test -n "$UNIQ" && break
5760done
5761
5762
5763    if test "x$UNIQ" = x; then
5764        if test "xuniq" = x; then
5765          PROG_NAME=uniq
5766        else
5767          PROG_NAME=uniq
5768        fi
5769        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5770$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5771        as_fn_error $? "Cannot continue" "$LINENO" 5
5772    fi
5773
5774
5775
5776    for ac_prog in wc
5777do
5778  # Extract the first word of "$ac_prog", so it can be a program name with args.
5779set dummy $ac_prog; ac_word=$2
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781$as_echo_n "checking for $ac_word... " >&6; }
5782if ${ac_cv_path_WC+:} false; then :
5783  $as_echo_n "(cached) " >&6
5784else
5785  case $WC in
5786  [\\/]* | ?:[\\/]*)
5787  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5788  ;;
5789  *)
5790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793  IFS=$as_save_IFS
5794  test -z "$as_dir" && as_dir=.
5795    for ac_exec_ext in '' $ac_executable_extensions; do
5796  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5797    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799    break 2
5800  fi
5801done
5802  done
5803IFS=$as_save_IFS
5804
5805  ;;
5806esac
5807fi
5808WC=$ac_cv_path_WC
5809if test -n "$WC"; then
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5811$as_echo "$WC" >&6; }
5812else
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814$as_echo "no" >&6; }
5815fi
5816
5817
5818  test -n "$WC" && break
5819done
5820
5821
5822    if test "x$WC" = x; then
5823        if test "xwc" = x; then
5824          PROG_NAME=wc
5825        else
5826          PROG_NAME=wc
5827        fi
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5829$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5830        as_fn_error $? "Cannot continue" "$LINENO" 5
5831    fi
5832
5833
5834
5835    for ac_prog in which
5836do
5837  # Extract the first word of "$ac_prog", so it can be a program name with args.
5838set dummy $ac_prog; ac_word=$2
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840$as_echo_n "checking for $ac_word... " >&6; }
5841if ${ac_cv_path_WHICH+:} false; then :
5842  $as_echo_n "(cached) " >&6
5843else
5844  case $WHICH in
5845  [\\/]* | ?:[\\/]*)
5846  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5847  ;;
5848  *)
5849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5850for as_dir in $PATH
5851do
5852  IFS=$as_save_IFS
5853  test -z "$as_dir" && as_dir=.
5854    for ac_exec_ext in '' $ac_executable_extensions; do
5855  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5856    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5858    break 2
5859  fi
5860done
5861  done
5862IFS=$as_save_IFS
5863
5864  ;;
5865esac
5866fi
5867WHICH=$ac_cv_path_WHICH
5868if test -n "$WHICH"; then
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5870$as_echo "$WHICH" >&6; }
5871else
5872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873$as_echo "no" >&6; }
5874fi
5875
5876
5877  test -n "$WHICH" && break
5878done
5879
5880
5881    if test "x$WHICH" = x; then
5882        if test "xwhich" = x; then
5883          PROG_NAME=which
5884        else
5885          PROG_NAME=which
5886        fi
5887        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5888$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5889        as_fn_error $? "Cannot continue" "$LINENO" 5
5890    fi
5891
5892
5893
5894    for ac_prog in xargs
5895do
5896  # Extract the first word of "$ac_prog", so it can be a program name with args.
5897set dummy $ac_prog; ac_word=$2
5898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899$as_echo_n "checking for $ac_word... " >&6; }
5900if ${ac_cv_path_XARGS+:} false; then :
5901  $as_echo_n "(cached) " >&6
5902else
5903  case $XARGS in
5904  [\\/]* | ?:[\\/]*)
5905  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5906  ;;
5907  *)
5908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911  IFS=$as_save_IFS
5912  test -z "$as_dir" && as_dir=.
5913    for ac_exec_ext in '' $ac_executable_extensions; do
5914  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5915    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917    break 2
5918  fi
5919done
5920  done
5921IFS=$as_save_IFS
5922
5923  ;;
5924esac
5925fi
5926XARGS=$ac_cv_path_XARGS
5927if test -n "$XARGS"; then
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5929$as_echo "$XARGS" >&6; }
5930else
5931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935
5936  test -n "$XARGS" && break
5937done
5938
5939
5940    if test "x$XARGS" = x; then
5941        if test "xxargs" = x; then
5942          PROG_NAME=xargs
5943        else
5944          PROG_NAME=xargs
5945        fi
5946        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5947$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5948        as_fn_error $? "Cannot continue" "$LINENO" 5
5949    fi
5950
5951
5952
5953# Then required tools that require some special treatment.
5954for ac_prog in gawk mawk nawk awk
5955do
5956  # Extract the first word of "$ac_prog", so it can be a program name with args.
5957set dummy $ac_prog; ac_word=$2
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
5960if ${ac_cv_prog_AWK+:} false; then :
5961  $as_echo_n "(cached) " >&6
5962else
5963  if test -n "$AWK"; then
5964  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5965else
5966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969  IFS=$as_save_IFS
5970  test -z "$as_dir" && as_dir=.
5971    for ac_exec_ext in '' $ac_executable_extensions; do
5972  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5973    ac_cv_prog_AWK="$ac_prog"
5974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5975    break 2
5976  fi
5977done
5978  done
5979IFS=$as_save_IFS
5980
5981fi
5982fi
5983AWK=$ac_cv_prog_AWK
5984if test -n "$AWK"; then
5985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5986$as_echo "$AWK" >&6; }
5987else
5988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
5990fi
5991
5992
5993  test -n "$AWK" && break
5994done
5995
5996
5997    if test "x$AWK" = x; then
5998        if test "x" = x; then
5999          PROG_NAME=awk
6000        else
6001          PROG_NAME=
6002        fi
6003        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6004$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6005        as_fn_error $? "Cannot continue" "$LINENO" 5
6006    fi
6007
6008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6009$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6010if ${ac_cv_path_GREP+:} false; then :
6011  $as_echo_n "(cached) " >&6
6012else
6013  if test -z "$GREP"; then
6014  ac_path_GREP_found=false
6015  # Loop through the user's path and test for each of PROGNAME-LIST
6016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6017for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6018do
6019  IFS=$as_save_IFS
6020  test -z "$as_dir" && as_dir=.
6021    for ac_prog in grep ggrep; do
6022    for ac_exec_ext in '' $ac_executable_extensions; do
6023      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6024      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6025# Check for GNU ac_path_GREP and select it if it is found.
6026  # Check for GNU $ac_path_GREP
6027case `"$ac_path_GREP" --version 2>&1` in
6028*GNU*)
6029  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6030*)
6031  ac_count=0
6032  $as_echo_n 0123456789 >"conftest.in"
6033  while :
6034  do
6035    cat "conftest.in" "conftest.in" >"conftest.tmp"
6036    mv "conftest.tmp" "conftest.in"
6037    cp "conftest.in" "conftest.nl"
6038    $as_echo 'GREP' >> "conftest.nl"
6039    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6040    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6041    as_fn_arith $ac_count + 1 && ac_count=$as_val
6042    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6043      # Best one so far, save it but keep looking for a better one
6044      ac_cv_path_GREP="$ac_path_GREP"
6045      ac_path_GREP_max=$ac_count
6046    fi
6047    # 10*(2^10) chars as input seems more than enough
6048    test $ac_count -gt 10 && break
6049  done
6050  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6051esac
6052
6053      $ac_path_GREP_found && break 3
6054    done
6055  done
6056  done
6057IFS=$as_save_IFS
6058  if test -z "$ac_cv_path_GREP"; then
6059    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6060  fi
6061else
6062  ac_cv_path_GREP=$GREP
6063fi
6064
6065fi
6066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6067$as_echo "$ac_cv_path_GREP" >&6; }
6068 GREP="$ac_cv_path_GREP"
6069
6070
6071
6072    if test "x$GREP" = x; then
6073        if test "x" = x; then
6074          PROG_NAME=grep
6075        else
6076          PROG_NAME=
6077        fi
6078        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6079$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6080        as_fn_error $? "Cannot continue" "$LINENO" 5
6081    fi
6082
6083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6084$as_echo_n "checking for egrep... " >&6; }
6085if ${ac_cv_path_EGREP+:} false; then :
6086  $as_echo_n "(cached) " >&6
6087else
6088  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6089   then ac_cv_path_EGREP="$GREP -E"
6090   else
6091     if test -z "$EGREP"; then
6092  ac_path_EGREP_found=false
6093  # Loop through the user's path and test for each of PROGNAME-LIST
6094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6095for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6096do
6097  IFS=$as_save_IFS
6098  test -z "$as_dir" && as_dir=.
6099    for ac_prog in egrep; do
6100    for ac_exec_ext in '' $ac_executable_extensions; do
6101      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6102      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6103# Check for GNU ac_path_EGREP and select it if it is found.
6104  # Check for GNU $ac_path_EGREP
6105case `"$ac_path_EGREP" --version 2>&1` in
6106*GNU*)
6107  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6108*)
6109  ac_count=0
6110  $as_echo_n 0123456789 >"conftest.in"
6111  while :
6112  do
6113    cat "conftest.in" "conftest.in" >"conftest.tmp"
6114    mv "conftest.tmp" "conftest.in"
6115    cp "conftest.in" "conftest.nl"
6116    $as_echo 'EGREP' >> "conftest.nl"
6117    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6118    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6119    as_fn_arith $ac_count + 1 && ac_count=$as_val
6120    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6121      # Best one so far, save it but keep looking for a better one
6122      ac_cv_path_EGREP="$ac_path_EGREP"
6123      ac_path_EGREP_max=$ac_count
6124    fi
6125    # 10*(2^10) chars as input seems more than enough
6126    test $ac_count -gt 10 && break
6127  done
6128  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6129esac
6130
6131      $ac_path_EGREP_found && break 3
6132    done
6133  done
6134  done
6135IFS=$as_save_IFS
6136  if test -z "$ac_cv_path_EGREP"; then
6137    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6138  fi
6139else
6140  ac_cv_path_EGREP=$EGREP
6141fi
6142
6143   fi
6144fi
6145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6146$as_echo "$ac_cv_path_EGREP" >&6; }
6147 EGREP="$ac_cv_path_EGREP"
6148
6149
6150
6151    if test "x$EGREP" = x; then
6152        if test "x" = x; then
6153          PROG_NAME=egrep
6154        else
6155          PROG_NAME=
6156        fi
6157        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6158$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6159        as_fn_error $? "Cannot continue" "$LINENO" 5
6160    fi
6161
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6163$as_echo_n "checking for fgrep... " >&6; }
6164if ${ac_cv_path_FGREP+:} false; then :
6165  $as_echo_n "(cached) " >&6
6166else
6167  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6168   then ac_cv_path_FGREP="$GREP -F"
6169   else
6170     if test -z "$FGREP"; then
6171  ac_path_FGREP_found=false
6172  # Loop through the user's path and test for each of PROGNAME-LIST
6173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6175do
6176  IFS=$as_save_IFS
6177  test -z "$as_dir" && as_dir=.
6178    for ac_prog in fgrep; do
6179    for ac_exec_ext in '' $ac_executable_extensions; do
6180      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6181      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6182# Check for GNU ac_path_FGREP and select it if it is found.
6183  # Check for GNU $ac_path_FGREP
6184case `"$ac_path_FGREP" --version 2>&1` in
6185*GNU*)
6186  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6187*)
6188  ac_count=0
6189  $as_echo_n 0123456789 >"conftest.in"
6190  while :
6191  do
6192    cat "conftest.in" "conftest.in" >"conftest.tmp"
6193    mv "conftest.tmp" "conftest.in"
6194    cp "conftest.in" "conftest.nl"
6195    $as_echo 'FGREP' >> "conftest.nl"
6196    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6197    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6198    as_fn_arith $ac_count + 1 && ac_count=$as_val
6199    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6200      # Best one so far, save it but keep looking for a better one
6201      ac_cv_path_FGREP="$ac_path_FGREP"
6202      ac_path_FGREP_max=$ac_count
6203    fi
6204    # 10*(2^10) chars as input seems more than enough
6205    test $ac_count -gt 10 && break
6206  done
6207  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6208esac
6209
6210      $ac_path_FGREP_found && break 3
6211    done
6212  done
6213  done
6214IFS=$as_save_IFS
6215  if test -z "$ac_cv_path_FGREP"; then
6216    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6217  fi
6218else
6219  ac_cv_path_FGREP=$FGREP
6220fi
6221
6222   fi
6223fi
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6225$as_echo "$ac_cv_path_FGREP" >&6; }
6226 FGREP="$ac_cv_path_FGREP"
6227
6228
6229
6230    if test "x$FGREP" = x; then
6231        if test "x" = x; then
6232          PROG_NAME=fgrep
6233        else
6234          PROG_NAME=
6235        fi
6236        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6237$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6238        as_fn_error $? "Cannot continue" "$LINENO" 5
6239    fi
6240
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6242$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6243if ${ac_cv_path_SED+:} false; then :
6244  $as_echo_n "(cached) " >&6
6245else
6246            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6247     for ac_i in 1 2 3 4 5 6 7; do
6248       ac_script="$ac_script$as_nl$ac_script"
6249     done
6250     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6251     { ac_script=; unset ac_script;}
6252     if test -z "$SED"; then
6253  ac_path_SED_found=false
6254  # Loop through the user's path and test for each of PROGNAME-LIST
6255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256for as_dir in $PATH
6257do
6258  IFS=$as_save_IFS
6259  test -z "$as_dir" && as_dir=.
6260    for ac_prog in sed gsed; do
6261    for ac_exec_ext in '' $ac_executable_extensions; do
6262      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6263      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6264# Check for GNU ac_path_SED and select it if it is found.
6265  # Check for GNU $ac_path_SED
6266case `"$ac_path_SED" --version 2>&1` in
6267*GNU*)
6268  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6269*)
6270  ac_count=0
6271  $as_echo_n 0123456789 >"conftest.in"
6272  while :
6273  do
6274    cat "conftest.in" "conftest.in" >"conftest.tmp"
6275    mv "conftest.tmp" "conftest.in"
6276    cp "conftest.in" "conftest.nl"
6277    $as_echo '' >> "conftest.nl"
6278    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6279    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6280    as_fn_arith $ac_count + 1 && ac_count=$as_val
6281    if test $ac_count -gt ${ac_path_SED_max-0}; then
6282      # Best one so far, save it but keep looking for a better one
6283      ac_cv_path_SED="$ac_path_SED"
6284      ac_path_SED_max=$ac_count
6285    fi
6286    # 10*(2^10) chars as input seems more than enough
6287    test $ac_count -gt 10 && break
6288  done
6289  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6290esac
6291
6292      $ac_path_SED_found && break 3
6293    done
6294  done
6295  done
6296IFS=$as_save_IFS
6297  if test -z "$ac_cv_path_SED"; then
6298    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6299  fi
6300else
6301  ac_cv_path_SED=$SED
6302fi
6303
6304fi
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6306$as_echo "$ac_cv_path_SED" >&6; }
6307 SED="$ac_cv_path_SED"
6308  rm -f conftest.sed
6309
6310
6311    if test "x$SED" = x; then
6312        if test "x" = x; then
6313          PROG_NAME=sed
6314        else
6315          PROG_NAME=
6316        fi
6317        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6318$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6319        as_fn_error $? "Cannot continue" "$LINENO" 5
6320    fi
6321
6322
6323for ac_prog in nawk gawk awk
6324do
6325  # Extract the first word of "$ac_prog", so it can be a program name with args.
6326set dummy $ac_prog; ac_word=$2
6327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6328$as_echo_n "checking for $ac_word... " >&6; }
6329if ${ac_cv_path_NAWK+:} false; then :
6330  $as_echo_n "(cached) " >&6
6331else
6332  case $NAWK in
6333  [\\/]* | ?:[\\/]*)
6334  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6335  ;;
6336  *)
6337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6338for as_dir in $PATH
6339do
6340  IFS=$as_save_IFS
6341  test -z "$as_dir" && as_dir=.
6342    for ac_exec_ext in '' $ac_executable_extensions; do
6343  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6344    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6346    break 2
6347  fi
6348done
6349  done
6350IFS=$as_save_IFS
6351
6352  ;;
6353esac
6354fi
6355NAWK=$ac_cv_path_NAWK
6356if test -n "$NAWK"; then
6357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6358$as_echo "$NAWK" >&6; }
6359else
6360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6361$as_echo "no" >&6; }
6362fi
6363
6364
6365  test -n "$NAWK" && break
6366done
6367
6368
6369    if test "x$NAWK" = x; then
6370        if test "x" = x; then
6371          PROG_NAME=nawk
6372        else
6373          PROG_NAME=
6374        fi
6375        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6376$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6377        as_fn_error $? "Cannot continue" "$LINENO" 5
6378    fi
6379
6380
6381# Always force rm.
6382RM="$RM -f"
6383
6384# pwd behaves differently on various platforms and some don't support the -L flag.
6385# Always use the bash builtin pwd to get uniform behavior.
6386THEPWDCMD=pwd
6387
6388# These are not required on all platforms
6389# Extract the first word of "cygpath", so it can be a program name with args.
6390set dummy cygpath; ac_word=$2
6391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6392$as_echo_n "checking for $ac_word... " >&6; }
6393if ${ac_cv_path_CYGPATH+:} false; then :
6394  $as_echo_n "(cached) " >&6
6395else
6396  case $CYGPATH in
6397  [\\/]* | ?:[\\/]*)
6398  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6399  ;;
6400  *)
6401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6402for as_dir in $PATH
6403do
6404  IFS=$as_save_IFS
6405  test -z "$as_dir" && as_dir=.
6406    for ac_exec_ext in '' $ac_executable_extensions; do
6407  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6408    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6410    break 2
6411  fi
6412done
6413  done
6414IFS=$as_save_IFS
6415
6416  ;;
6417esac
6418fi
6419CYGPATH=$ac_cv_path_CYGPATH
6420if test -n "$CYGPATH"; then
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6422$as_echo "$CYGPATH" >&6; }
6423else
6424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6425$as_echo "no" >&6; }
6426fi
6427
6428
6429# Extract the first word of "readlink", so it can be a program name with args.
6430set dummy readlink; ac_word=$2
6431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6432$as_echo_n "checking for $ac_word... " >&6; }
6433if ${ac_cv_path_READLINK+:} false; then :
6434  $as_echo_n "(cached) " >&6
6435else
6436  case $READLINK in
6437  [\\/]* | ?:[\\/]*)
6438  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6439  ;;
6440  *)
6441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6442for as_dir in $PATH
6443do
6444  IFS=$as_save_IFS
6445  test -z "$as_dir" && as_dir=.
6446    for ac_exec_ext in '' $ac_executable_extensions; do
6447  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6448    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6450    break 2
6451  fi
6452done
6453  done
6454IFS=$as_save_IFS
6455
6456  ;;
6457esac
6458fi
6459READLINK=$ac_cv_path_READLINK
6460if test -n "$READLINK"; then
6461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6462$as_echo "$READLINK" >&6; }
6463else
6464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6465$as_echo "no" >&6; }
6466fi
6467
6468
6469# Extract the first word of "df", so it can be a program name with args.
6470set dummy df; ac_word=$2
6471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6472$as_echo_n "checking for $ac_word... " >&6; }
6473if ${ac_cv_path_DF+:} false; then :
6474  $as_echo_n "(cached) " >&6
6475else
6476  case $DF in
6477  [\\/]* | ?:[\\/]*)
6478  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6479  ;;
6480  *)
6481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6482for as_dir in $PATH
6483do
6484  IFS=$as_save_IFS
6485  test -z "$as_dir" && as_dir=.
6486    for ac_exec_ext in '' $ac_executable_extensions; do
6487  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6488    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6490    break 2
6491  fi
6492done
6493  done
6494IFS=$as_save_IFS
6495
6496  ;;
6497esac
6498fi
6499DF=$ac_cv_path_DF
6500if test -n "$DF"; then
6501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6502$as_echo "$DF" >&6; }
6503else
6504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6505$as_echo "no" >&6; }
6506fi
6507
6508
6509# Extract the first word of "SetFile", so it can be a program name with args.
6510set dummy SetFile; ac_word=$2
6511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6512$as_echo_n "checking for $ac_word... " >&6; }
6513if ${ac_cv_path_SETFILE+:} false; then :
6514  $as_echo_n "(cached) " >&6
6515else
6516  case $SETFILE in
6517  [\\/]* | ?:[\\/]*)
6518  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6519  ;;
6520  *)
6521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6522for as_dir in $PATH
6523do
6524  IFS=$as_save_IFS
6525  test -z "$as_dir" && as_dir=.
6526    for ac_exec_ext in '' $ac_executable_extensions; do
6527  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6528    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6530    break 2
6531  fi
6532done
6533  done
6534IFS=$as_save_IFS
6535
6536  ;;
6537esac
6538fi
6539SETFILE=$ac_cv_path_SETFILE
6540if test -n "$SETFILE"; then
6541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6542$as_echo "$SETFILE" >&6; }
6543else
6544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6545$as_echo "no" >&6; }
6546fi
6547
6548
6549
6550
6551# Now we can determine OpenJDK build and target platforms. This is required to
6552# have early on.
6553# Make sure we can run config.sub.
6554$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6555  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6556
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6558$as_echo_n "checking build system type... " >&6; }
6559if ${ac_cv_build+:} false; then :
6560  $as_echo_n "(cached) " >&6
6561else
6562  ac_build_alias=$build_alias
6563test "x$ac_build_alias" = x &&
6564  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6565test "x$ac_build_alias" = x &&
6566  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6567ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6568  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6569
6570fi
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6572$as_echo "$ac_cv_build" >&6; }
6573case $ac_cv_build in
6574*-*-*) ;;
6575*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6576esac
6577build=$ac_cv_build
6578ac_save_IFS=$IFS; IFS='-'
6579set x $ac_cv_build
6580shift
6581build_cpu=$1
6582build_vendor=$2
6583shift; shift
6584# Remember, the first character of IFS is used to create $*,
6585# except with old shells:
6586build_os=$*
6587IFS=$ac_save_IFS
6588case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6589
6590
6591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6592$as_echo_n "checking host system type... " >&6; }
6593if ${ac_cv_host+:} false; then :
6594  $as_echo_n "(cached) " >&6
6595else
6596  if test "x$host_alias" = x; then
6597  ac_cv_host=$ac_cv_build
6598else
6599  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6600    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6601fi
6602
6603fi
6604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6605$as_echo "$ac_cv_host" >&6; }
6606case $ac_cv_host in
6607*-*-*) ;;
6608*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6609esac
6610host=$ac_cv_host
6611ac_save_IFS=$IFS; IFS='-'
6612set x $ac_cv_host
6613shift
6614host_cpu=$1
6615host_vendor=$2
6616shift; shift
6617# Remember, the first character of IFS is used to create $*,
6618# except with old shells:
6619host_os=$*
6620IFS=$ac_save_IFS
6621case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6622
6623
6624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6625$as_echo_n "checking target system type... " >&6; }
6626if ${ac_cv_target+:} false; then :
6627  $as_echo_n "(cached) " >&6
6628else
6629  if test "x$target_alias" = x; then
6630  ac_cv_target=$ac_cv_host
6631else
6632  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6633    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6634fi
6635
6636fi
6637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6638$as_echo "$ac_cv_target" >&6; }
6639case $ac_cv_target in
6640*-*-*) ;;
6641*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6642esac
6643target=$ac_cv_target
6644ac_save_IFS=$IFS; IFS='-'
6645set x $ac_cv_target
6646shift
6647target_cpu=$1
6648target_vendor=$2
6649shift; shift
6650# Remember, the first character of IFS is used to create $*,
6651# except with old shells:
6652target_os=$*
6653IFS=$ac_save_IFS
6654case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6655
6656
6657# The aliases save the names the user supplied, while $host etc.
6658# will get canonicalized.
6659test -n "$target_alias" &&
6660  test "$program_prefix$program_suffix$program_transform_name" = \
6661    NONENONEs,x,x, &&
6662  program_prefix=${target_alias}-
6663
6664# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6665# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6666# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6667# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6668# to use the configure naming style.
6669
6670
6671
6672
6673
6674    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6675    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6676    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6677    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6678    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6679    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6680
6681
6682
6683    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6684
6685  case "$build_os" in
6686    *linux*)
6687      VAR_OS=linux
6688      VAR_OS_API=posix
6689      VAR_OS_ENV=linux
6690      ;;
6691    *solaris*)
6692      VAR_OS=solaris
6693      VAR_OS_API=posix
6694      VAR_OS_ENV=solaris
6695      ;;
6696    *darwin*)
6697      VAR_OS=macosx
6698      VAR_OS_API=posix
6699      VAR_OS_ENV=macosx
6700      ;;
6701    *bsd*)
6702      VAR_OS=bsd
6703      VAR_OS_API=posix
6704      VAR_OS_ENV=bsd
6705      ;;
6706    *cygwin*)
6707      VAR_OS=windows
6708      VAR_OS_API=winapi
6709      VAR_OS_ENV=windows.cygwin
6710      ;;
6711    *mingw*)
6712      VAR_OS=windows
6713      VAR_OS_API=winapi
6714      VAR_OS_ENV=windows.msys
6715      ;;
6716    *)
6717      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6718      ;;
6719  esac
6720
6721
6722  # First argument is the cpu name from the trip/quad
6723  case "$build_cpu" in
6724    x86_64)
6725      VAR_CPU=x86_64
6726      VAR_CPU_ARCH=x86
6727      VAR_CPU_BITS=64
6728      VAR_CPU_ENDIAN=little
6729      ;;
6730    i?86)
6731      VAR_CPU=x86
6732      VAR_CPU_ARCH=x86
6733      VAR_CPU_BITS=32
6734      VAR_CPU_ENDIAN=little
6735      ;;
6736    arm*)
6737      VAR_CPU=arm
6738      VAR_CPU_ARCH=arm
6739      VAR_CPU_BITS=32
6740      VAR_CPU_ENDIAN=little
6741      ;;
6742    powerpc)
6743      VAR_CPU=ppc
6744      VAR_CPU_ARCH=ppc
6745      VAR_CPU_BITS=32
6746      VAR_CPU_ENDIAN=big
6747       ;;
6748    powerpc64)
6749      VAR_CPU=ppc64
6750      VAR_CPU_ARCH=ppc
6751      VAR_CPU_BITS=64
6752      VAR_CPU_ENDIAN=big
6753       ;;
6754    sparc)
6755      VAR_CPU=sparc
6756      VAR_CPU_ARCH=sparc
6757      VAR_CPU_BITS=32
6758      VAR_CPU_ENDIAN=big
6759       ;;
6760    sparcv9)
6761      VAR_CPU=sparcv9
6762      VAR_CPU_ARCH=sparc
6763      VAR_CPU_BITS=64
6764      VAR_CPU_ENDIAN=big
6765       ;;
6766    *)
6767      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6768      ;;
6769  esac
6770
6771    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6772    OPENJDK_BUILD_OS="$VAR_OS"
6773    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6774    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6775    OPENJDK_BUILD_CPU="$VAR_CPU"
6776    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6777    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6778    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6779
6780
6781
6782
6783
6784
6785
6786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6787$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6789$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6790
6791    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6792
6793  case "$host_os" in
6794    *linux*)
6795      VAR_OS=linux
6796      VAR_OS_API=posix
6797      VAR_OS_ENV=linux
6798      ;;
6799    *solaris*)
6800      VAR_OS=solaris
6801      VAR_OS_API=posix
6802      VAR_OS_ENV=solaris
6803      ;;
6804    *darwin*)
6805      VAR_OS=macosx
6806      VAR_OS_API=posix
6807      VAR_OS_ENV=macosx
6808      ;;
6809    *bsd*)
6810      VAR_OS=bsd
6811      VAR_OS_API=posix
6812      VAR_OS_ENV=bsd
6813      ;;
6814    *cygwin*)
6815      VAR_OS=windows
6816      VAR_OS_API=winapi
6817      VAR_OS_ENV=windows.cygwin
6818      ;;
6819    *mingw*)
6820      VAR_OS=windows
6821      VAR_OS_API=winapi
6822      VAR_OS_ENV=windows.msys
6823      ;;
6824    *)
6825      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6826      ;;
6827  esac
6828
6829
6830  # First argument is the cpu name from the trip/quad
6831  case "$host_cpu" in
6832    x86_64)
6833      VAR_CPU=x86_64
6834      VAR_CPU_ARCH=x86
6835      VAR_CPU_BITS=64
6836      VAR_CPU_ENDIAN=little
6837      ;;
6838    i?86)
6839      VAR_CPU=x86
6840      VAR_CPU_ARCH=x86
6841      VAR_CPU_BITS=32
6842      VAR_CPU_ENDIAN=little
6843      ;;
6844    arm*)
6845      VAR_CPU=arm
6846      VAR_CPU_ARCH=arm
6847      VAR_CPU_BITS=32
6848      VAR_CPU_ENDIAN=little
6849      ;;
6850    powerpc)
6851      VAR_CPU=ppc
6852      VAR_CPU_ARCH=ppc
6853      VAR_CPU_BITS=32
6854      VAR_CPU_ENDIAN=big
6855       ;;
6856    powerpc64)
6857      VAR_CPU=ppc64
6858      VAR_CPU_ARCH=ppc
6859      VAR_CPU_BITS=64
6860      VAR_CPU_ENDIAN=big
6861       ;;
6862    sparc)
6863      VAR_CPU=sparc
6864      VAR_CPU_ARCH=sparc
6865      VAR_CPU_BITS=32
6866      VAR_CPU_ENDIAN=big
6867       ;;
6868    sparcv9)
6869      VAR_CPU=sparcv9
6870      VAR_CPU_ARCH=sparc
6871      VAR_CPU_BITS=64
6872      VAR_CPU_ENDIAN=big
6873       ;;
6874    *)
6875      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6876      ;;
6877  esac
6878
6879    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6880    OPENJDK_TARGET_OS="$VAR_OS"
6881    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6882    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6883    OPENJDK_TARGET_CPU="$VAR_CPU"
6884    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6885    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6886    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6887
6888
6889
6890
6891
6892
6893
6894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6895$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6897$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6898
6899
6900
6901# Check whether --with-target-bits was given.
6902if test "${with_target_bits+set}" = set; then :
6903  withval=$with_target_bits;
6904fi
6905
6906
6907  # We have three types of compiles:
6908  # native  == normal compilation, target system == build system
6909  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6910  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6911  #
6912  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6913    # We're doing a proper cross-compilation
6914    COMPILE_TYPE="cross"
6915  else
6916    COMPILE_TYPE="native"
6917  fi
6918
6919  if test "x$with_target_bits" != x; then
6920    if test "x$COMPILE_TYPE" = "xcross"; then
6921      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6922    fi
6923
6924    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6925      # A reduced build is requested
6926      COMPILE_TYPE="reduced"
6927      OPENJDK_TARGET_CPU_BITS=32
6928      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6929        OPENJDK_TARGET_CPU=x86
6930      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6931        OPENJDK_TARGET_CPU=sparc
6932      else
6933        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6934      fi
6935    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6936      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
6937    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6938      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6939$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6940    else
6941      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6942    fi
6943  fi
6944
6945
6946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6947$as_echo_n "checking compilation type... " >&6; }
6948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6949$as_echo "$COMPILE_TYPE" >&6; }
6950
6951
6952    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6953       REQUIRED_OS_NAME=SunOS
6954       REQUIRED_OS_VERSION=5.10
6955    fi
6956    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6957       REQUIRED_OS_NAME=Linux
6958       REQUIRED_OS_VERSION=2.6
6959    fi
6960    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6961        REQUIRED_OS_NAME=Windows
6962        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6963            REQUIRED_OS_VERSION=5.2
6964        else
6965            REQUIRED_OS_VERSION=5.1
6966        fi
6967    fi
6968    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6969        REQUIRED_OS_NAME=Darwin
6970        REQUIRED_OS_VERSION=11.2
6971    fi
6972
6973
6974
6975
6976
6977    # Also store the legacy naming of the cpu.
6978    # Ie i586 and amd64 instead of x86 and x86_64
6979    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6980    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6981      OPENJDK_TARGET_CPU_LEGACY="i586"
6982    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6983      # On all platforms except MacOSX replace x86_64 with amd64.
6984      OPENJDK_TARGET_CPU_LEGACY="amd64"
6985    fi
6986
6987
6988    # And the second legacy naming of the cpu.
6989    # Ie i386 and amd64 instead of x86 and x86_64.
6990    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6991    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6992      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6993    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6994      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6995    fi
6996
6997
6998    # This is the name of the cpu (but using i386 and amd64 instead of
6999    # x86 and x86_64, respectively), preceeded by a /, to be used when
7000    # locating libraries. On macosx, it's empty, though.
7001    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7002    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7003        OPENJDK_TARGET_CPU_LIBDIR=""
7004    fi
7005
7006
7007    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7008    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7009    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7010    OPENJDK_TARGET_CPU_ISADIR=""
7011    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7012      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7013          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7014      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7015          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7016      fi
7017    fi
7018
7019
7020    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7021    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7022    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7023      # On linux only, we replace x86 with i386.
7024      OPENJDK_TARGET_CPU_OSARCH="i386"
7025    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7026      # On all platforms except macosx, we replace x86_64 with amd64.
7027      OPENJDK_TARGET_CPU_OSARCH="amd64"
7028    fi
7029
7030
7031    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7032    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7033      OPENJDK_TARGET_CPU_JLI="i386"
7034    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7035      # On all platforms except macosx, we replace x86_64 with amd64.
7036      OPENJDK_TARGET_CPU_JLI="amd64"
7037    fi
7038    # Now setup the -D flags for building libjli.
7039    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7040    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7041      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7042        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7043      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7044        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7045      fi
7046    fi
7047
7048
7049    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7050    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7051        OPENJDK_TARGET_OS_API_DIR="solaris"
7052    fi
7053    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7054        OPENJDK_TARGET_OS_API_DIR="windows"
7055    fi
7056
7057
7058    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7059        A_LP64="LP64:="
7060        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7061        # unpack200.exe
7062        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7063            ADD_LP64="-D_LP64=1"
7064        fi
7065    fi
7066    LP64=$A_LP64
7067
7068
7069    if test "x$COMPILE_TYPE" = "xcross"; then
7070      # FIXME: ... or should this include reduced builds..?
7071      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7072    else
7073      DEFINE_CROSS_COMPILE_ARCH=""
7074    fi
7075
7076
7077    # ZERO_ARCHDEF is used to enable architecture-specific code
7078    case "${OPENJDK_TARGET_CPU}" in
7079      ppc*)    ZERO_ARCHDEF=PPC   ;;
7080      s390*)   ZERO_ARCHDEF=S390  ;;
7081      sparc*)  ZERO_ARCHDEF=SPARC ;;
7082      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7083      x86)     ZERO_ARCHDEF=IA32  ;;
7084      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7085    esac
7086
7087
7088
7089
7090
7091# Continue setting up basic stuff. Most remaining code require fundamental tools.
7092
7093# Locate the directory of this script.
7094SCRIPT="$0"
7095AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7096
7097# Where is the source? It is located two levels above the configure script.
7098CURDIR="$PWD"
7099cd "$AUTOCONF_DIR/../.."
7100SRC_ROOT="`$THEPWDCMD -L`"
7101
7102if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7103  PATH_SEP=";"
7104
7105  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7106  if test $SRC_ROOT_LENGTH -gt 100; then
7107      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7108  fi
7109
7110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7112$as_echo_n "checking cygwin release... " >&6; }
7113    CYGWIN_VERSION=`$UNAME -r`
7114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7115$as_echo "$CYGWIN_VERSION" >&6; }
7116    WINDOWS_ENV_VENDOR='cygwin'
7117    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7118
7119    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7120    if test "x$CYGWIN_VERSION_OK" = x; then
7121      { $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
7122$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;}
7123      as_fn_error $? "Cannot continue" "$LINENO" 5
7124    fi
7125    if test "x$CYGPATH" = x; then
7126        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7127    fi
7128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7129$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7130    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7131    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7132    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7133    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7135$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7136    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7137    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7138    if test "x$test_cygdrive_prefix" = x; then
7139        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7140    fi
7141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7143$as_echo_n "checking msys release... " >&6; }
7144    MSYS_VERSION=`$UNAME -r`
7145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7146$as_echo "$MSYS_VERSION" >&6; }
7147
7148    WINDOWS_ENV_VENDOR='msys'
7149    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7150
7151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7152$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7153    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7154    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7155
7156  windows_path="$MSYS_ROOT_PATH"
7157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7158    unix_path=`$CYGPATH -u "$windows_path"`
7159    MSYS_ROOT_PATH="$unix_path"
7160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7162    MSYS_ROOT_PATH="$unix_path"
7163  fi
7164
7165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7166$as_echo "$MSYS_ROOT_PATH" >&6; }
7167    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7168  else
7169    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7170  fi
7171
7172  # Test if windows or unix (cygwin/msys) find is first in path.
7173  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7174$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7175  FIND_BINARY_OUTPUT=`find --version 2>&1`
7176  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7178$as_echo "unix style" >&6; }
7179  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7181$as_echo "Windows" >&6; }
7182    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7183$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7184    { $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
7185$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7186    as_fn_error $? "Cannot continue" "$LINENO" 5
7187  else
7188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7189$as_echo "unknown" >&6; }
7190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7191$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7192  fi
7193
7194else
7195  PATH_SEP=":"
7196fi
7197
7198
7199
7200cd "$CURDIR"
7201
7202
7203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7204
7205  # Input might be given as Windows format, start by converting to
7206  # unix format.
7207  path="$SRC_ROOT"
7208  new_path=`$CYGPATH -u "$path"`
7209
7210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7213  # "foo.exe" is OK but "foo" is an error.
7214  #
7215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7216  # It is also a way to make sure we got the proper file name for the real test later on.
7217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7218  if test "x$test_shortpath" = x; then
7219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7220$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7221    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7222  fi
7223
7224  # Call helper function which possibly converts this using DOS-style short mode.
7225  # If so, the updated path is stored in $new_path.
7226
7227  input_path="$new_path"
7228  # Check if we need to convert this using DOS-style short mode. If the path
7229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7230  # take no chances and rewrite it.
7231  # Note: m4 eats our [], so we need to use [ and ] instead.
7232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7233  if test "x$has_forbidden_chars" != x; then
7234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7238      # Going to short mode and back again did indeed matter. Since short mode is
7239      # case insensitive, let's make it lowercase to improve readability.
7240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7241      # Now convert it back to Unix-stile (cygpath)
7242      input_path=`$CYGPATH -u "$shortmode_path"`
7243      new_path="$input_path"
7244    fi
7245  fi
7246
7247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7248  if test "x$test_cygdrive_prefix" = x; then
7249    # As a simple fix, exclude /usr/bin since it's not a real path.
7250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7252      # a path prefixed by /cygdrive for fixpath to work.
7253      new_path="$CYGWIN_ROOT_PATH$input_path"
7254    fi
7255  fi
7256
7257
7258  if test "x$path" != "x$new_path"; then
7259    SRC_ROOT="$new_path"
7260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7261$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7262  fi
7263
7264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7265
7266  path="$SRC_ROOT"
7267  has_colon=`$ECHO $path | $GREP ^.:`
7268  new_path="$path"
7269  if test "x$has_colon" = x; then
7270    # Not in mixed or Windows style, start by that.
7271    new_path=`cmd //c echo $path`
7272  fi
7273
7274
7275  input_path="$new_path"
7276  # Check if we need to convert this using DOS-style short mode. If the path
7277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7278  # take no chances and rewrite it.
7279  # Note: m4 eats our [], so we need to use [ and ] instead.
7280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7281  if test "x$has_forbidden_chars" != x; then
7282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7284  fi
7285
7286
7287  windows_path="$new_path"
7288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7289    unix_path=`$CYGPATH -u "$windows_path"`
7290    new_path="$unix_path"
7291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7293    new_path="$unix_path"
7294  fi
7295
7296  if test "x$path" != "x$new_path"; then
7297    SRC_ROOT="$new_path"
7298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7299$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7300  fi
7301
7302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7304
7305  else
7306    # We're on a posix platform. Hooray! :)
7307    path="$SRC_ROOT"
7308    has_space=`$ECHO "$path" | $GREP " "`
7309    if test "x$has_space" != x; then
7310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7311$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7312      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7313    fi
7314
7315    # Use eval to expand a potential ~
7316    eval path="$path"
7317    if test ! -f "$path" && test ! -d "$path"; then
7318      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7319    fi
7320
7321    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7322  fi
7323
7324
7325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7326
7327  # Input might be given as Windows format, start by converting to
7328  # unix format.
7329  path="$CURDIR"
7330  new_path=`$CYGPATH -u "$path"`
7331
7332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7335  # "foo.exe" is OK but "foo" is an error.
7336  #
7337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7338  # It is also a way to make sure we got the proper file name for the real test later on.
7339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7340  if test "x$test_shortpath" = x; then
7341    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7342$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7343    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7344  fi
7345
7346  # Call helper function which possibly converts this using DOS-style short mode.
7347  # If so, the updated path is stored in $new_path.
7348
7349  input_path="$new_path"
7350  # Check if we need to convert this using DOS-style short mode. If the path
7351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7352  # take no chances and rewrite it.
7353  # Note: m4 eats our [], so we need to use [ and ] instead.
7354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7355  if test "x$has_forbidden_chars" != x; then
7356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7360      # Going to short mode and back again did indeed matter. Since short mode is
7361      # case insensitive, let's make it lowercase to improve readability.
7362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7363      # Now convert it back to Unix-stile (cygpath)
7364      input_path=`$CYGPATH -u "$shortmode_path"`
7365      new_path="$input_path"
7366    fi
7367  fi
7368
7369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7370  if test "x$test_cygdrive_prefix" = x; then
7371    # As a simple fix, exclude /usr/bin since it's not a real path.
7372    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7374      # a path prefixed by /cygdrive for fixpath to work.
7375      new_path="$CYGWIN_ROOT_PATH$input_path"
7376    fi
7377  fi
7378
7379
7380  if test "x$path" != "x$new_path"; then
7381    CURDIR="$new_path"
7382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7383$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7384  fi
7385
7386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7387
7388  path="$CURDIR"
7389  has_colon=`$ECHO $path | $GREP ^.:`
7390  new_path="$path"
7391  if test "x$has_colon" = x; then
7392    # Not in mixed or Windows style, start by that.
7393    new_path=`cmd //c echo $path`
7394  fi
7395
7396
7397  input_path="$new_path"
7398  # Check if we need to convert this using DOS-style short mode. If the path
7399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7400  # take no chances and rewrite it.
7401  # Note: m4 eats our [], so we need to use [ and ] instead.
7402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7403  if test "x$has_forbidden_chars" != x; then
7404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7406  fi
7407
7408
7409  windows_path="$new_path"
7410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7411    unix_path=`$CYGPATH -u "$windows_path"`
7412    new_path="$unix_path"
7413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7415    new_path="$unix_path"
7416  fi
7417
7418  if test "x$path" != "x$new_path"; then
7419    CURDIR="$new_path"
7420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7421$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7422  fi
7423
7424  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7425  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7426
7427  else
7428    # We're on a posix platform. Hooray! :)
7429    path="$CURDIR"
7430    has_space=`$ECHO "$path" | $GREP " "`
7431    if test "x$has_space" != x; then
7432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7433$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7434      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7435    fi
7436
7437    # Use eval to expand a potential ~
7438    eval path="$path"
7439    if test ! -f "$path" && test ! -d "$path"; then
7440      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7441    fi
7442
7443    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7444  fi
7445
7446
7447if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7448    # Add extra search paths on solaris for utilities like ar and as etc...
7449    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7450fi
7451
7452# You can force the sys-root if the sys-root encoded into the cross compiler tools
7453# is not correct.
7454
7455# Check whether --with-sys-root was given.
7456if test "${with_sys_root+set}" = set; then :
7457  withval=$with_sys_root;
7458fi
7459
7460
7461if test "x$with_sys_root" != x; then
7462  SYS_ROOT=$with_sys_root
7463else
7464  SYS_ROOT=/
7465fi
7466
7467
7468
7469# Check whether --with-tools-dir was given.
7470if test "${with_tools_dir+set}" = set; then :
7471  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7472
7473fi
7474
7475
7476
7477# Check whether --with-devkit was given.
7478if test "${with_devkit+set}" = set; then :
7479  withval=$with_devkit;
7480    if test "x$with_sys_root" != x; then
7481      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7482    fi
7483
7484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7485
7486  # Input might be given as Windows format, start by converting to
7487  # unix format.
7488  path="$with_devkit"
7489  new_path=`$CYGPATH -u "$path"`
7490
7491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7494  # "foo.exe" is OK but "foo" is an error.
7495  #
7496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7497  # It is also a way to make sure we got the proper file name for the real test later on.
7498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7499  if test "x$test_shortpath" = x; then
7500    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7501$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7502    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7503  fi
7504
7505  # Call helper function which possibly converts this using DOS-style short mode.
7506  # If so, the updated path is stored in $new_path.
7507
7508  input_path="$new_path"
7509  # Check if we need to convert this using DOS-style short mode. If the path
7510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7511  # take no chances and rewrite it.
7512  # Note: m4 eats our [], so we need to use [ and ] instead.
7513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7514  if test "x$has_forbidden_chars" != x; then
7515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7519      # Going to short mode and back again did indeed matter. Since short mode is
7520      # case insensitive, let's make it lowercase to improve readability.
7521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7522      # Now convert it back to Unix-stile (cygpath)
7523      input_path=`$CYGPATH -u "$shortmode_path"`
7524      new_path="$input_path"
7525    fi
7526  fi
7527
7528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7529  if test "x$test_cygdrive_prefix" = x; then
7530    # As a simple fix, exclude /usr/bin since it's not a real path.
7531    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7533      # a path prefixed by /cygdrive for fixpath to work.
7534      new_path="$CYGWIN_ROOT_PATH$input_path"
7535    fi
7536  fi
7537
7538
7539  if test "x$path" != "x$new_path"; then
7540    with_devkit="$new_path"
7541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7542$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7543  fi
7544
7545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7546
7547  path="$with_devkit"
7548  has_colon=`$ECHO $path | $GREP ^.:`
7549  new_path="$path"
7550  if test "x$has_colon" = x; then
7551    # Not in mixed or Windows style, start by that.
7552    new_path=`cmd //c echo $path`
7553  fi
7554
7555
7556  input_path="$new_path"
7557  # Check if we need to convert this using DOS-style short mode. If the path
7558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7559  # take no chances and rewrite it.
7560  # Note: m4 eats our [], so we need to use [ and ] instead.
7561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7562  if test "x$has_forbidden_chars" != x; then
7563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7565  fi
7566
7567
7568  windows_path="$new_path"
7569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7570    unix_path=`$CYGPATH -u "$windows_path"`
7571    new_path="$unix_path"
7572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7574    new_path="$unix_path"
7575  fi
7576
7577  if test "x$path" != "x$new_path"; then
7578    with_devkit="$new_path"
7579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7580$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7581  fi
7582
7583  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7584  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7585
7586  else
7587    # We're on a posix platform. Hooray! :)
7588    path="$with_devkit"
7589    has_space=`$ECHO "$path" | $GREP " "`
7590    if test "x$has_space" != x; then
7591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7592$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7593      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7594    fi
7595
7596    # Use eval to expand a potential ~
7597    eval path="$path"
7598    if test ! -f "$path" && test ! -d "$path"; then
7599      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7600    fi
7601
7602    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7603  fi
7604
7605
7606  if test "x$TOOLS_DIR" = x; then
7607    TOOLS_DIR="$with_devkit/bin"
7608  else
7609    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7610  fi
7611
7612    if test -d "$with_devkit/$host_alias/libc"; then
7613      SYS_ROOT=$with_devkit/$host_alias/libc
7614    elif test -d "$with_devkit/$host/sys-root"; then
7615      SYS_ROOT=$with_devkit/$host/sys-root
7616    fi
7617
7618fi
7619
7620
7621
7622# Setup default logging of stdout and stderr to build.log in the output root.
7623BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7624BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7625BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7626
7627
7628
7629
7630
7631# Check if it's a pure open build or if custom sources are to be used.
7632
7633  # Check whether --enable-openjdk-only was given.
7634if test "${enable_openjdk_only+set}" = set; then :
7635  enableval=$enable_openjdk_only;
7636else
7637  enable_openjdk_only="no"
7638fi
7639
7640
7641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7642$as_echo_n "checking for presence of closed sources... " >&6; }
7643  if test -d "$SRC_ROOT/jdk/src/closed"; then
7644    CLOSED_SOURCE_PRESENT=yes
7645  else
7646    CLOSED_SOURCE_PRESENT=no
7647  fi
7648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7649$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7650
7651  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7652$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7653  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7655$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7656
7657  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7658    OPENJDK=true
7659    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7660      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7661$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7662    fi
7663  else
7664    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7665      OPENJDK=true
7666    else
7667      OPENJDK=false
7668    fi
7669  fi
7670
7671  if test "x$OPENJDK" = "xtrue"; then
7672    SET_OPENJDK="OPENJDK=true"
7673  fi
7674
7675
7676
7677
7678# These are needed to be able to create a configuration name (and thus the output directory)
7679
7680###############################################################################
7681#
7682# Check which variant of the JDK that we want to build.
7683# Currently we have:
7684#    normal:   standard edition
7685# but the custom make system may add other variants
7686#
7687# Effectively the JDK variant gives a name to a specific set of
7688# modules to compile into the JDK. In the future, these modules
7689# might even be Jigsaw modules.
7690#
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7692$as_echo_n "checking which variant of the JDK to build... " >&6; }
7693
7694# Check whether --with-jdk-variant was given.
7695if test "${with_jdk_variant+set}" = set; then :
7696  withval=$with_jdk_variant;
7697fi
7698
7699
7700if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7701    JDK_VARIANT="normal"
7702else
7703    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7704fi
7705
7706
7707
7708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7709$as_echo "$JDK_VARIANT" >&6; }
7710
7711
7712
7713###############################################################################
7714#
7715# Check which variants of the JVM that we want to build.
7716# Currently we have:
7717#    server: normal interpreter and a tiered C1/C2 compiler
7718#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7719#    minimal1: reduced form of client with optional VM services and features stripped out
7720#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7721#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7722#    zero: no machine code interpreter, no compiler
7723#    zeroshark: zero interpreter and shark/llvm compiler backend
7724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7725$as_echo_n "checking which variants of the JVM to build... " >&6; }
7726
7727# Check whether --with-jvm-variants was given.
7728if test "${with_jvm_variants+set}" = set; then :
7729  withval=$with_jvm_variants;
7730fi
7731
7732
7733if test "x$with_jvm_variants" = x; then
7734     with_jvm_variants="server"
7735fi
7736
7737JVM_VARIANTS=",$with_jvm_variants,"
7738TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7739
7740if test "x$TEST_VARIANTS" != "x,"; then
7741   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7742fi
7743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7744$as_echo "$with_jvm_variants" >&6; }
7745
7746JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7747JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7748JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7749JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7750JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7751JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7752
7753if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7754    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7755        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7756    fi
7757fi
7758if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7759    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7760        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7761    fi
7762fi
7763if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7764    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7765        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7766    fi
7767fi
7768
7769# Replace the commas with AND for use in the build directory name.
7770ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7771COUNT_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/'`
7772if test "x$COUNT_VARIANTS" != "x,1"; then
7773    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7774else
7775    BUILDING_MULTIPLE_JVM_VARIANTS=no
7776fi
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786INCLUDE_SA=true
7787if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7788    INCLUDE_SA=false
7789fi
7790if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7791    INCLUDE_SA=false
7792fi
7793
7794
7795if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7796   MACOSX_UNIVERSAL="true"
7797fi
7798
7799
7800
7801
7802
7803###############################################################################
7804#
7805# Set the debug level
7806#    release: no debug information, all optimizations, no asserts.
7807#    fastdebug: debug information (-g), all optimizations, all asserts
7808#    slowdebug: debug information (-g), no optimizations, all asserts
7809#
7810DEBUG_LEVEL="release"
7811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7812$as_echo_n "checking which debug level to use... " >&6; }
7813# Check whether --enable-debug was given.
7814if test "${enable_debug+set}" = set; then :
7815  enableval=$enable_debug;
7816        ENABLE_DEBUG="${enableval}"
7817        DEBUG_LEVEL="fastdebug"
7818
7819else
7820  ENABLE_DEBUG="no"
7821fi
7822
7823
7824
7825# Check whether --with-debug-level was given.
7826if test "${with_debug_level+set}" = set; then :
7827  withval=$with_debug_level;
7828        DEBUG_LEVEL="${withval}"
7829        if test "x$ENABLE_DEBUG" = xyes; then
7830			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7831        fi
7832
7833fi
7834
7835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7836$as_echo "$DEBUG_LEVEL" >&6; }
7837
7838if test "x$DEBUG_LEVEL" != xrelease && \
7839   test "x$DEBUG_LEVEL" != xfastdebug && \
7840   test "x$DEBUG_LEVEL" != xslowdebug; then
7841   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7842fi
7843
7844
7845###############################################################################
7846#
7847# Setup legacy vars/targets and new vars to deal with different debug levels.
7848#
7849
7850case $DEBUG_LEVEL in
7851      release )
7852          VARIANT="OPT"
7853          FASTDEBUG="false"
7854          DEBUG_CLASSFILES="false"
7855          BUILD_VARIANT_RELEASE=""
7856          HOTSPOT_DEBUG_LEVEL="product"
7857          HOTSPOT_EXPORT="product"
7858           ;;
7859      fastdebug )
7860          VARIANT="DBG"
7861          FASTDEBUG="true"
7862          DEBUG_CLASSFILES="true"
7863          BUILD_VARIANT_RELEASE="-fastdebug"
7864          HOTSPOT_DEBUG_LEVEL="fastdebug"
7865          HOTSPOT_EXPORT="fastdebug"
7866           ;;
7867      slowdebug )
7868          VARIANT="DBG"
7869          FASTDEBUG="false"
7870          DEBUG_CLASSFILES="true"
7871          BUILD_VARIANT_RELEASE="-debug"
7872          HOTSPOT_DEBUG_LEVEL="jvmg"
7873          HOTSPOT_EXPORT="debug"
7874           ;;
7875esac
7876
7877#####
7878# Generate the legacy makefile targets for hotspot.
7879# The hotspot api for selecting the build artifacts, really, needs to be improved.
7880# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7881# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7882# But until then ...
7883HOTSPOT_TARGET=""
7884
7885if test "x$JVM_VARIANT_SERVER" = xtrue; then
7886    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7887fi
7888
7889if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7890    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7891fi
7892
7893if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7894    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7895fi
7896
7897if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7898    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7899fi
7900
7901if test "x$JVM_VARIANT_ZERO" = xtrue; then
7902    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7903fi
7904
7905if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7906    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7907fi
7908
7909HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7910
7911# On Macosx universal binaries are produced, but they only contain
7912# 64 bit intel. This invalidates control of which jvms are built
7913# from configure, but only server is valid anyway. Fix this
7914# when hotspot makefiles are rewritten.
7915if test "x$MACOSX_UNIVERSAL" = xtrue; then
7916    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7917fi
7918
7919#####
7920
7921
7922
7923
7924
7925
7926
7927
7928# With basic setup done, call the custom early hook.
7929
7930
7931# To properly create a configuration name, we need to have the OpenJDK target
7932# and options (variants and debug level) parsed.
7933
7934
7935
7936# Check whether --with-conf-name was given.
7937if test "${with_conf_name+set}" = set; then :
7938  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7939fi
7940
7941
7942# Test from where we are running configure, in or outside of src root.
7943if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7944        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7945        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7946    # We are running configure from the src root.
7947    # Create a default ./build/target-variant-debuglevel output root.
7948    if test "x${CONF_NAME}" = x; then
7949        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7950    fi
7951    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7952    $MKDIR -p "$OUTPUT_ROOT"
7953    if test ! -d "$OUTPUT_ROOT"; then
7954        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7955    fi
7956else
7957    # We are running configure from outside of the src dir.
7958    # Then use the current directory as output dir!
7959    # If configuration is situated in normal build directory, just use the build
7960    # directory name as configuration name, otherwise use the complete path.
7961    if test "x${CONF_NAME}" = x; then
7962        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7963    fi
7964    OUTPUT_ROOT="$CURDIR"
7965
7966    # WARNING: This might be a bad thing to do. You need to be sure you want to
7967    # have a configuration in this directory. Do some sanity checks!
7968
7969    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7970      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7971      # other files
7972      files_present=`$LS $OUTPUT_ROOT`
7973      # Configure has already touched config.log and confdefs.h in the current dir when this check
7974      # is performed.
7975      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7976                                             | $TR -d '\n'`
7977      if test "x$filtered_files" != x; then
7978        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7979$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7980        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7981$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7982        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7983$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7984        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7985$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7986        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7987$as_echo "$as_me: seriously mess up just about everything." >&6;}
7988        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7989$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7990        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7991$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7992        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7993      fi
7994    fi
7995fi
7996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7997$as_echo_n "checking what configuration name to use... " >&6; }
7998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7999$as_echo "$CONF_NAME" >&6; }
8000
8001
8002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8003
8004  # Input might be given as Windows format, start by converting to
8005  # unix format.
8006  path="$OUTPUT_ROOT"
8007  new_path=`$CYGPATH -u "$path"`
8008
8009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8012  # "foo.exe" is OK but "foo" is an error.
8013  #
8014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8015  # It is also a way to make sure we got the proper file name for the real test later on.
8016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8017  if test "x$test_shortpath" = x; then
8018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8019$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8020    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8021  fi
8022
8023  # Call helper function which possibly converts this using DOS-style short mode.
8024  # If so, the updated path is stored in $new_path.
8025
8026  input_path="$new_path"
8027  # Check if we need to convert this using DOS-style short mode. If the path
8028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8029  # take no chances and rewrite it.
8030  # Note: m4 eats our [], so we need to use [ and ] instead.
8031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8032  if test "x$has_forbidden_chars" != x; then
8033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8037      # Going to short mode and back again did indeed matter. Since short mode is
8038      # case insensitive, let's make it lowercase to improve readability.
8039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8040      # Now convert it back to Unix-stile (cygpath)
8041      input_path=`$CYGPATH -u "$shortmode_path"`
8042      new_path="$input_path"
8043    fi
8044  fi
8045
8046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8047  if test "x$test_cygdrive_prefix" = x; then
8048    # As a simple fix, exclude /usr/bin since it's not a real path.
8049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8051      # a path prefixed by /cygdrive for fixpath to work.
8052      new_path="$CYGWIN_ROOT_PATH$input_path"
8053    fi
8054  fi
8055
8056
8057  if test "x$path" != "x$new_path"; then
8058    OUTPUT_ROOT="$new_path"
8059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8060$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8061  fi
8062
8063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8064
8065  path="$OUTPUT_ROOT"
8066  has_colon=`$ECHO $path | $GREP ^.:`
8067  new_path="$path"
8068  if test "x$has_colon" = x; then
8069    # Not in mixed or Windows style, start by that.
8070    new_path=`cmd //c echo $path`
8071  fi
8072
8073
8074  input_path="$new_path"
8075  # Check if we need to convert this using DOS-style short mode. If the path
8076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8077  # take no chances and rewrite it.
8078  # Note: m4 eats our [], so we need to use [ and ] instead.
8079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8080  if test "x$has_forbidden_chars" != x; then
8081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8083  fi
8084
8085
8086  windows_path="$new_path"
8087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8088    unix_path=`$CYGPATH -u "$windows_path"`
8089    new_path="$unix_path"
8090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8092    new_path="$unix_path"
8093  fi
8094
8095  if test "x$path" != "x$new_path"; then
8096    OUTPUT_ROOT="$new_path"
8097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8098$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8099  fi
8100
8101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8103
8104  else
8105    # We're on a posix platform. Hooray! :)
8106    path="$OUTPUT_ROOT"
8107    has_space=`$ECHO "$path" | $GREP " "`
8108    if test "x$has_space" != x; then
8109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8110$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8111      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8112    fi
8113
8114    # Use eval to expand a potential ~
8115    eval path="$path"
8116    if test ! -f "$path" && test ! -d "$path"; then
8117      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8118    fi
8119
8120    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8121  fi
8122
8123
8124SPEC=$OUTPUT_ROOT/spec.gmk
8125
8126CONF_NAME=$CONF_NAME
8127
8128OUTPUT_ROOT=$OUTPUT_ROOT
8129
8130
8131# Most of the probed defines are put into config.h
8132ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8133
8134# The spec.gmk file contains all variables for the make system.
8135ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8136
8137# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8138ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8139
8140# The bootcycle-spec.gmk file contains support for boot cycle builds.
8141ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8142
8143# The compare.sh is used to compare the build output to other builds.
8144ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8145
8146# Spec.sh is currently used by compare-objects.sh
8147ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8148
8149# The generated Makefile knows where the spec.gmk is and where the source is.
8150# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8151# which will look for generated configurations
8152ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8153
8154
8155# Save the arguments given to us
8156echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8157
8158
8159# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8160
8161    for ac_prog in apt-get yum port pkgutil pkgadd
8162do
8163  # Extract the first word of "$ac_prog", so it can be a program name with args.
8164set dummy $ac_prog; ac_word=$2
8165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8166$as_echo_n "checking for $ac_word... " >&6; }
8167if ${ac_cv_prog_PKGHANDLER+:} false; then :
8168  $as_echo_n "(cached) " >&6
8169else
8170  if test -n "$PKGHANDLER"; then
8171  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8172else
8173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8174for as_dir in $PATH
8175do
8176  IFS=$as_save_IFS
8177  test -z "$as_dir" && as_dir=.
8178    for ac_exec_ext in '' $ac_executable_extensions; do
8179  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8180    ac_cv_prog_PKGHANDLER="$ac_prog"
8181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8182    break 2
8183  fi
8184done
8185  done
8186IFS=$as_save_IFS
8187
8188fi
8189fi
8190PKGHANDLER=$ac_cv_prog_PKGHANDLER
8191if test -n "$PKGHANDLER"; then
8192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8193$as_echo "$PKGHANDLER" >&6; }
8194else
8195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8196$as_echo "no" >&6; }
8197fi
8198
8199
8200  test -n "$PKGHANDLER" && break
8201done
8202
8203
8204
8205# Setup tools that requires more complex handling, or that is not needed by the configure script.
8206
8207
8208  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8209  if test "x$MAKE" != x; then
8210    # User has supplied a make, test it.
8211    if test ! -f "$MAKE"; then
8212      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8213    fi
8214
8215  MAKE_CANDIDATE=""$MAKE""
8216  DESCRIPTION="user supplied MAKE=$MAKE"
8217  if test "x$MAKE_CANDIDATE" != x; then
8218    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8219$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8220    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8221    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8222    if test "x$IS_GNU_MAKE" = x; then
8223      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8224$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8225    else
8226      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8227      if test "x$IS_MODERN_MAKE" = x; then
8228        { $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
8229$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;}
8230      else
8231        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8232          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8233            MAKE_EXPECTED_ENV='cygwin'
8234          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8235            MAKE_EXPECTED_ENV='msys'
8236          else
8237            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8238          fi
8239          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8240          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8241        else
8242          # Not relevant for non-Windows
8243          IS_MAKE_CORRECT_ENV=true
8244        fi
8245        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8246          { $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
8247$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;}
8248        else
8249          FOUND_MAKE=$MAKE_CANDIDATE
8250
8251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8252
8253  # First separate the path from the arguments. This will split at the first
8254  # space.
8255  complete="$FOUND_MAKE"
8256  path="${complete%% *}"
8257  tmp="$complete EOL"
8258  arguments="${tmp#* }"
8259
8260  # Input might be given as Windows format, start by converting to
8261  # unix format.
8262  new_path=`$CYGPATH -u "$path"`
8263
8264  # Now try to locate executable using which
8265  new_path=`$WHICH "$new_path" 2> /dev/null`
8266  # bat and cmd files are not always considered executable in cygwin causing which
8267  # to not find them
8268  if test "x$new_path" = x \
8269           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8270           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8271    new_path=`$CYGPATH -u "$path"`
8272  fi
8273  if test "x$new_path" = x; then
8274    # Oops. Which didn't find the executable.
8275    # The splitting of arguments from the executable at a space might have been incorrect,
8276    # since paths with space are more likely in Windows. Give it another try with the whole
8277    # argument.
8278    path="$complete"
8279    arguments="EOL"
8280    new_path=`$CYGPATH -u "$path"`
8281    new_path=`$WHICH "$new_path" 2> /dev/null`
8282    # bat and cmd files are not always considered executable in cygwin causing which
8283    # to not find them
8284    if test "x$new_path" = x \
8285             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8286             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8287      new_path=`$CYGPATH -u "$path"`
8288    fi
8289    if test "x$new_path" = x; then
8290      # It's still not found. Now this is an unrecoverable error.
8291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8292$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8293      has_space=`$ECHO "$complete" | $GREP " "`
8294      if test "x$has_space" != x; then
8295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8297      fi
8298      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8299    fi
8300  fi
8301
8302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8305  # "foo.exe" is OK but "foo" is an error.
8306  #
8307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8308  # It is also a way to make sure we got the proper file name for the real test later on.
8309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8310  if test "x$test_shortpath" = x; then
8311    # Short path failed, file does not exist as specified.
8312    # Try adding .exe or .cmd
8313    if test -f "${new_path}.exe"; then
8314       input_to_shortpath="${new_path}.exe"
8315    elif test -f "${new_path}.cmd"; then
8316       input_to_shortpath="${new_path}.cmd"
8317    else
8318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8319$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8322      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8323    fi
8324  else
8325    input_to_shortpath="$new_path"
8326  fi
8327
8328  # Call helper function which possibly converts this using DOS-style short mode.
8329  # If so, the updated path is stored in $new_path.
8330  new_path="$input_to_shortpath"
8331
8332  input_path="$input_to_shortpath"
8333  # Check if we need to convert this using DOS-style short mode. If the path
8334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8335  # take no chances and rewrite it.
8336  # Note: m4 eats our [], so we need to use [ and ] instead.
8337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8338  if test "x$has_forbidden_chars" != x; then
8339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8343      # Going to short mode and back again did indeed matter. Since short mode is
8344      # case insensitive, let's make it lowercase to improve readability.
8345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8346      # Now convert it back to Unix-stile (cygpath)
8347      input_path=`$CYGPATH -u "$shortmode_path"`
8348      new_path="$input_path"
8349    fi
8350  fi
8351
8352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8353  if test "x$test_cygdrive_prefix" = x; then
8354    # As a simple fix, exclude /usr/bin since it's not a real path.
8355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8357      # a path prefixed by /cygdrive for fixpath to work.
8358      new_path="$CYGWIN_ROOT_PATH$input_path"
8359    fi
8360  fi
8361
8362  # remove trailing .exe if any
8363  new_path="${new_path/%.exe/}"
8364
8365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8366
8367  # First separate the path from the arguments. This will split at the first
8368  # space.
8369  complete="$FOUND_MAKE"
8370  path="${complete%% *}"
8371  tmp="$complete EOL"
8372  arguments="${tmp#* }"
8373
8374  # Input might be given as Windows format, start by converting to
8375  # unix format.
8376  new_path="$path"
8377
8378  windows_path="$new_path"
8379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8380    unix_path=`$CYGPATH -u "$windows_path"`
8381    new_path="$unix_path"
8382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8384    new_path="$unix_path"
8385  fi
8386
8387
8388  # Now try to locate executable using which
8389  new_path=`$WHICH "$new_path" 2> /dev/null`
8390
8391  if test "x$new_path" = x; then
8392    # Oops. Which didn't find the executable.
8393    # The splitting of arguments from the executable at a space might have been incorrect,
8394    # since paths with space are more likely in Windows. Give it another try with the whole
8395    # argument.
8396    path="$complete"
8397    arguments="EOL"
8398    new_path="$path"
8399
8400  windows_path="$new_path"
8401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8402    unix_path=`$CYGPATH -u "$windows_path"`
8403    new_path="$unix_path"
8404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8406    new_path="$unix_path"
8407  fi
8408
8409
8410    new_path=`$WHICH "$new_path" 2> /dev/null`
8411
8412    if test "x$new_path" = x; then
8413      # It's still not found. Now this is an unrecoverable error.
8414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8415$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8416      has_space=`$ECHO "$complete" | $GREP " "`
8417      if test "x$has_space" != x; then
8418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8420      fi
8421      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8422    fi
8423  fi
8424
8425  # Now new_path has a complete unix path to the binary
8426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8427    # Keep paths in /bin as-is, but remove trailing .exe if any
8428    new_path="${new_path/%.exe/}"
8429    # Do not save /bin paths to all_fixpath_prefixes!
8430  else
8431    # Not in mixed or Windows style, start by that.
8432    new_path=`cmd //c echo $new_path`
8433
8434  input_path="$new_path"
8435  # Check if we need to convert this using DOS-style short mode. If the path
8436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8437  # take no chances and rewrite it.
8438  # Note: m4 eats our [], so we need to use [ and ] instead.
8439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8440  if test "x$has_forbidden_chars" != x; then
8441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8443  fi
8444
8445    # Output is in $new_path
8446
8447  windows_path="$new_path"
8448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8449    unix_path=`$CYGPATH -u "$windows_path"`
8450    new_path="$unix_path"
8451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8453    new_path="$unix_path"
8454  fi
8455
8456    # remove trailing .exe if any
8457    new_path="${new_path/%.exe/}"
8458
8459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8461  fi
8462
8463  else
8464    # We're on a posix platform. Hooray! :)
8465    # First separate the path from the arguments. This will split at the first
8466    # space.
8467    complete="$FOUND_MAKE"
8468    path="${complete%% *}"
8469    tmp="$complete EOL"
8470    arguments="${tmp#* }"
8471
8472    # Cannot rely on the command "which" here since it doesn't always work.
8473    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8474    if test -z "$is_absolute_path"; then
8475      # Path to executable is not absolute. Find it.
8476      IFS_save="$IFS"
8477      IFS=:
8478      for p in $PATH; do
8479        if test -f "$p/$path" && test -x "$p/$path"; then
8480          new_path="$p/$path"
8481          break
8482        fi
8483      done
8484      IFS="$IFS_save"
8485    else
8486      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8487$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8488      new_path="$path"
8489    fi
8490
8491    if test "x$new_path" = x; then
8492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8493$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8494        has_space=`$ECHO "$complete" | $GREP " "`
8495        if test "x$has_space" != x; then
8496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8498        fi
8499        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8500      fi
8501  fi
8502
8503      # Now join together the path and the arguments once again
8504      if test "x$arguments" != xEOL; then
8505        new_complete="$new_path ${arguments% *}"
8506      else
8507        new_complete="$new_path"
8508      fi
8509
8510  if test "x$complete" != "x$new_complete"; then
8511      FOUND_MAKE="$new_complete"
8512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8513$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8514    fi
8515
8516        fi
8517      fi
8518    fi
8519  fi
8520
8521    if test "x$FOUND_MAKE" = x; then
8522      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8523    fi
8524  else
8525    # Try our hardest to locate a correct version of GNU make
8526    for ac_prog in gmake
8527do
8528  # Extract the first word of "$ac_prog", so it can be a program name with args.
8529set dummy $ac_prog; ac_word=$2
8530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8531$as_echo_n "checking for $ac_word... " >&6; }
8532if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8533  $as_echo_n "(cached) " >&6
8534else
8535  case $CHECK_GMAKE in
8536  [\\/]* | ?:[\\/]*)
8537  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8538  ;;
8539  *)
8540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8541for as_dir in $PATH
8542do
8543  IFS=$as_save_IFS
8544  test -z "$as_dir" && as_dir=.
8545    for ac_exec_ext in '' $ac_executable_extensions; do
8546  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8547    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8549    break 2
8550  fi
8551done
8552  done
8553IFS=$as_save_IFS
8554
8555  ;;
8556esac
8557fi
8558CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8559if test -n "$CHECK_GMAKE"; then
8560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8561$as_echo "$CHECK_GMAKE" >&6; }
8562else
8563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8564$as_echo "no" >&6; }
8565fi
8566
8567
8568  test -n "$CHECK_GMAKE" && break
8569done
8570
8571
8572  MAKE_CANDIDATE=""$CHECK_GMAKE""
8573  DESCRIPTION="gmake in PATH"
8574  if test "x$MAKE_CANDIDATE" != x; then
8575    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8576$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8577    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8578    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8579    if test "x$IS_GNU_MAKE" = x; then
8580      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8581$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8582    else
8583      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8584      if test "x$IS_MODERN_MAKE" = x; then
8585        { $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
8586$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;}
8587      else
8588        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8589          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8590            MAKE_EXPECTED_ENV='cygwin'
8591          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8592            MAKE_EXPECTED_ENV='msys'
8593          else
8594            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8595          fi
8596          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8597          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8598        else
8599          # Not relevant for non-Windows
8600          IS_MAKE_CORRECT_ENV=true
8601        fi
8602        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8603          { $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
8604$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;}
8605        else
8606          FOUND_MAKE=$MAKE_CANDIDATE
8607
8608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8609
8610  # First separate the path from the arguments. This will split at the first
8611  # space.
8612  complete="$FOUND_MAKE"
8613  path="${complete%% *}"
8614  tmp="$complete EOL"
8615  arguments="${tmp#* }"
8616
8617  # Input might be given as Windows format, start by converting to
8618  # unix format.
8619  new_path=`$CYGPATH -u "$path"`
8620
8621  # Now try to locate executable using which
8622  new_path=`$WHICH "$new_path" 2> /dev/null`
8623  # bat and cmd files are not always considered executable in cygwin causing which
8624  # to not find them
8625  if test "x$new_path" = x \
8626           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8627           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8628    new_path=`$CYGPATH -u "$path"`
8629  fi
8630  if test "x$new_path" = x; then
8631    # Oops. Which didn't find the executable.
8632    # The splitting of arguments from the executable at a space might have been incorrect,
8633    # since paths with space are more likely in Windows. Give it another try with the whole
8634    # argument.
8635    path="$complete"
8636    arguments="EOL"
8637    new_path=`$CYGPATH -u "$path"`
8638    new_path=`$WHICH "$new_path" 2> /dev/null`
8639    # bat and cmd files are not always considered executable in cygwin causing which
8640    # to not find them
8641    if test "x$new_path" = x \
8642             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8643             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8644      new_path=`$CYGPATH -u "$path"`
8645    fi
8646    if test "x$new_path" = x; then
8647      # It's still not found. Now this is an unrecoverable error.
8648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8649$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8650      has_space=`$ECHO "$complete" | $GREP " "`
8651      if test "x$has_space" != x; then
8652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8654      fi
8655      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8656    fi
8657  fi
8658
8659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8662  # "foo.exe" is OK but "foo" is an error.
8663  #
8664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8665  # It is also a way to make sure we got the proper file name for the real test later on.
8666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8667  if test "x$test_shortpath" = x; then
8668    # Short path failed, file does not exist as specified.
8669    # Try adding .exe or .cmd
8670    if test -f "${new_path}.exe"; then
8671       input_to_shortpath="${new_path}.exe"
8672    elif test -f "${new_path}.cmd"; then
8673       input_to_shortpath="${new_path}.cmd"
8674    else
8675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8677      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8678$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8679      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8680    fi
8681  else
8682    input_to_shortpath="$new_path"
8683  fi
8684
8685  # Call helper function which possibly converts this using DOS-style short mode.
8686  # If so, the updated path is stored in $new_path.
8687  new_path="$input_to_shortpath"
8688
8689  input_path="$input_to_shortpath"
8690  # Check if we need to convert this using DOS-style short mode. If the path
8691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8692  # take no chances and rewrite it.
8693  # Note: m4 eats our [], so we need to use [ and ] instead.
8694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8695  if test "x$has_forbidden_chars" != x; then
8696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8700      # Going to short mode and back again did indeed matter. Since short mode is
8701      # case insensitive, let's make it lowercase to improve readability.
8702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8703      # Now convert it back to Unix-stile (cygpath)
8704      input_path=`$CYGPATH -u "$shortmode_path"`
8705      new_path="$input_path"
8706    fi
8707  fi
8708
8709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8710  if test "x$test_cygdrive_prefix" = x; then
8711    # As a simple fix, exclude /usr/bin since it's not a real path.
8712    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8714      # a path prefixed by /cygdrive for fixpath to work.
8715      new_path="$CYGWIN_ROOT_PATH$input_path"
8716    fi
8717  fi
8718
8719  # remove trailing .exe if any
8720  new_path="${new_path/%.exe/}"
8721
8722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8723
8724  # First separate the path from the arguments. This will split at the first
8725  # space.
8726  complete="$FOUND_MAKE"
8727  path="${complete%% *}"
8728  tmp="$complete EOL"
8729  arguments="${tmp#* }"
8730
8731  # Input might be given as Windows format, start by converting to
8732  # unix format.
8733  new_path="$path"
8734
8735  windows_path="$new_path"
8736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8737    unix_path=`$CYGPATH -u "$windows_path"`
8738    new_path="$unix_path"
8739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8741    new_path="$unix_path"
8742  fi
8743
8744
8745  # Now try to locate executable using which
8746  new_path=`$WHICH "$new_path" 2> /dev/null`
8747
8748  if test "x$new_path" = x; then
8749    # Oops. Which didn't find the executable.
8750    # The splitting of arguments from the executable at a space might have been incorrect,
8751    # since paths with space are more likely in Windows. Give it another try with the whole
8752    # argument.
8753    path="$complete"
8754    arguments="EOL"
8755    new_path="$path"
8756
8757  windows_path="$new_path"
8758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8759    unix_path=`$CYGPATH -u "$windows_path"`
8760    new_path="$unix_path"
8761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8763    new_path="$unix_path"
8764  fi
8765
8766
8767    new_path=`$WHICH "$new_path" 2> /dev/null`
8768
8769    if test "x$new_path" = x; then
8770      # It's still not found. Now this is an unrecoverable error.
8771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8772$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8773      has_space=`$ECHO "$complete" | $GREP " "`
8774      if test "x$has_space" != x; then
8775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8777      fi
8778      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8779    fi
8780  fi
8781
8782  # Now new_path has a complete unix path to the binary
8783  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8784    # Keep paths in /bin as-is, but remove trailing .exe if any
8785    new_path="${new_path/%.exe/}"
8786    # Do not save /bin paths to all_fixpath_prefixes!
8787  else
8788    # Not in mixed or Windows style, start by that.
8789    new_path=`cmd //c echo $new_path`
8790
8791  input_path="$new_path"
8792  # Check if we need to convert this using DOS-style short mode. If the path
8793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8794  # take no chances and rewrite it.
8795  # Note: m4 eats our [], so we need to use [ and ] instead.
8796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8797  if test "x$has_forbidden_chars" != x; then
8798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8800  fi
8801
8802    # Output is in $new_path
8803
8804  windows_path="$new_path"
8805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8806    unix_path=`$CYGPATH -u "$windows_path"`
8807    new_path="$unix_path"
8808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8810    new_path="$unix_path"
8811  fi
8812
8813    # remove trailing .exe if any
8814    new_path="${new_path/%.exe/}"
8815
8816    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8817    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8818  fi
8819
8820  else
8821    # We're on a posix platform. Hooray! :)
8822    # First separate the path from the arguments. This will split at the first
8823    # space.
8824    complete="$FOUND_MAKE"
8825    path="${complete%% *}"
8826    tmp="$complete EOL"
8827    arguments="${tmp#* }"
8828
8829    # Cannot rely on the command "which" here since it doesn't always work.
8830    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8831    if test -z "$is_absolute_path"; then
8832      # Path to executable is not absolute. Find it.
8833      IFS_save="$IFS"
8834      IFS=:
8835      for p in $PATH; do
8836        if test -f "$p/$path" && test -x "$p/$path"; then
8837          new_path="$p/$path"
8838          break
8839        fi
8840      done
8841      IFS="$IFS_save"
8842    else
8843      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8844$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8845      new_path="$path"
8846    fi
8847
8848    if test "x$new_path" = x; then
8849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8851        has_space=`$ECHO "$complete" | $GREP " "`
8852        if test "x$has_space" != x; then
8853          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8854$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8855        fi
8856        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8857      fi
8858  fi
8859
8860      # Now join together the path and the arguments once again
8861      if test "x$arguments" != xEOL; then
8862        new_complete="$new_path ${arguments% *}"
8863      else
8864        new_complete="$new_path"
8865      fi
8866
8867  if test "x$complete" != "x$new_complete"; then
8868      FOUND_MAKE="$new_complete"
8869      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8870$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8871    fi
8872
8873        fi
8874      fi
8875    fi
8876  fi
8877
8878
8879    if test "x$FOUND_MAKE" = x; then
8880      for ac_prog in make
8881do
8882  # Extract the first word of "$ac_prog", so it can be a program name with args.
8883set dummy $ac_prog; ac_word=$2
8884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8885$as_echo_n "checking for $ac_word... " >&6; }
8886if ${ac_cv_path_CHECK_MAKE+:} false; then :
8887  $as_echo_n "(cached) " >&6
8888else
8889  case $CHECK_MAKE in
8890  [\\/]* | ?:[\\/]*)
8891  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8892  ;;
8893  *)
8894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8895for as_dir in $PATH
8896do
8897  IFS=$as_save_IFS
8898  test -z "$as_dir" && as_dir=.
8899    for ac_exec_ext in '' $ac_executable_extensions; do
8900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8901    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8903    break 2
8904  fi
8905done
8906  done
8907IFS=$as_save_IFS
8908
8909  ;;
8910esac
8911fi
8912CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8913if test -n "$CHECK_MAKE"; then
8914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8915$as_echo "$CHECK_MAKE" >&6; }
8916else
8917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8918$as_echo "no" >&6; }
8919fi
8920
8921
8922  test -n "$CHECK_MAKE" && break
8923done
8924
8925
8926  MAKE_CANDIDATE=""$CHECK_MAKE""
8927  DESCRIPTION="make in PATH"
8928  if test "x$MAKE_CANDIDATE" != x; then
8929    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8930$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8931    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8932    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8933    if test "x$IS_GNU_MAKE" = x; then
8934      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8935$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8936    else
8937      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8938      if test "x$IS_MODERN_MAKE" = x; then
8939        { $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
8940$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;}
8941      else
8942        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8943          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8944            MAKE_EXPECTED_ENV='cygwin'
8945          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8946            MAKE_EXPECTED_ENV='msys'
8947          else
8948            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8949          fi
8950          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8951          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8952        else
8953          # Not relevant for non-Windows
8954          IS_MAKE_CORRECT_ENV=true
8955        fi
8956        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8957          { $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
8958$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;}
8959        else
8960          FOUND_MAKE=$MAKE_CANDIDATE
8961
8962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8963
8964  # First separate the path from the arguments. This will split at the first
8965  # space.
8966  complete="$FOUND_MAKE"
8967  path="${complete%% *}"
8968  tmp="$complete EOL"
8969  arguments="${tmp#* }"
8970
8971  # Input might be given as Windows format, start by converting to
8972  # unix format.
8973  new_path=`$CYGPATH -u "$path"`
8974
8975  # Now try to locate executable using which
8976  new_path=`$WHICH "$new_path" 2> /dev/null`
8977  # bat and cmd files are not always considered executable in cygwin causing which
8978  # to not find them
8979  if test "x$new_path" = x \
8980           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8981           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8982    new_path=`$CYGPATH -u "$path"`
8983  fi
8984  if test "x$new_path" = x; then
8985    # Oops. Which didn't find the executable.
8986    # The splitting of arguments from the executable at a space might have been incorrect,
8987    # since paths with space are more likely in Windows. Give it another try with the whole
8988    # argument.
8989    path="$complete"
8990    arguments="EOL"
8991    new_path=`$CYGPATH -u "$path"`
8992    new_path=`$WHICH "$new_path" 2> /dev/null`
8993    # bat and cmd files are not always considered executable in cygwin causing which
8994    # to not find them
8995    if test "x$new_path" = x \
8996             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8997             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8998      new_path=`$CYGPATH -u "$path"`
8999    fi
9000    if test "x$new_path" = x; then
9001      # It's still not found. Now this is an unrecoverable error.
9002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9003$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9004      has_space=`$ECHO "$complete" | $GREP " "`
9005      if test "x$has_space" != x; then
9006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9008      fi
9009      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9010    fi
9011  fi
9012
9013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9016  # "foo.exe" is OK but "foo" is an error.
9017  #
9018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9019  # It is also a way to make sure we got the proper file name for the real test later on.
9020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9021  if test "x$test_shortpath" = x; then
9022    # Short path failed, file does not exist as specified.
9023    # Try adding .exe or .cmd
9024    if test -f "${new_path}.exe"; then
9025       input_to_shortpath="${new_path}.exe"
9026    elif test -f "${new_path}.cmd"; then
9027       input_to_shortpath="${new_path}.cmd"
9028    else
9029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9030$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9031      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9032$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9033      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9034    fi
9035  else
9036    input_to_shortpath="$new_path"
9037  fi
9038
9039  # Call helper function which possibly converts this using DOS-style short mode.
9040  # If so, the updated path is stored in $new_path.
9041  new_path="$input_to_shortpath"
9042
9043  input_path="$input_to_shortpath"
9044  # Check if we need to convert this using DOS-style short mode. If the path
9045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9046  # take no chances and rewrite it.
9047  # Note: m4 eats our [], so we need to use [ and ] instead.
9048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9049  if test "x$has_forbidden_chars" != x; then
9050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9054      # Going to short mode and back again did indeed matter. Since short mode is
9055      # case insensitive, let's make it lowercase to improve readability.
9056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9057      # Now convert it back to Unix-stile (cygpath)
9058      input_path=`$CYGPATH -u "$shortmode_path"`
9059      new_path="$input_path"
9060    fi
9061  fi
9062
9063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9064  if test "x$test_cygdrive_prefix" = x; then
9065    # As a simple fix, exclude /usr/bin since it's not a real path.
9066    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9068      # a path prefixed by /cygdrive for fixpath to work.
9069      new_path="$CYGWIN_ROOT_PATH$input_path"
9070    fi
9071  fi
9072
9073  # remove trailing .exe if any
9074  new_path="${new_path/%.exe/}"
9075
9076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9077
9078  # First separate the path from the arguments. This will split at the first
9079  # space.
9080  complete="$FOUND_MAKE"
9081  path="${complete%% *}"
9082  tmp="$complete EOL"
9083  arguments="${tmp#* }"
9084
9085  # Input might be given as Windows format, start by converting to
9086  # unix format.
9087  new_path="$path"
9088
9089  windows_path="$new_path"
9090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9091    unix_path=`$CYGPATH -u "$windows_path"`
9092    new_path="$unix_path"
9093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9095    new_path="$unix_path"
9096  fi
9097
9098
9099  # Now try to locate executable using which
9100  new_path=`$WHICH "$new_path" 2> /dev/null`
9101
9102  if test "x$new_path" = x; then
9103    # Oops. Which didn't find the executable.
9104    # The splitting of arguments from the executable at a space might have been incorrect,
9105    # since paths with space are more likely in Windows. Give it another try with the whole
9106    # argument.
9107    path="$complete"
9108    arguments="EOL"
9109    new_path="$path"
9110
9111  windows_path="$new_path"
9112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9113    unix_path=`$CYGPATH -u "$windows_path"`
9114    new_path="$unix_path"
9115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9117    new_path="$unix_path"
9118  fi
9119
9120
9121    new_path=`$WHICH "$new_path" 2> /dev/null`
9122
9123    if test "x$new_path" = x; then
9124      # It's still not found. Now this is an unrecoverable error.
9125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9126$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9127      has_space=`$ECHO "$complete" | $GREP " "`
9128      if test "x$has_space" != x; then
9129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9131      fi
9132      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9133    fi
9134  fi
9135
9136  # Now new_path has a complete unix path to the binary
9137  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9138    # Keep paths in /bin as-is, but remove trailing .exe if any
9139    new_path="${new_path/%.exe/}"
9140    # Do not save /bin paths to all_fixpath_prefixes!
9141  else
9142    # Not in mixed or Windows style, start by that.
9143    new_path=`cmd //c echo $new_path`
9144
9145  input_path="$new_path"
9146  # Check if we need to convert this using DOS-style short mode. If the path
9147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9148  # take no chances and rewrite it.
9149  # Note: m4 eats our [], so we need to use [ and ] instead.
9150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9151  if test "x$has_forbidden_chars" != x; then
9152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9154  fi
9155
9156    # Output is in $new_path
9157
9158  windows_path="$new_path"
9159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9160    unix_path=`$CYGPATH -u "$windows_path"`
9161    new_path="$unix_path"
9162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9164    new_path="$unix_path"
9165  fi
9166
9167    # remove trailing .exe if any
9168    new_path="${new_path/%.exe/}"
9169
9170    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9171    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9172  fi
9173
9174  else
9175    # We're on a posix platform. Hooray! :)
9176    # First separate the path from the arguments. This will split at the first
9177    # space.
9178    complete="$FOUND_MAKE"
9179    path="${complete%% *}"
9180    tmp="$complete EOL"
9181    arguments="${tmp#* }"
9182
9183    # Cannot rely on the command "which" here since it doesn't always work.
9184    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9185    if test -z "$is_absolute_path"; then
9186      # Path to executable is not absolute. Find it.
9187      IFS_save="$IFS"
9188      IFS=:
9189      for p in $PATH; do
9190        if test -f "$p/$path" && test -x "$p/$path"; then
9191          new_path="$p/$path"
9192          break
9193        fi
9194      done
9195      IFS="$IFS_save"
9196    else
9197      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9198$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9199      new_path="$path"
9200    fi
9201
9202    if test "x$new_path" = x; then
9203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9204$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9205        has_space=`$ECHO "$complete" | $GREP " "`
9206        if test "x$has_space" != x; then
9207          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9208$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9209        fi
9210        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9211      fi
9212  fi
9213
9214      # Now join together the path and the arguments once again
9215      if test "x$arguments" != xEOL; then
9216        new_complete="$new_path ${arguments% *}"
9217      else
9218        new_complete="$new_path"
9219      fi
9220
9221  if test "x$complete" != "x$new_complete"; then
9222      FOUND_MAKE="$new_complete"
9223      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9224$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9225    fi
9226
9227        fi
9228      fi
9229    fi
9230  fi
9231
9232    fi
9233
9234    if test "x$FOUND_MAKE" = x; then
9235      if test "x$TOOLS_DIR" != x; then
9236        # We have a tools-dir, check that as well before giving up.
9237        OLD_PATH=$PATH
9238        PATH=$TOOLS_DIR:$PATH
9239        for ac_prog in gmake
9240do
9241  # Extract the first word of "$ac_prog", so it can be a program name with args.
9242set dummy $ac_prog; ac_word=$2
9243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9244$as_echo_n "checking for $ac_word... " >&6; }
9245if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9246  $as_echo_n "(cached) " >&6
9247else
9248  case $CHECK_TOOLSDIR_GMAKE in
9249  [\\/]* | ?:[\\/]*)
9250  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9251  ;;
9252  *)
9253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9254for as_dir in $PATH
9255do
9256  IFS=$as_save_IFS
9257  test -z "$as_dir" && as_dir=.
9258    for ac_exec_ext in '' $ac_executable_extensions; do
9259  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9260    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9262    break 2
9263  fi
9264done
9265  done
9266IFS=$as_save_IFS
9267
9268  ;;
9269esac
9270fi
9271CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9272if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9274$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9275else
9276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9277$as_echo "no" >&6; }
9278fi
9279
9280
9281  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9282done
9283
9284
9285  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9286  DESCRIPTION="gmake in tools-dir"
9287  if test "x$MAKE_CANDIDATE" != x; then
9288    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9289$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9290    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9291    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9292    if test "x$IS_GNU_MAKE" = x; then
9293      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9294$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9295    else
9296      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9297      if test "x$IS_MODERN_MAKE" = x; then
9298        { $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
9299$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;}
9300      else
9301        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9302          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9303            MAKE_EXPECTED_ENV='cygwin'
9304          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9305            MAKE_EXPECTED_ENV='msys'
9306          else
9307            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9308          fi
9309          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9310          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9311        else
9312          # Not relevant for non-Windows
9313          IS_MAKE_CORRECT_ENV=true
9314        fi
9315        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9316          { $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
9317$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;}
9318        else
9319          FOUND_MAKE=$MAKE_CANDIDATE
9320
9321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9322
9323  # First separate the path from the arguments. This will split at the first
9324  # space.
9325  complete="$FOUND_MAKE"
9326  path="${complete%% *}"
9327  tmp="$complete EOL"
9328  arguments="${tmp#* }"
9329
9330  # Input might be given as Windows format, start by converting to
9331  # unix format.
9332  new_path=`$CYGPATH -u "$path"`
9333
9334  # Now try to locate executable using which
9335  new_path=`$WHICH "$new_path" 2> /dev/null`
9336  # bat and cmd files are not always considered executable in cygwin causing which
9337  # to not find them
9338  if test "x$new_path" = x \
9339           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9340           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9341    new_path=`$CYGPATH -u "$path"`
9342  fi
9343  if test "x$new_path" = x; then
9344    # Oops. Which didn't find the executable.
9345    # The splitting of arguments from the executable at a space might have been incorrect,
9346    # since paths with space are more likely in Windows. Give it another try with the whole
9347    # argument.
9348    path="$complete"
9349    arguments="EOL"
9350    new_path=`$CYGPATH -u "$path"`
9351    new_path=`$WHICH "$new_path" 2> /dev/null`
9352    # bat and cmd files are not always considered executable in cygwin causing which
9353    # to not find them
9354    if test "x$new_path" = x \
9355             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9356             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9357      new_path=`$CYGPATH -u "$path"`
9358    fi
9359    if test "x$new_path" = x; then
9360      # It's still not found. Now this is an unrecoverable error.
9361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9362$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9363      has_space=`$ECHO "$complete" | $GREP " "`
9364      if test "x$has_space" != x; then
9365        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9366$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9367      fi
9368      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9369    fi
9370  fi
9371
9372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9375  # "foo.exe" is OK but "foo" is an error.
9376  #
9377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9378  # It is also a way to make sure we got the proper file name for the real test later on.
9379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9380  if test "x$test_shortpath" = x; then
9381    # Short path failed, file does not exist as specified.
9382    # Try adding .exe or .cmd
9383    if test -f "${new_path}.exe"; then
9384       input_to_shortpath="${new_path}.exe"
9385    elif test -f "${new_path}.cmd"; then
9386       input_to_shortpath="${new_path}.cmd"
9387    else
9388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9389$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9390      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9391$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9392      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9393    fi
9394  else
9395    input_to_shortpath="$new_path"
9396  fi
9397
9398  # Call helper function which possibly converts this using DOS-style short mode.
9399  # If so, the updated path is stored in $new_path.
9400  new_path="$input_to_shortpath"
9401
9402  input_path="$input_to_shortpath"
9403  # Check if we need to convert this using DOS-style short mode. If the path
9404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9405  # take no chances and rewrite it.
9406  # Note: m4 eats our [], so we need to use [ and ] instead.
9407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9408  if test "x$has_forbidden_chars" != x; then
9409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9413      # Going to short mode and back again did indeed matter. Since short mode is
9414      # case insensitive, let's make it lowercase to improve readability.
9415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9416      # Now convert it back to Unix-stile (cygpath)
9417      input_path=`$CYGPATH -u "$shortmode_path"`
9418      new_path="$input_path"
9419    fi
9420  fi
9421
9422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9423  if test "x$test_cygdrive_prefix" = x; then
9424    # As a simple fix, exclude /usr/bin since it's not a real path.
9425    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9427      # a path prefixed by /cygdrive for fixpath to work.
9428      new_path="$CYGWIN_ROOT_PATH$input_path"
9429    fi
9430  fi
9431
9432  # remove trailing .exe if any
9433  new_path="${new_path/%.exe/}"
9434
9435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9436
9437  # First separate the path from the arguments. This will split at the first
9438  # space.
9439  complete="$FOUND_MAKE"
9440  path="${complete%% *}"
9441  tmp="$complete EOL"
9442  arguments="${tmp#* }"
9443
9444  # Input might be given as Windows format, start by converting to
9445  # unix format.
9446  new_path="$path"
9447
9448  windows_path="$new_path"
9449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9450    unix_path=`$CYGPATH -u "$windows_path"`
9451    new_path="$unix_path"
9452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9454    new_path="$unix_path"
9455  fi
9456
9457
9458  # Now try to locate executable using which
9459  new_path=`$WHICH "$new_path" 2> /dev/null`
9460
9461  if test "x$new_path" = x; then
9462    # Oops. Which didn't find the executable.
9463    # The splitting of arguments from the executable at a space might have been incorrect,
9464    # since paths with space are more likely in Windows. Give it another try with the whole
9465    # argument.
9466    path="$complete"
9467    arguments="EOL"
9468    new_path="$path"
9469
9470  windows_path="$new_path"
9471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9472    unix_path=`$CYGPATH -u "$windows_path"`
9473    new_path="$unix_path"
9474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9476    new_path="$unix_path"
9477  fi
9478
9479
9480    new_path=`$WHICH "$new_path" 2> /dev/null`
9481
9482    if test "x$new_path" = x; then
9483      # It's still not found. Now this is an unrecoverable error.
9484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9485$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9486      has_space=`$ECHO "$complete" | $GREP " "`
9487      if test "x$has_space" != x; then
9488        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9489$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9490      fi
9491      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9492    fi
9493  fi
9494
9495  # Now new_path has a complete unix path to the binary
9496  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9497    # Keep paths in /bin as-is, but remove trailing .exe if any
9498    new_path="${new_path/%.exe/}"
9499    # Do not save /bin paths to all_fixpath_prefixes!
9500  else
9501    # Not in mixed or Windows style, start by that.
9502    new_path=`cmd //c echo $new_path`
9503
9504  input_path="$new_path"
9505  # Check if we need to convert this using DOS-style short mode. If the path
9506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9507  # take no chances and rewrite it.
9508  # Note: m4 eats our [], so we need to use [ and ] instead.
9509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9510  if test "x$has_forbidden_chars" != x; then
9511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9513  fi
9514
9515    # Output is in $new_path
9516
9517  windows_path="$new_path"
9518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9519    unix_path=`$CYGPATH -u "$windows_path"`
9520    new_path="$unix_path"
9521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9523    new_path="$unix_path"
9524  fi
9525
9526    # remove trailing .exe if any
9527    new_path="${new_path/%.exe/}"
9528
9529    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9530    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9531  fi
9532
9533  else
9534    # We're on a posix platform. Hooray! :)
9535    # First separate the path from the arguments. This will split at the first
9536    # space.
9537    complete="$FOUND_MAKE"
9538    path="${complete%% *}"
9539    tmp="$complete EOL"
9540    arguments="${tmp#* }"
9541
9542    # Cannot rely on the command "which" here since it doesn't always work.
9543    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9544    if test -z "$is_absolute_path"; then
9545      # Path to executable is not absolute. Find it.
9546      IFS_save="$IFS"
9547      IFS=:
9548      for p in $PATH; do
9549        if test -f "$p/$path" && test -x "$p/$path"; then
9550          new_path="$p/$path"
9551          break
9552        fi
9553      done
9554      IFS="$IFS_save"
9555    else
9556      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9557$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9558      new_path="$path"
9559    fi
9560
9561    if test "x$new_path" = x; then
9562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9563$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9564        has_space=`$ECHO "$complete" | $GREP " "`
9565        if test "x$has_space" != x; then
9566          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9567$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9568        fi
9569        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9570      fi
9571  fi
9572
9573      # Now join together the path and the arguments once again
9574      if test "x$arguments" != xEOL; then
9575        new_complete="$new_path ${arguments% *}"
9576      else
9577        new_complete="$new_path"
9578      fi
9579
9580  if test "x$complete" != "x$new_complete"; then
9581      FOUND_MAKE="$new_complete"
9582      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9583$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9584    fi
9585
9586        fi
9587      fi
9588    fi
9589  fi
9590
9591        if test "x$FOUND_MAKE" = x; then
9592          for ac_prog in make
9593do
9594  # Extract the first word of "$ac_prog", so it can be a program name with args.
9595set dummy $ac_prog; ac_word=$2
9596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9597$as_echo_n "checking for $ac_word... " >&6; }
9598if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9599  $as_echo_n "(cached) " >&6
9600else
9601  case $CHECK_TOOLSDIR_MAKE in
9602  [\\/]* | ?:[\\/]*)
9603  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9604  ;;
9605  *)
9606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9607for as_dir in $PATH
9608do
9609  IFS=$as_save_IFS
9610  test -z "$as_dir" && as_dir=.
9611    for ac_exec_ext in '' $ac_executable_extensions; do
9612  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9613    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9615    break 2
9616  fi
9617done
9618  done
9619IFS=$as_save_IFS
9620
9621  ;;
9622esac
9623fi
9624CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9625if test -n "$CHECK_TOOLSDIR_MAKE"; then
9626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9627$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9628else
9629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9630$as_echo "no" >&6; }
9631fi
9632
9633
9634  test -n "$CHECK_TOOLSDIR_MAKE" && break
9635done
9636
9637
9638  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9639  DESCRIPTION="make in tools-dir"
9640  if test "x$MAKE_CANDIDATE" != x; then
9641    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9642$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9643    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9644    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9645    if test "x$IS_GNU_MAKE" = x; then
9646      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9647$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9648    else
9649      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9650      if test "x$IS_MODERN_MAKE" = x; then
9651        { $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
9652$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;}
9653      else
9654        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9655          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9656            MAKE_EXPECTED_ENV='cygwin'
9657          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9658            MAKE_EXPECTED_ENV='msys'
9659          else
9660            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9661          fi
9662          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9663          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9664        else
9665          # Not relevant for non-Windows
9666          IS_MAKE_CORRECT_ENV=true
9667        fi
9668        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9669          { $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
9670$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;}
9671        else
9672          FOUND_MAKE=$MAKE_CANDIDATE
9673
9674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9675
9676  # First separate the path from the arguments. This will split at the first
9677  # space.
9678  complete="$FOUND_MAKE"
9679  path="${complete%% *}"
9680  tmp="$complete EOL"
9681  arguments="${tmp#* }"
9682
9683  # Input might be given as Windows format, start by converting to
9684  # unix format.
9685  new_path=`$CYGPATH -u "$path"`
9686
9687  # Now try to locate executable using which
9688  new_path=`$WHICH "$new_path" 2> /dev/null`
9689  # bat and cmd files are not always considered executable in cygwin causing which
9690  # to not find them
9691  if test "x$new_path" = x \
9692           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9693           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9694    new_path=`$CYGPATH -u "$path"`
9695  fi
9696  if test "x$new_path" = x; then
9697    # Oops. Which didn't find the executable.
9698    # The splitting of arguments from the executable at a space might have been incorrect,
9699    # since paths with space are more likely in Windows. Give it another try with the whole
9700    # argument.
9701    path="$complete"
9702    arguments="EOL"
9703    new_path=`$CYGPATH -u "$path"`
9704    new_path=`$WHICH "$new_path" 2> /dev/null`
9705    # bat and cmd files are not always considered executable in cygwin causing which
9706    # to not find them
9707    if test "x$new_path" = x \
9708             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9709             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9710      new_path=`$CYGPATH -u "$path"`
9711    fi
9712    if test "x$new_path" = x; then
9713      # It's still not found. Now this is an unrecoverable error.
9714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9715$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9716      has_space=`$ECHO "$complete" | $GREP " "`
9717      if test "x$has_space" != x; then
9718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9720      fi
9721      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9722    fi
9723  fi
9724
9725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9728  # "foo.exe" is OK but "foo" is an error.
9729  #
9730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9731  # It is also a way to make sure we got the proper file name for the real test later on.
9732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9733  if test "x$test_shortpath" = x; then
9734    # Short path failed, file does not exist as specified.
9735    # Try adding .exe or .cmd
9736    if test -f "${new_path}.exe"; then
9737       input_to_shortpath="${new_path}.exe"
9738    elif test -f "${new_path}.cmd"; then
9739       input_to_shortpath="${new_path}.cmd"
9740    else
9741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9742$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9743      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9744$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9745      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9746    fi
9747  else
9748    input_to_shortpath="$new_path"
9749  fi
9750
9751  # Call helper function which possibly converts this using DOS-style short mode.
9752  # If so, the updated path is stored in $new_path.
9753  new_path="$input_to_shortpath"
9754
9755  input_path="$input_to_shortpath"
9756  # Check if we need to convert this using DOS-style short mode. If the path
9757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9758  # take no chances and rewrite it.
9759  # Note: m4 eats our [], so we need to use [ and ] instead.
9760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9761  if test "x$has_forbidden_chars" != x; then
9762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9766      # Going to short mode and back again did indeed matter. Since short mode is
9767      # case insensitive, let's make it lowercase to improve readability.
9768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9769      # Now convert it back to Unix-stile (cygpath)
9770      input_path=`$CYGPATH -u "$shortmode_path"`
9771      new_path="$input_path"
9772    fi
9773  fi
9774
9775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9776  if test "x$test_cygdrive_prefix" = x; then
9777    # As a simple fix, exclude /usr/bin since it's not a real path.
9778    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9780      # a path prefixed by /cygdrive for fixpath to work.
9781      new_path="$CYGWIN_ROOT_PATH$input_path"
9782    fi
9783  fi
9784
9785  # remove trailing .exe if any
9786  new_path="${new_path/%.exe/}"
9787
9788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9789
9790  # First separate the path from the arguments. This will split at the first
9791  # space.
9792  complete="$FOUND_MAKE"
9793  path="${complete%% *}"
9794  tmp="$complete EOL"
9795  arguments="${tmp#* }"
9796
9797  # Input might be given as Windows format, start by converting to
9798  # unix format.
9799  new_path="$path"
9800
9801  windows_path="$new_path"
9802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9803    unix_path=`$CYGPATH -u "$windows_path"`
9804    new_path="$unix_path"
9805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9807    new_path="$unix_path"
9808  fi
9809
9810
9811  # Now try to locate executable using which
9812  new_path=`$WHICH "$new_path" 2> /dev/null`
9813
9814  if test "x$new_path" = x; then
9815    # Oops. Which didn't find the executable.
9816    # The splitting of arguments from the executable at a space might have been incorrect,
9817    # since paths with space are more likely in Windows. Give it another try with the whole
9818    # argument.
9819    path="$complete"
9820    arguments="EOL"
9821    new_path="$path"
9822
9823  windows_path="$new_path"
9824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9825    unix_path=`$CYGPATH -u "$windows_path"`
9826    new_path="$unix_path"
9827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9829    new_path="$unix_path"
9830  fi
9831
9832
9833    new_path=`$WHICH "$new_path" 2> /dev/null`
9834
9835    if test "x$new_path" = x; then
9836      # It's still not found. Now this is an unrecoverable error.
9837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9838$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9839      has_space=`$ECHO "$complete" | $GREP " "`
9840      if test "x$has_space" != x; then
9841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9843      fi
9844      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9845    fi
9846  fi
9847
9848  # Now new_path has a complete unix path to the binary
9849  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9850    # Keep paths in /bin as-is, but remove trailing .exe if any
9851    new_path="${new_path/%.exe/}"
9852    # Do not save /bin paths to all_fixpath_prefixes!
9853  else
9854    # Not in mixed or Windows style, start by that.
9855    new_path=`cmd //c echo $new_path`
9856
9857  input_path="$new_path"
9858  # Check if we need to convert this using DOS-style short mode. If the path
9859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9860  # take no chances and rewrite it.
9861  # Note: m4 eats our [], so we need to use [ and ] instead.
9862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9863  if test "x$has_forbidden_chars" != x; then
9864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9866  fi
9867
9868    # Output is in $new_path
9869
9870  windows_path="$new_path"
9871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9872    unix_path=`$CYGPATH -u "$windows_path"`
9873    new_path="$unix_path"
9874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9876    new_path="$unix_path"
9877  fi
9878
9879    # remove trailing .exe if any
9880    new_path="${new_path/%.exe/}"
9881
9882    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9883    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9884  fi
9885
9886  else
9887    # We're on a posix platform. Hooray! :)
9888    # First separate the path from the arguments. This will split at the first
9889    # space.
9890    complete="$FOUND_MAKE"
9891    path="${complete%% *}"
9892    tmp="$complete EOL"
9893    arguments="${tmp#* }"
9894
9895    # Cannot rely on the command "which" here since it doesn't always work.
9896    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9897    if test -z "$is_absolute_path"; then
9898      # Path to executable is not absolute. Find it.
9899      IFS_save="$IFS"
9900      IFS=:
9901      for p in $PATH; do
9902        if test -f "$p/$path" && test -x "$p/$path"; then
9903          new_path="$p/$path"
9904          break
9905        fi
9906      done
9907      IFS="$IFS_save"
9908    else
9909      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9910$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9911      new_path="$path"
9912    fi
9913
9914    if test "x$new_path" = x; then
9915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9916$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9917        has_space=`$ECHO "$complete" | $GREP " "`
9918        if test "x$has_space" != x; then
9919          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9920$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9921        fi
9922        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9923      fi
9924  fi
9925
9926      # Now join together the path and the arguments once again
9927      if test "x$arguments" != xEOL; then
9928        new_complete="$new_path ${arguments% *}"
9929      else
9930        new_complete="$new_path"
9931      fi
9932
9933  if test "x$complete" != "x$new_complete"; then
9934      FOUND_MAKE="$new_complete"
9935      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9936$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9937    fi
9938
9939        fi
9940      fi
9941    fi
9942  fi
9943
9944        fi
9945        PATH=$OLD_PATH
9946      fi
9947    fi
9948
9949    if test "x$FOUND_MAKE" = x; then
9950      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
9951    fi
9952  fi
9953
9954  MAKE=$FOUND_MAKE
9955
9956  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9957$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9958
9959
9960
9961    # Test if find supports -delete
9962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9963$as_echo_n "checking if find supports -delete... " >&6; }
9964    FIND_DELETE="-delete"
9965
9966    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9967
9968    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9969
9970    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9971    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9972        # No, it does not.
9973        rm $DELETEDIR/TestIfFindSupportsDelete
9974        FIND_DELETE="-exec rm \{\} \+"
9975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9976$as_echo "no" >&6; }
9977    else
9978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9979$as_echo "yes" >&6; }
9980    fi
9981    rmdir $DELETEDIR
9982
9983
9984
9985# These tools might not be installed by default,
9986# need hint on how to install them.
9987
9988    for ac_prog in unzip
9989do
9990  # Extract the first word of "$ac_prog", so it can be a program name with args.
9991set dummy $ac_prog; ac_word=$2
9992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9993$as_echo_n "checking for $ac_word... " >&6; }
9994if ${ac_cv_path_UNZIP+:} false; then :
9995  $as_echo_n "(cached) " >&6
9996else
9997  case $UNZIP in
9998  [\\/]* | ?:[\\/]*)
9999  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10000  ;;
10001  *)
10002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10003for as_dir in $PATH
10004do
10005  IFS=$as_save_IFS
10006  test -z "$as_dir" && as_dir=.
10007    for ac_exec_ext in '' $ac_executable_extensions; do
10008  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10009    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10011    break 2
10012  fi
10013done
10014  done
10015IFS=$as_save_IFS
10016
10017  ;;
10018esac
10019fi
10020UNZIP=$ac_cv_path_UNZIP
10021if test -n "$UNZIP"; then
10022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10023$as_echo "$UNZIP" >&6; }
10024else
10025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10026$as_echo "no" >&6; }
10027fi
10028
10029
10030  test -n "$UNZIP" && break
10031done
10032
10033
10034    if test "x$UNZIP" = x; then
10035        if test "xunzip" = x; then
10036          PROG_NAME=unzip
10037        else
10038          PROG_NAME=unzip
10039        fi
10040        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10041$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10042        as_fn_error $? "Cannot continue" "$LINENO" 5
10043    fi
10044
10045
10046
10047    for ac_prog in zip
10048do
10049  # Extract the first word of "$ac_prog", so it can be a program name with args.
10050set dummy $ac_prog; ac_word=$2
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10052$as_echo_n "checking for $ac_word... " >&6; }
10053if ${ac_cv_path_ZIP+:} false; then :
10054  $as_echo_n "(cached) " >&6
10055else
10056  case $ZIP in
10057  [\\/]* | ?:[\\/]*)
10058  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10059  ;;
10060  *)
10061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10062for as_dir in $PATH
10063do
10064  IFS=$as_save_IFS
10065  test -z "$as_dir" && as_dir=.
10066    for ac_exec_ext in '' $ac_executable_extensions; do
10067  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10068    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10070    break 2
10071  fi
10072done
10073  done
10074IFS=$as_save_IFS
10075
10076  ;;
10077esac
10078fi
10079ZIP=$ac_cv_path_ZIP
10080if test -n "$ZIP"; then
10081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10082$as_echo "$ZIP" >&6; }
10083else
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088
10089  test -n "$ZIP" && break
10090done
10091
10092
10093    if test "x$ZIP" = x; then
10094        if test "xzip" = x; then
10095          PROG_NAME=zip
10096        else
10097          PROG_NAME=zip
10098        fi
10099        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10100$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10101        as_fn_error $? "Cannot continue" "$LINENO" 5
10102    fi
10103
10104
10105
10106# Non-required basic tools
10107
10108# Extract the first word of "ldd", so it can be a program name with args.
10109set dummy ldd; ac_word=$2
10110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10111$as_echo_n "checking for $ac_word... " >&6; }
10112if ${ac_cv_path_LDD+:} false; then :
10113  $as_echo_n "(cached) " >&6
10114else
10115  case $LDD in
10116  [\\/]* | ?:[\\/]*)
10117  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10118  ;;
10119  *)
10120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10121for as_dir in $PATH
10122do
10123  IFS=$as_save_IFS
10124  test -z "$as_dir" && as_dir=.
10125    for ac_exec_ext in '' $ac_executable_extensions; do
10126  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10127    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10129    break 2
10130  fi
10131done
10132  done
10133IFS=$as_save_IFS
10134
10135  ;;
10136esac
10137fi
10138LDD=$ac_cv_path_LDD
10139if test -n "$LDD"; then
10140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10141$as_echo "$LDD" >&6; }
10142else
10143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10144$as_echo "no" >&6; }
10145fi
10146
10147
10148if test "x$LDD" = "x"; then
10149    # List shared lib dependencies is used for
10150    # debug output and checking for forbidden dependencies.
10151    # We can build without it.
10152    LDD="true"
10153fi
10154# Extract the first word of "otool", so it can be a program name with args.
10155set dummy otool; ac_word=$2
10156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10157$as_echo_n "checking for $ac_word... " >&6; }
10158if ${ac_cv_path_OTOOL+:} false; then :
10159  $as_echo_n "(cached) " >&6
10160else
10161  case $OTOOL in
10162  [\\/]* | ?:[\\/]*)
10163  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10164  ;;
10165  *)
10166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10167for as_dir in $PATH
10168do
10169  IFS=$as_save_IFS
10170  test -z "$as_dir" && as_dir=.
10171    for ac_exec_ext in '' $ac_executable_extensions; do
10172  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10173    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10175    break 2
10176  fi
10177done
10178  done
10179IFS=$as_save_IFS
10180
10181  ;;
10182esac
10183fi
10184OTOOL=$ac_cv_path_OTOOL
10185if test -n "$OTOOL"; then
10186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10187$as_echo "$OTOOL" >&6; }
10188else
10189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10190$as_echo "no" >&6; }
10191fi
10192
10193
10194if test "x$OTOOL" = "x"; then
10195   OTOOL="true"
10196fi
10197for ac_prog in readelf greadelf
10198do
10199  # Extract the first word of "$ac_prog", so it can be a program name with args.
10200set dummy $ac_prog; ac_word=$2
10201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10202$as_echo_n "checking for $ac_word... " >&6; }
10203if ${ac_cv_path_READELF+:} false; then :
10204  $as_echo_n "(cached) " >&6
10205else
10206  case $READELF in
10207  [\\/]* | ?:[\\/]*)
10208  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10209  ;;
10210  *)
10211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10212for as_dir in $PATH
10213do
10214  IFS=$as_save_IFS
10215  test -z "$as_dir" && as_dir=.
10216    for ac_exec_ext in '' $ac_executable_extensions; do
10217  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10218    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10220    break 2
10221  fi
10222done
10223  done
10224IFS=$as_save_IFS
10225
10226  ;;
10227esac
10228fi
10229READELF=$ac_cv_path_READELF
10230if test -n "$READELF"; then
10231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10232$as_echo "$READELF" >&6; }
10233else
10234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10235$as_echo "no" >&6; }
10236fi
10237
10238
10239  test -n "$READELF" && break
10240done
10241
10242# Extract the first word of "hg", so it can be a program name with args.
10243set dummy hg; ac_word=$2
10244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10245$as_echo_n "checking for $ac_word... " >&6; }
10246if ${ac_cv_path_HG+:} false; then :
10247  $as_echo_n "(cached) " >&6
10248else
10249  case $HG in
10250  [\\/]* | ?:[\\/]*)
10251  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10252  ;;
10253  *)
10254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10255for as_dir in $PATH
10256do
10257  IFS=$as_save_IFS
10258  test -z "$as_dir" && as_dir=.
10259    for ac_exec_ext in '' $ac_executable_extensions; do
10260  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10261    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10263    break 2
10264  fi
10265done
10266  done
10267IFS=$as_save_IFS
10268
10269  ;;
10270esac
10271fi
10272HG=$ac_cv_path_HG
10273if test -n "$HG"; then
10274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10275$as_echo "$HG" >&6; }
10276else
10277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10278$as_echo "no" >&6; }
10279fi
10280
10281
10282# Extract the first word of "stat", so it can be a program name with args.
10283set dummy stat; ac_word=$2
10284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10285$as_echo_n "checking for $ac_word... " >&6; }
10286if ${ac_cv_path_STAT+:} false; then :
10287  $as_echo_n "(cached) " >&6
10288else
10289  case $STAT in
10290  [\\/]* | ?:[\\/]*)
10291  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10292  ;;
10293  *)
10294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10295for as_dir in $PATH
10296do
10297  IFS=$as_save_IFS
10298  test -z "$as_dir" && as_dir=.
10299    for ac_exec_ext in '' $ac_executable_extensions; do
10300  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10301    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10303    break 2
10304  fi
10305done
10306  done
10307IFS=$as_save_IFS
10308
10309  ;;
10310esac
10311fi
10312STAT=$ac_cv_path_STAT
10313if test -n "$STAT"; then
10314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10315$as_echo "$STAT" >&6; }
10316else
10317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10318$as_echo "no" >&6; }
10319fi
10320
10321
10322# Extract the first word of "time", so it can be a program name with args.
10323set dummy time; ac_word=$2
10324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10325$as_echo_n "checking for $ac_word... " >&6; }
10326if ${ac_cv_path_TIME+:} false; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  case $TIME in
10330  [\\/]* | ?:[\\/]*)
10331  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10332  ;;
10333  *)
10334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337  IFS=$as_save_IFS
10338  test -z "$as_dir" && as_dir=.
10339    for ac_exec_ext in '' $ac_executable_extensions; do
10340  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10341    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343    break 2
10344  fi
10345done
10346  done
10347IFS=$as_save_IFS
10348
10349  ;;
10350esac
10351fi
10352TIME=$ac_cv_path_TIME
10353if test -n "$TIME"; then
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10355$as_echo "$TIME" >&6; }
10356else
10357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358$as_echo "no" >&6; }
10359fi
10360
10361
10362# Check if it's GNU time
10363IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10364if test "x$IS_GNU_TIME" != x; then
10365  IS_GNU_TIME=yes
10366else
10367  IS_GNU_TIME=no
10368fi
10369
10370
10371if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10372
10373    for ac_prog in comm
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_COMM+:} false; then :
10380  $as_echo_n "(cached) " >&6
10381else
10382  case $COMM in
10383  [\\/]* | ?:[\\/]*)
10384  ac_cv_path_COMM="$COMM" # 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_COMM="$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
10405COMM=$ac_cv_path_COMM
10406if test -n "$COMM"; then
10407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10408$as_echo "$COMM" >&6; }
10409else
10410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411$as_echo "no" >&6; }
10412fi
10413
10414
10415  test -n "$COMM" && break
10416done
10417
10418
10419    if test "x$COMM" = x; then
10420        if test "xcomm" = x; then
10421          PROG_NAME=comm
10422        else
10423          PROG_NAME=comm
10424        fi
10425        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10426$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10427        as_fn_error $? "Cannot continue" "$LINENO" 5
10428    fi
10429
10430
10431fi
10432
10433if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10434
10435    for ac_prog in xattr
10436do
10437  # Extract the first word of "$ac_prog", so it can be a program name with args.
10438set dummy $ac_prog; ac_word=$2
10439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10440$as_echo_n "checking for $ac_word... " >&6; }
10441if ${ac_cv_path_XATTR+:} false; then :
10442  $as_echo_n "(cached) " >&6
10443else
10444  case $XATTR in
10445  [\\/]* | ?:[\\/]*)
10446  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10447  ;;
10448  *)
10449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10450for as_dir in $PATH
10451do
10452  IFS=$as_save_IFS
10453  test -z "$as_dir" && as_dir=.
10454    for ac_exec_ext in '' $ac_executable_extensions; do
10455  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10456    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10458    break 2
10459  fi
10460done
10461  done
10462IFS=$as_save_IFS
10463
10464  ;;
10465esac
10466fi
10467XATTR=$ac_cv_path_XATTR
10468if test -n "$XATTR"; then
10469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10470$as_echo "$XATTR" >&6; }
10471else
10472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10473$as_echo "no" >&6; }
10474fi
10475
10476
10477  test -n "$XATTR" && break
10478done
10479
10480
10481    if test "x$XATTR" = x; then
10482        if test "xxattr" = x; then
10483          PROG_NAME=xattr
10484        else
10485          PROG_NAME=xattr
10486        fi
10487        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10488$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10489        as_fn_error $? "Cannot continue" "$LINENO" 5
10490    fi
10491
10492
10493  # Extract the first word of "codesign", so it can be a program name with args.
10494set dummy codesign; ac_word=$2
10495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10496$as_echo_n "checking for $ac_word... " >&6; }
10497if ${ac_cv_path_CODESIGN+:} false; then :
10498  $as_echo_n "(cached) " >&6
10499else
10500  case $CODESIGN in
10501  [\\/]* | ?:[\\/]*)
10502  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10503  ;;
10504  *)
10505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10506for as_dir in $PATH
10507do
10508  IFS=$as_save_IFS
10509  test -z "$as_dir" && as_dir=.
10510    for ac_exec_ext in '' $ac_executable_extensions; do
10511  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10512    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10514    break 2
10515  fi
10516done
10517  done
10518IFS=$as_save_IFS
10519
10520  ;;
10521esac
10522fi
10523CODESIGN=$ac_cv_path_CODESIGN
10524if test -n "$CODESIGN"; then
10525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10526$as_echo "$CODESIGN" >&6; }
10527else
10528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10529$as_echo "no" >&6; }
10530fi
10531
10532
10533  if test "x$CODESIGN" != "x"; then
10534    # Verify that the openjdk_codesign certificate is present
10535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10536$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10537    rm -f codesign-testfile
10538    touch codesign-testfile
10539    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10540    rm -f codesign-testfile
10541    if test "x$CODESIGN" = x; then
10542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10543$as_echo "no" >&6; }
10544    else
10545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10546$as_echo "yes" >&6; }
10547    fi
10548  fi
10549fi
10550
10551
10552# Check if pkg-config is available.
10553
10554
10555if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10556	if test -n "$ac_tool_prefix"; then
10557  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10558set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10560$as_echo_n "checking for $ac_word... " >&6; }
10561if ${ac_cv_path_PKG_CONFIG+:} false; then :
10562  $as_echo_n "(cached) " >&6
10563else
10564  case $PKG_CONFIG in
10565  [\\/]* | ?:[\\/]*)
10566  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10567  ;;
10568  *)
10569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10570for as_dir in $PATH
10571do
10572  IFS=$as_save_IFS
10573  test -z "$as_dir" && as_dir=.
10574    for ac_exec_ext in '' $ac_executable_extensions; do
10575  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10576    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10578    break 2
10579  fi
10580done
10581  done
10582IFS=$as_save_IFS
10583
10584  ;;
10585esac
10586fi
10587PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10588if test -n "$PKG_CONFIG"; then
10589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10590$as_echo "$PKG_CONFIG" >&6; }
10591else
10592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10593$as_echo "no" >&6; }
10594fi
10595
10596
10597fi
10598if test -z "$ac_cv_path_PKG_CONFIG"; then
10599  ac_pt_PKG_CONFIG=$PKG_CONFIG
10600  # Extract the first word of "pkg-config", so it can be a program name with args.
10601set dummy pkg-config; ac_word=$2
10602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10603$as_echo_n "checking for $ac_word... " >&6; }
10604if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10605  $as_echo_n "(cached) " >&6
10606else
10607  case $ac_pt_PKG_CONFIG in
10608  [\\/]* | ?:[\\/]*)
10609  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10610  ;;
10611  *)
10612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10613for as_dir in $PATH
10614do
10615  IFS=$as_save_IFS
10616  test -z "$as_dir" && as_dir=.
10617    for ac_exec_ext in '' $ac_executable_extensions; do
10618  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10619    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10621    break 2
10622  fi
10623done
10624  done
10625IFS=$as_save_IFS
10626
10627  ;;
10628esac
10629fi
10630ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10631if test -n "$ac_pt_PKG_CONFIG"; then
10632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10633$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10634else
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10636$as_echo "no" >&6; }
10637fi
10638
10639  if test "x$ac_pt_PKG_CONFIG" = x; then
10640    PKG_CONFIG=""
10641  else
10642    case $cross_compiling:$ac_tool_warned in
10643yes:)
10644{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10645$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10646ac_tool_warned=yes ;;
10647esac
10648    PKG_CONFIG=$ac_pt_PKG_CONFIG
10649  fi
10650else
10651  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10652fi
10653
10654fi
10655if test -n "$PKG_CONFIG"; then
10656	_pkg_min_version=0.9.0
10657	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10658$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10659	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10660		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10661$as_echo "yes" >&6; }
10662	else
10663		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10664$as_echo "no" >&6; }
10665		PKG_CONFIG=""
10666	fi
10667
10668fi
10669
10670# After basic tools have been setup, we can check build os specific details.
10671
10672###############################################################################
10673
10674# Note that this is the build platform OS version!
10675
10676OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10677OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10678OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10679OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10680
10681
10682
10683
10684
10685# Setup builddeps, for automatic downloading of tools we need.
10686# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10687# boot-jdk setup, but we need to have basic tools setup first.
10688
10689
10690# Check whether --with-builddeps-conf was given.
10691if test "${with_builddeps_conf+set}" = set; then :
10692  withval=$with_builddeps_conf;
10693fi
10694
10695
10696
10697# Check whether --with-builddeps-server was given.
10698if test "${with_builddeps_server+set}" = set; then :
10699  withval=$with_builddeps_server;
10700fi
10701
10702
10703
10704# Check whether --with-builddeps-dir was given.
10705if test "${with_builddeps_dir+set}" = set; then :
10706  withval=$with_builddeps_dir;
10707else
10708  with_builddeps_dir=/localhome/builddeps
10709fi
10710
10711
10712
10713# Check whether --with-builddeps-group was given.
10714if test "${with_builddeps_group+set}" = set; then :
10715  withval=$with_builddeps_group;
10716fi
10717
10718
10719
10720
10721    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10722        if test "x$with_builddeps_conf" != x; then
10723            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10724$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10725            builddepsfile=$with_builddeps_conf
10726            if test -s $builddepsfile; then
10727                . $builddepsfile
10728                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10729$as_echo "loaded!" >&6; }
10730            else
10731               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10732           fi
10733        else
10734            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10735$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10736            builddepsfile=`mktemp`
10737            touch $builddepsfile
10738            # Put all found confs into a single file.
10739            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10740            # Source the file to acquire the variables
10741            if test -s $builddepsfile; then
10742                . $builddepsfile
10743                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10744$as_echo "found at least one!" >&6; }
10745            else
10746               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10747           fi
10748        fi
10749        # Create build and target names that use _ instead of "-" and ".".
10750        # This is necessary to use them in variable names.
10751        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10752        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10753        # Extract rewrite information for build and target
10754        eval rewritten_build=\${REWRITE_${build_var}}
10755        if test "x$rewritten_build" = x; then
10756            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10757            echo Build stays the same $rewritten_build
10758        else
10759            echo Rewriting build for builddeps into $rewritten_build
10760        fi
10761        eval rewritten_target=\${REWRITE_${target_var}}
10762        if test "x$rewritten_target" = x; then
10763            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10764            echo Target stays the same $rewritten_target
10765        else
10766            echo Rewriting target for builddeps into $rewritten_target
10767        fi
10768        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10769        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10770    fi
10771    for ac_prog in 7z unzip
10772do
10773  # Extract the first word of "$ac_prog", so it can be a program name with args.
10774set dummy $ac_prog; ac_word=$2
10775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10776$as_echo_n "checking for $ac_word... " >&6; }
10777if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10778  $as_echo_n "(cached) " >&6
10779else
10780  if test -n "$BDEPS_UNZIP"; then
10781  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10782else
10783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10784for as_dir in $PATH
10785do
10786  IFS=$as_save_IFS
10787  test -z "$as_dir" && as_dir=.
10788    for ac_exec_ext in '' $ac_executable_extensions; do
10789  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10790    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10792    break 2
10793  fi
10794done
10795  done
10796IFS=$as_save_IFS
10797
10798fi
10799fi
10800BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10801if test -n "$BDEPS_UNZIP"; then
10802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10803$as_echo "$BDEPS_UNZIP" >&6; }
10804else
10805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10806$as_echo "no" >&6; }
10807fi
10808
10809
10810  test -n "$BDEPS_UNZIP" && break
10811done
10812
10813    if test "x$BDEPS_UNZIP" = x7z; then
10814        BDEPS_UNZIP="7z x"
10815    fi
10816
10817    for ac_prog in wget lftp ftp
10818do
10819  # Extract the first word of "$ac_prog", so it can be a program name with args.
10820set dummy $ac_prog; ac_word=$2
10821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10822$as_echo_n "checking for $ac_word... " >&6; }
10823if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10824  $as_echo_n "(cached) " >&6
10825else
10826  if test -n "$BDEPS_FTP"; then
10827  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10828else
10829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830for as_dir in $PATH
10831do
10832  IFS=$as_save_IFS
10833  test -z "$as_dir" && as_dir=.
10834    for ac_exec_ext in '' $ac_executable_extensions; do
10835  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10836    ac_cv_prog_BDEPS_FTP="$ac_prog"
10837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838    break 2
10839  fi
10840done
10841  done
10842IFS=$as_save_IFS
10843
10844fi
10845fi
10846BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10847if test -n "$BDEPS_FTP"; then
10848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10849$as_echo "$BDEPS_FTP" >&6; }
10850else
10851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10852$as_echo "no" >&6; }
10853fi
10854
10855
10856  test -n "$BDEPS_FTP" && break
10857done
10858
10859
10860
10861###############################################################################
10862#
10863# Determine OpenJDK variants, options and version numbers.
10864#
10865###############################################################################
10866
10867# We need build & target for this.
10868
10869
10870###############################################################################
10871#
10872# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10873# We always build headless support.
10874#
10875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10876$as_echo_n "checking headful support... " >&6; }
10877# Check whether --enable-headful was given.
10878if test "${enable_headful+set}" = set; then :
10879  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10880else
10881  SUPPORT_HEADFUL=yes
10882fi
10883
10884
10885SUPPORT_HEADLESS=yes
10886BUILD_HEADLESS="BUILD_HEADLESS:=true"
10887
10888if test "x$SUPPORT_HEADFUL" = xyes; then
10889    # We are building both headful and headless.
10890    headful_msg="inlude support for both headful and headless"
10891fi
10892
10893if test "x$SUPPORT_HEADFUL" = xno; then
10894    # Thus we are building headless only.
10895    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10896    headful_msg="headless only"
10897fi
10898
10899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10900$as_echo "$headful_msg" >&6; }
10901
10902
10903
10904
10905
10906# Control wether Hotspot runs Queens test after build.
10907# Check whether --enable-hotspot-test-in-build was given.
10908if test "${enable_hotspot_test_in_build+set}" = set; then :
10909  enableval=$enable_hotspot_test_in_build;
10910else
10911  enable_hotspot_test_in_build=no
10912fi
10913
10914if test "x$enable_hotspot_test_in_build" = "xyes"; then
10915    TEST_IN_BUILD=true
10916else
10917    TEST_IN_BUILD=false
10918fi
10919
10920
10921###############################################################################
10922#
10923# Choose cacerts source file
10924#
10925
10926# Check whether --with-cacerts-file was given.
10927if test "${with_cacerts_file+set}" = set; then :
10928  withval=$with_cacerts_file;
10929fi
10930
10931if test "x$with_cacerts_file" != x; then
10932    CACERTS_FILE=$with_cacerts_file
10933else
10934    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10935fi
10936
10937
10938###############################################################################
10939#
10940# Enable or disable unlimited crypto
10941#
10942# Check whether --enable-unlimited-crypto was given.
10943if test "${enable_unlimited_crypto+set}" = set; then :
10944  enableval=$enable_unlimited_crypto;
10945else
10946  enable_unlimited_crypto=no
10947fi
10948
10949if test "x$enable_unlimited_crypto" = "xyes"; then
10950    UNLIMITED_CRYPTO=true
10951else
10952    UNLIMITED_CRYPTO=false
10953fi
10954
10955
10956###############################################################################
10957#
10958# Enable or disable the elliptic curve crypto implementation
10959#
10960
10961
10962###############################################################################
10963#
10964# Compress jars
10965#
10966COMPRESS_JARS=false
10967
10968
10969
10970
10971# Source the version numbers
10972. $AUTOCONF_DIR/version-numbers
10973
10974# Get the settings from parameters
10975
10976# Check whether --with-milestone was given.
10977if test "${with_milestone+set}" = set; then :
10978  withval=$with_milestone;
10979fi
10980
10981if test "x$with_milestone" = xyes; then
10982  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10983elif test "x$with_milestone" != x; then
10984    MILESTONE="$with_milestone"
10985fi
10986if test "x$MILESTONE" = x; then
10987  MILESTONE=internal
10988fi
10989
10990
10991# Check whether --with-update-version was given.
10992if test "${with_update_version+set}" = set; then :
10993  withval=$with_update_version;
10994fi
10995
10996if test "x$with_update_version" = xyes; then
10997  as_fn_error $? "Update version must have a value" "$LINENO" 5
10998elif test "x$with_update_version" != x; then
10999  JDK_UPDATE_VERSION="$with_update_version"
11000fi
11001
11002
11003# Check whether --with-build-number was given.
11004if test "${with_build_number+set}" = set; then :
11005  withval=$with_build_number;
11006fi
11007
11008if test "x$with_build_number" = xyes; then
11009  as_fn_error $? "Build number must have a value" "$LINENO" 5
11010elif test "x$with_build_number" != x; then
11011  JDK_BUILD_NUMBER="$with_build_number"
11012fi
11013if test "x$JDK_BUILD_NUMBER" = x; then
11014  JDK_BUILD_NUMBER=b00
11015fi
11016
11017
11018# Check whether --with-user-release-suffix was given.
11019if test "${with_user_release_suffix+set}" = set; then :
11020  withval=$with_user_release_suffix;
11021fi
11022
11023if test "x$with_user_release_suffix" = xyes; then
11024  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11025elif test "x$with_user_release_suffix" != x; then
11026  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11027else
11028  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11029  # Avoid [:alnum:] since it depends on the locale.
11030  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11031  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11032fi
11033
11034
11035# Now set the JDK version, milestone, build number etc.
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050COPYRIGHT_YEAR=`date +'%Y'`
11051
11052
11053if test "x$JDK_UPDATE_VERSION" != x; then
11054  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11055else
11056  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11057fi
11058
11059
11060COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11061
11062
11063
11064###############################################################################
11065#
11066# Setup BootJDK, used to bootstrap the build.
11067#
11068###############################################################################
11069
11070
11071BOOT_JDK_FOUND=no
11072
11073# Check whether --with-boot-jdk was given.
11074if test "${with_boot_jdk+set}" = set; then :
11075  withval=$with_boot_jdk;
11076fi
11077
11078
11079# We look for the Boot JDK through various means, going from more certain to
11080# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11081# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11082# must check if this is indeed valid; otherwise we'll continue looking.
11083
11084# Test: Is bootjdk explicitely set by command line arguments?
11085
11086  if test "x$BOOT_JDK_FOUND" = xno; then
11087    # Now execute the test
11088
11089if test "x$with_boot_jdk" != x; then
11090    BOOT_JDK=$with_boot_jdk
11091    BOOT_JDK_FOUND=maybe
11092    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11093$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11094fi
11095
11096
11097    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11098    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11099      # Do we have a bin/java?
11100      if test ! -x "$BOOT_JDK/bin/java"; then
11101        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11103        BOOT_JDK_FOUND=no
11104      else
11105        # Do we have a bin/javac?
11106        if test ! -x "$BOOT_JDK/bin/javac"; then
11107          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11109          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11110$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11111          BOOT_JDK_FOUND=no
11112        else
11113          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11114          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11115            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11117            BOOT_JDK_FOUND=no
11118          else
11119            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11120            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11121
11122            # Extra M4 quote needed to protect [] in grep expression.
11123            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11124            if test "x$FOUND_VERSION_78" = x; then
11125              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11127              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11128$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11129              BOOT_JDK_FOUND=no
11130            else
11131              # We're done! :-)
11132              BOOT_JDK_FOUND=yes
11133
11134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11135
11136  # Input might be given as Windows format, start by converting to
11137  # unix format.
11138  path="$BOOT_JDK"
11139  new_path=`$CYGPATH -u "$path"`
11140
11141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11144  # "foo.exe" is OK but "foo" is an error.
11145  #
11146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11147  # It is also a way to make sure we got the proper file name for the real test later on.
11148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11149  if test "x$test_shortpath" = x; then
11150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11152    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11153  fi
11154
11155  # Call helper function which possibly converts this using DOS-style short mode.
11156  # If so, the updated path is stored in $new_path.
11157
11158  input_path="$new_path"
11159  # Check if we need to convert this using DOS-style short mode. If the path
11160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11161  # take no chances and rewrite it.
11162  # Note: m4 eats our [], so we need to use [ and ] instead.
11163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11164  if test "x$has_forbidden_chars" != x; then
11165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11169      # Going to short mode and back again did indeed matter. Since short mode is
11170      # case insensitive, let's make it lowercase to improve readability.
11171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11172      # Now convert it back to Unix-stile (cygpath)
11173      input_path=`$CYGPATH -u "$shortmode_path"`
11174      new_path="$input_path"
11175    fi
11176  fi
11177
11178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11179  if test "x$test_cygdrive_prefix" = x; then
11180    # As a simple fix, exclude /usr/bin since it's not a real path.
11181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11183      # a path prefixed by /cygdrive for fixpath to work.
11184      new_path="$CYGWIN_ROOT_PATH$input_path"
11185    fi
11186  fi
11187
11188
11189  if test "x$path" != "x$new_path"; then
11190    BOOT_JDK="$new_path"
11191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11193  fi
11194
11195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11196
11197  path="$BOOT_JDK"
11198  has_colon=`$ECHO $path | $GREP ^.:`
11199  new_path="$path"
11200  if test "x$has_colon" = x; then
11201    # Not in mixed or Windows style, start by that.
11202    new_path=`cmd //c echo $path`
11203  fi
11204
11205
11206  input_path="$new_path"
11207  # Check if we need to convert this using DOS-style short mode. If the path
11208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11209  # take no chances and rewrite it.
11210  # Note: m4 eats our [], so we need to use [ and ] instead.
11211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11212  if test "x$has_forbidden_chars" != x; then
11213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11215  fi
11216
11217
11218  windows_path="$new_path"
11219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11220    unix_path=`$CYGPATH -u "$windows_path"`
11221    new_path="$unix_path"
11222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11224    new_path="$unix_path"
11225  fi
11226
11227  if test "x$path" != "x$new_path"; then
11228    BOOT_JDK="$new_path"
11229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11230$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11231  fi
11232
11233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11235
11236  else
11237    # We're on a posix platform. Hooray! :)
11238    path="$BOOT_JDK"
11239    has_space=`$ECHO "$path" | $GREP " "`
11240    if test "x$has_space" != x; then
11241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11243      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11244    fi
11245
11246    # Use eval to expand a potential ~
11247    eval path="$path"
11248    if test ! -f "$path" && test ! -d "$path"; then
11249      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11250    fi
11251
11252    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11253  fi
11254
11255              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11256$as_echo_n "checking for Boot JDK... " >&6; }
11257              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11258$as_echo "$BOOT_JDK" >&6; }
11259              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11260$as_echo_n "checking Boot JDK version... " >&6; }
11261              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11262              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11263$as_echo "$BOOT_JDK_VERSION" >&6; }
11264            fi # end check jdk version
11265          fi # end check rt.jar
11266        fi # end check javac
11267      fi # end check java
11268    fi # end check boot jdk found
11269  fi
11270
11271if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11272  # Having specified an argument which is incorrect will produce an instant failure;
11273  # we should not go on looking
11274  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11275fi
11276
11277# Test: Is bootjdk available from builddeps?
11278
11279  if test "x$BOOT_JDK_FOUND" = xno; then
11280    # Now execute the test
11281
11282
11283
11284    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11285        # Source the builddeps file again, to make sure it uses the latest variables!
11286        . $builddepsfile
11287        # Look for a target and build machine specific resource!
11288        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11289        if test "x$resource" = x; then
11290            # Ok, lets instead look for a target specific resource
11291            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11292        fi
11293        if test "x$resource" = x; then
11294            # Ok, lets instead look for a build specific resource
11295            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11296        fi
11297        if test "x$resource" = x; then
11298            # Ok, lets instead look for a generic resource
11299            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11300            resource=${builddep_bootjdk}
11301        fi
11302        if test "x$resource" != x; then
11303            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11304$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11305	    # If the resource in the builddeps.conf file is an existing directory,
11306	    # for example /java/linux/cups
11307	    if test -d ${resource}; then
11308	       depdir=${resource}
11309	    else
11310
11311# bootjdk is for example mymodule
11312# $resource is for example libs/general/libmymod_1_2_3.zip
11313# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11314# $with_builddeps_dir is for example /localhome/builddeps
11315# depdir is the name of the variable into which we store the depdir, eg MYMOD
11316# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11317# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11318    filename=`basename $resource`
11319    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11320    filebase=${filename%%.*}
11321    extension=${filename#*.}
11322    installdir=$with_builddeps_dir/$filebase
11323    if test ! -f $installdir/$filename.unpacked; then
11324        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11325$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11326        if test ! -d $installdir; then
11327            mkdir -p $installdir
11328        fi
11329        if test ! -d $installdir; then
11330            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11331        fi
11332        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11333        touch $tmpfile
11334        if test ! -f $tmpfile; then
11335            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11336        fi
11337
11338    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11339    # $tmpfile is the local file name for the downloaded file.
11340    VALID_TOOL=no
11341    if test "x$BDEPS_FTP" = xwget; then
11342       VALID_TOOL=yes
11343       wget -O $tmpfile $with_builddeps_server/$resource
11344    fi
11345    if test "x$BDEPS_FTP" = xlftp; then
11346       VALID_TOOL=yes
11347       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11348    fi
11349    if test "x$BDEPS_FTP" = xftp; then
11350        VALID_TOOL=yes
11351        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11352        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11353        FTPUSERPWD=${FTPSERVER%%@*}
11354        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11355            FTPUSER=${userpwd%%:*}
11356            FTPPWD=${userpwd#*@}
11357            FTPSERVER=${FTPSERVER#*@}
11358        else
11359            FTPUSER=ftp
11360            FTPPWD=ftp
11361        fi
11362        # the "pass" command does not work on some
11363        # ftp clients (read ftp.exe) but if it works,
11364        # passive mode is better!
11365        (\
11366            echo "user $FTPUSER $FTPPWD"        ;\
11367            echo "pass"                         ;\
11368            echo "bin"                          ;\
11369            echo "get $FTPPATH $tmpfile"              ;\
11370        ) | ftp -in $FTPSERVER
11371    fi
11372    if test "x$VALID_TOOL" != xyes; then
11373       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11374    fi
11375
11376        mv $tmpfile $installdir/$filename
11377        if test ! -s $installdir/$filename; then
11378            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11379        fi
11380        case "$extension" in
11381            zip)  echo "Unzipping $installdir/$filename..."
11382               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11383            ;;
11384            tar.gz) echo "Untaring $installdir/$filename..."
11385               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11386            ;;
11387            tgz) echo "Untaring $installdir/$filename..."
11388               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11389            ;;
11390            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11391            ;;
11392        esac
11393    fi
11394    if test -f $installdir/$filename.unpacked; then
11395        depdir=$installdir
11396    fi
11397
11398	    fi
11399            # Source the builddeps file again, because in the previous command, the depdir
11400            # was updated to point at the current build dependency install directory.
11401            . $builddepsfile
11402            # Now extract variables from the builddeps.conf files.
11403            theroot=${builddep_bootjdk_ROOT}
11404            thecflags=${builddep_bootjdk_CFLAGS}
11405            thelibs=${builddep_bootjdk_LIBS}
11406            if test "x$depdir" = x; then
11407                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11408            fi
11409            BOOT_JDK=$depdir
11410            if test "x$theroot" != x; then
11411               BOOT_JDK="$theroot"
11412            fi
11413            if test "x$thecflags" != x; then
11414               BOOT_JDK_CFLAGS="$thecflags"
11415            fi
11416            if test "x$thelibs" != x; then
11417               BOOT_JDK_LIBS="$thelibs"
11418            fi
11419            BOOT_JDK_FOUND=maybe
11420            else BOOT_JDK_FOUND=no
11421
11422        fi
11423        else BOOT_JDK_FOUND=no
11424
11425    fi
11426
11427
11428
11429    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11430    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11431      # Do we have a bin/java?
11432      if test ! -x "$BOOT_JDK/bin/java"; then
11433        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11435        BOOT_JDK_FOUND=no
11436      else
11437        # Do we have a bin/javac?
11438        if test ! -x "$BOOT_JDK/bin/javac"; then
11439          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11441          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11442$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11443          BOOT_JDK_FOUND=no
11444        else
11445          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11446          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11447            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11449            BOOT_JDK_FOUND=no
11450          else
11451            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11452            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11453
11454            # Extra M4 quote needed to protect [] in grep expression.
11455            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11456            if test "x$FOUND_VERSION_78" = x; then
11457              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11459              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11460$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11461              BOOT_JDK_FOUND=no
11462            else
11463              # We're done! :-)
11464              BOOT_JDK_FOUND=yes
11465
11466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11467
11468  # Input might be given as Windows format, start by converting to
11469  # unix format.
11470  path="$BOOT_JDK"
11471  new_path=`$CYGPATH -u "$path"`
11472
11473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11476  # "foo.exe" is OK but "foo" is an error.
11477  #
11478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11479  # It is also a way to make sure we got the proper file name for the real test later on.
11480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11481  if test "x$test_shortpath" = x; then
11482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11483$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11484    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11485  fi
11486
11487  # Call helper function which possibly converts this using DOS-style short mode.
11488  # If so, the updated path is stored in $new_path.
11489
11490  input_path="$new_path"
11491  # Check if we need to convert this using DOS-style short mode. If the path
11492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11493  # take no chances and rewrite it.
11494  # Note: m4 eats our [], so we need to use [ and ] instead.
11495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11496  if test "x$has_forbidden_chars" != x; then
11497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11501      # Going to short mode and back again did indeed matter. Since short mode is
11502      # case insensitive, let's make it lowercase to improve readability.
11503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11504      # Now convert it back to Unix-stile (cygpath)
11505      input_path=`$CYGPATH -u "$shortmode_path"`
11506      new_path="$input_path"
11507    fi
11508  fi
11509
11510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11511  if test "x$test_cygdrive_prefix" = x; then
11512    # As a simple fix, exclude /usr/bin since it's not a real path.
11513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11515      # a path prefixed by /cygdrive for fixpath to work.
11516      new_path="$CYGWIN_ROOT_PATH$input_path"
11517    fi
11518  fi
11519
11520
11521  if test "x$path" != "x$new_path"; then
11522    BOOT_JDK="$new_path"
11523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11525  fi
11526
11527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11528
11529  path="$BOOT_JDK"
11530  has_colon=`$ECHO $path | $GREP ^.:`
11531  new_path="$path"
11532  if test "x$has_colon" = x; then
11533    # Not in mixed or Windows style, start by that.
11534    new_path=`cmd //c echo $path`
11535  fi
11536
11537
11538  input_path="$new_path"
11539  # Check if we need to convert this using DOS-style short mode. If the path
11540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11541  # take no chances and rewrite it.
11542  # Note: m4 eats our [], so we need to use [ and ] instead.
11543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11544  if test "x$has_forbidden_chars" != x; then
11545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11547  fi
11548
11549
11550  windows_path="$new_path"
11551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11552    unix_path=`$CYGPATH -u "$windows_path"`
11553    new_path="$unix_path"
11554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11556    new_path="$unix_path"
11557  fi
11558
11559  if test "x$path" != "x$new_path"; then
11560    BOOT_JDK="$new_path"
11561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11563  fi
11564
11565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11567
11568  else
11569    # We're on a posix platform. Hooray! :)
11570    path="$BOOT_JDK"
11571    has_space=`$ECHO "$path" | $GREP " "`
11572    if test "x$has_space" != x; then
11573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11574$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11575      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11576    fi
11577
11578    # Use eval to expand a potential ~
11579    eval path="$path"
11580    if test ! -f "$path" && test ! -d "$path"; then
11581      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11582    fi
11583
11584    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11585  fi
11586
11587              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11588$as_echo_n "checking for Boot JDK... " >&6; }
11589              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11590$as_echo "$BOOT_JDK" >&6; }
11591              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11592$as_echo_n "checking Boot JDK version... " >&6; }
11593              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11594              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11595$as_echo "$BOOT_JDK_VERSION" >&6; }
11596            fi # end check jdk version
11597          fi # end check rt.jar
11598        fi # end check javac
11599      fi # end check java
11600    fi # end check boot jdk found
11601  fi
11602
11603
11604# Test: Is $JAVA_HOME set?
11605
11606  if test "x$BOOT_JDK_FOUND" = xno; then
11607    # Now execute the test
11608
11609    if test "x$JAVA_HOME" != x; then
11610        JAVA_HOME_PROCESSED="$JAVA_HOME"
11611
11612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11613
11614  # Input might be given as Windows format, start by converting to
11615  # unix format.
11616  path="$JAVA_HOME_PROCESSED"
11617  new_path=`$CYGPATH -u "$path"`
11618
11619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11622  # "foo.exe" is OK but "foo" is an error.
11623  #
11624  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11625  # It is also a way to make sure we got the proper file name for the real test later on.
11626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11627  if test "x$test_shortpath" = x; then
11628    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11629$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11630    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11631  fi
11632
11633  # Call helper function which possibly converts this using DOS-style short mode.
11634  # If so, the updated path is stored in $new_path.
11635
11636  input_path="$new_path"
11637  # Check if we need to convert this using DOS-style short mode. If the path
11638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11639  # take no chances and rewrite it.
11640  # Note: m4 eats our [], so we need to use [ and ] instead.
11641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11642  if test "x$has_forbidden_chars" != x; then
11643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11647      # Going to short mode and back again did indeed matter. Since short mode is
11648      # case insensitive, let's make it lowercase to improve readability.
11649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11650      # Now convert it back to Unix-stile (cygpath)
11651      input_path=`$CYGPATH -u "$shortmode_path"`
11652      new_path="$input_path"
11653    fi
11654  fi
11655
11656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11657  if test "x$test_cygdrive_prefix" = x; then
11658    # As a simple fix, exclude /usr/bin since it's not a real path.
11659    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11661      # a path prefixed by /cygdrive for fixpath to work.
11662      new_path="$CYGWIN_ROOT_PATH$input_path"
11663    fi
11664  fi
11665
11666
11667  if test "x$path" != "x$new_path"; then
11668    JAVA_HOME_PROCESSED="$new_path"
11669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11670$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11671  fi
11672
11673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11674
11675  path="$JAVA_HOME_PROCESSED"
11676  has_colon=`$ECHO $path | $GREP ^.:`
11677  new_path="$path"
11678  if test "x$has_colon" = x; then
11679    # Not in mixed or Windows style, start by that.
11680    new_path=`cmd //c echo $path`
11681  fi
11682
11683
11684  input_path="$new_path"
11685  # Check if we need to convert this using DOS-style short mode. If the path
11686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11687  # take no chances and rewrite it.
11688  # Note: m4 eats our [], so we need to use [ and ] instead.
11689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11690  if test "x$has_forbidden_chars" != x; then
11691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11693  fi
11694
11695
11696  windows_path="$new_path"
11697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11698    unix_path=`$CYGPATH -u "$windows_path"`
11699    new_path="$unix_path"
11700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11702    new_path="$unix_path"
11703  fi
11704
11705  if test "x$path" != "x$new_path"; then
11706    JAVA_HOME_PROCESSED="$new_path"
11707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11708$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11709  fi
11710
11711  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11712  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11713
11714  else
11715    # We're on a posix platform. Hooray! :)
11716    path="$JAVA_HOME_PROCESSED"
11717    has_space=`$ECHO "$path" | $GREP " "`
11718    if test "x$has_space" != x; then
11719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11720$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11721      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11722    fi
11723
11724    # Use eval to expand a potential ~
11725    eval path="$path"
11726    if test ! -f "$path" && test ! -d "$path"; then
11727      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11728    fi
11729
11730    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11731  fi
11732
11733        if test ! -d "$JAVA_HOME_PROCESSED"; then
11734            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11735$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11736        else
11737          # Aha, the user has set a JAVA_HOME
11738          # let us use that as the Boot JDK.
11739          BOOT_JDK="$JAVA_HOME_PROCESSED"
11740          BOOT_JDK_FOUND=maybe
11741          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11742$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11743        fi
11744    fi
11745
11746
11747    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11748    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11749      # Do we have a bin/java?
11750      if test ! -x "$BOOT_JDK/bin/java"; then
11751        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11753        BOOT_JDK_FOUND=no
11754      else
11755        # Do we have a bin/javac?
11756        if test ! -x "$BOOT_JDK/bin/javac"; then
11757          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11758$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11759          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11760$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11761          BOOT_JDK_FOUND=no
11762        else
11763          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11764          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11765            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11767            BOOT_JDK_FOUND=no
11768          else
11769            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11770            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11771
11772            # Extra M4 quote needed to protect [] in grep expression.
11773            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11774            if test "x$FOUND_VERSION_78" = x; then
11775              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11777              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11778$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11779              BOOT_JDK_FOUND=no
11780            else
11781              # We're done! :-)
11782              BOOT_JDK_FOUND=yes
11783
11784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11785
11786  # Input might be given as Windows format, start by converting to
11787  # unix format.
11788  path="$BOOT_JDK"
11789  new_path=`$CYGPATH -u "$path"`
11790
11791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11794  # "foo.exe" is OK but "foo" is an error.
11795  #
11796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11797  # It is also a way to make sure we got the proper file name for the real test later on.
11798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11799  if test "x$test_shortpath" = x; then
11800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11801$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11802    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11803  fi
11804
11805  # Call helper function which possibly converts this using DOS-style short mode.
11806  # If so, the updated path is stored in $new_path.
11807
11808  input_path="$new_path"
11809  # Check if we need to convert this using DOS-style short mode. If the path
11810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11811  # take no chances and rewrite it.
11812  # Note: m4 eats our [], so we need to use [ and ] instead.
11813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11814  if test "x$has_forbidden_chars" != x; then
11815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11819      # Going to short mode and back again did indeed matter. Since short mode is
11820      # case insensitive, let's make it lowercase to improve readability.
11821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11822      # Now convert it back to Unix-stile (cygpath)
11823      input_path=`$CYGPATH -u "$shortmode_path"`
11824      new_path="$input_path"
11825    fi
11826  fi
11827
11828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11829  if test "x$test_cygdrive_prefix" = x; then
11830    # As a simple fix, exclude /usr/bin since it's not a real path.
11831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11833      # a path prefixed by /cygdrive for fixpath to work.
11834      new_path="$CYGWIN_ROOT_PATH$input_path"
11835    fi
11836  fi
11837
11838
11839  if test "x$path" != "x$new_path"; then
11840    BOOT_JDK="$new_path"
11841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11843  fi
11844
11845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11846
11847  path="$BOOT_JDK"
11848  has_colon=`$ECHO $path | $GREP ^.:`
11849  new_path="$path"
11850  if test "x$has_colon" = x; then
11851    # Not in mixed or Windows style, start by that.
11852    new_path=`cmd //c echo $path`
11853  fi
11854
11855
11856  input_path="$new_path"
11857  # Check if we need to convert this using DOS-style short mode. If the path
11858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11859  # take no chances and rewrite it.
11860  # Note: m4 eats our [], so we need to use [ and ] instead.
11861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11862  if test "x$has_forbidden_chars" != x; then
11863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11865  fi
11866
11867
11868  windows_path="$new_path"
11869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11870    unix_path=`$CYGPATH -u "$windows_path"`
11871    new_path="$unix_path"
11872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11874    new_path="$unix_path"
11875  fi
11876
11877  if test "x$path" != "x$new_path"; then
11878    BOOT_JDK="$new_path"
11879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11881  fi
11882
11883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11885
11886  else
11887    # We're on a posix platform. Hooray! :)
11888    path="$BOOT_JDK"
11889    has_space=`$ECHO "$path" | $GREP " "`
11890    if test "x$has_space" != x; then
11891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11892$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11893      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11894    fi
11895
11896    # Use eval to expand a potential ~
11897    eval path="$path"
11898    if test ! -f "$path" && test ! -d "$path"; then
11899      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11900    fi
11901
11902    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11903  fi
11904
11905              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11906$as_echo_n "checking for Boot JDK... " >&6; }
11907              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11908$as_echo "$BOOT_JDK" >&6; }
11909              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11910$as_echo_n "checking Boot JDK version... " >&6; }
11911              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11912              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11913$as_echo "$BOOT_JDK_VERSION" >&6; }
11914            fi # end check jdk version
11915          fi # end check rt.jar
11916        fi # end check javac
11917      fi # end check java
11918    fi # end check boot jdk found
11919  fi
11920
11921
11922# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11923
11924  if test "x$BOOT_JDK_FOUND" = xno; then
11925    # Now execute the test
11926
11927    if test -x /usr/libexec/java_home; then
11928        BOOT_JDK=`/usr/libexec/java_home`
11929        BOOT_JDK_FOUND=maybe
11930        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11931$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11932    fi
11933
11934
11935    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11936    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11937      # Do we have a bin/java?
11938      if test ! -x "$BOOT_JDK/bin/java"; then
11939        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11941        BOOT_JDK_FOUND=no
11942      else
11943        # Do we have a bin/javac?
11944        if test ! -x "$BOOT_JDK/bin/javac"; then
11945          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11947          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11948$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11949          BOOT_JDK_FOUND=no
11950        else
11951          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11952          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11953            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11955            BOOT_JDK_FOUND=no
11956          else
11957            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11958            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11959
11960            # Extra M4 quote needed to protect [] in grep expression.
11961            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11962            if test "x$FOUND_VERSION_78" = x; then
11963              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11965              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11966$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11967              BOOT_JDK_FOUND=no
11968            else
11969              # We're done! :-)
11970              BOOT_JDK_FOUND=yes
11971
11972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11973
11974  # Input might be given as Windows format, start by converting to
11975  # unix format.
11976  path="$BOOT_JDK"
11977  new_path=`$CYGPATH -u "$path"`
11978
11979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11982  # "foo.exe" is OK but "foo" is an error.
11983  #
11984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11985  # It is also a way to make sure we got the proper file name for the real test later on.
11986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11987  if test "x$test_shortpath" = x; then
11988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11990    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11991  fi
11992
11993  # Call helper function which possibly converts this using DOS-style short mode.
11994  # If so, the updated path is stored in $new_path.
11995
11996  input_path="$new_path"
11997  # Check if we need to convert this using DOS-style short mode. If the path
11998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11999  # take no chances and rewrite it.
12000  # Note: m4 eats our [], so we need to use [ and ] instead.
12001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12002  if test "x$has_forbidden_chars" != x; then
12003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12007      # Going to short mode and back again did indeed matter. Since short mode is
12008      # case insensitive, let's make it lowercase to improve readability.
12009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12010      # Now convert it back to Unix-stile (cygpath)
12011      input_path=`$CYGPATH -u "$shortmode_path"`
12012      new_path="$input_path"
12013    fi
12014  fi
12015
12016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12017  if test "x$test_cygdrive_prefix" = x; then
12018    # As a simple fix, exclude /usr/bin since it's not a real path.
12019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12021      # a path prefixed by /cygdrive for fixpath to work.
12022      new_path="$CYGWIN_ROOT_PATH$input_path"
12023    fi
12024  fi
12025
12026
12027  if test "x$path" != "x$new_path"; then
12028    BOOT_JDK="$new_path"
12029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12031  fi
12032
12033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12034
12035  path="$BOOT_JDK"
12036  has_colon=`$ECHO $path | $GREP ^.:`
12037  new_path="$path"
12038  if test "x$has_colon" = x; then
12039    # Not in mixed or Windows style, start by that.
12040    new_path=`cmd //c echo $path`
12041  fi
12042
12043
12044  input_path="$new_path"
12045  # Check if we need to convert this using DOS-style short mode. If the path
12046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12047  # take no chances and rewrite it.
12048  # Note: m4 eats our [], so we need to use [ and ] instead.
12049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12050  if test "x$has_forbidden_chars" != x; then
12051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12053  fi
12054
12055
12056  windows_path="$new_path"
12057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12058    unix_path=`$CYGPATH -u "$windows_path"`
12059    new_path="$unix_path"
12060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12062    new_path="$unix_path"
12063  fi
12064
12065  if test "x$path" != "x$new_path"; then
12066    BOOT_JDK="$new_path"
12067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12069  fi
12070
12071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12073
12074  else
12075    # We're on a posix platform. Hooray! :)
12076    path="$BOOT_JDK"
12077    has_space=`$ECHO "$path" | $GREP " "`
12078    if test "x$has_space" != x; then
12079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12080$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12081      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12082    fi
12083
12084    # Use eval to expand a potential ~
12085    eval path="$path"
12086    if test ! -f "$path" && test ! -d "$path"; then
12087      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12088    fi
12089
12090    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12091  fi
12092
12093              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12094$as_echo_n "checking for Boot JDK... " >&6; }
12095              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12096$as_echo "$BOOT_JDK" >&6; }
12097              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12098$as_echo_n "checking Boot JDK version... " >&6; }
12099              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12100              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12101$as_echo "$BOOT_JDK_VERSION" >&6; }
12102            fi # end check jdk version
12103          fi # end check rt.jar
12104        fi # end check javac
12105      fi # end check java
12106    fi # end check boot jdk found
12107  fi
12108
12109
12110# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12111
12112  if test "x$BOOT_JDK_FOUND" = xno; then
12113    # Now execute the test
12114
12115    # Extract the first word of "javac", so it can be a program name with args.
12116set dummy javac; ac_word=$2
12117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12118$as_echo_n "checking for $ac_word... " >&6; }
12119if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12120  $as_echo_n "(cached) " >&6
12121else
12122  case $JAVAC_CHECK in
12123  [\\/]* | ?:[\\/]*)
12124  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12125  ;;
12126  *)
12127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12128for as_dir in $PATH
12129do
12130  IFS=$as_save_IFS
12131  test -z "$as_dir" && as_dir=.
12132    for ac_exec_ext in '' $ac_executable_extensions; do
12133  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12134    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12136    break 2
12137  fi
12138done
12139  done
12140IFS=$as_save_IFS
12141
12142  ;;
12143esac
12144fi
12145JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12146if test -n "$JAVAC_CHECK"; then
12147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12148$as_echo "$JAVAC_CHECK" >&6; }
12149else
12150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151$as_echo "no" >&6; }
12152fi
12153
12154
12155    # Extract the first word of "java", so it can be a program name with args.
12156set dummy java; ac_word=$2
12157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12158$as_echo_n "checking for $ac_word... " >&6; }
12159if ${ac_cv_path_JAVA_CHECK+:} false; then :
12160  $as_echo_n "(cached) " >&6
12161else
12162  case $JAVA_CHECK in
12163  [\\/]* | ?:[\\/]*)
12164  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12165  ;;
12166  *)
12167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12168for as_dir in $PATH
12169do
12170  IFS=$as_save_IFS
12171  test -z "$as_dir" && as_dir=.
12172    for ac_exec_ext in '' $ac_executable_extensions; do
12173  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12174    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12176    break 2
12177  fi
12178done
12179  done
12180IFS=$as_save_IFS
12181
12182  ;;
12183esac
12184fi
12185JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12186if test -n "$JAVA_CHECK"; then
12187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12188$as_echo "$JAVA_CHECK" >&6; }
12189else
12190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12191$as_echo "no" >&6; }
12192fi
12193
12194
12195    BINARY="$JAVAC_CHECK"
12196    if test "x$JAVAC_CHECK" = x; then
12197        BINARY="$JAVA_CHECK"
12198    fi
12199    if test "x$BINARY" != x; then
12200        # So there is a java(c) binary, it might be part of a JDK.
12201        # Lets find the JDK/JRE directory by following symbolic links.
12202        # Linux/GNU systems often have links from /usr/bin/java to
12203        # /etc/alternatives/java to the real JDK binary.
12204
12205    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12206        # Follow a chain of symbolic links. Use readlink
12207        # where it exists, else fall back to horribly
12208        # complicated shell code.
12209        if test "x$READLINK_TESTED" != yes; then
12210            # On MacOSX there is a readlink tool with a different
12211            # purpose than the GNU readlink tool. Check the found readlink.
12212            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12213            if test "x$ISGNU" = x; then
12214                 # A readlink that we do not know how to use.
12215                 # Are there other non-GNU readlinks out there?
12216                 READLINK_TESTED=yes
12217                 READLINK=
12218            fi
12219        fi
12220
12221        if test "x$READLINK" != x; then
12222            BINARY=`$READLINK -f $BINARY`
12223        else
12224            # Save the current directory for restoring afterwards
12225            STARTDIR=$PWD
12226            COUNTER=0
12227            sym_link_dir=`$DIRNAME $BINARY`
12228            sym_link_file=`$BASENAME $BINARY`
12229            cd $sym_link_dir
12230            # Use -P flag to resolve symlinks in directories.
12231            cd `$THEPWDCMD -P`
12232            sym_link_dir=`$THEPWDCMD -P`
12233            # Resolve file symlinks
12234            while test $COUNTER -lt 20; do
12235                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12236                if test "x$ISLINK" == x; then
12237                    # This is not a symbolic link! We are done!
12238                    break
12239                fi
12240                # Again resolve directory symlinks since the target of the just found
12241                # link could be in a different directory
12242                cd `$DIRNAME $ISLINK`
12243                sym_link_dir=`$THEPWDCMD -P`
12244                sym_link_file=`$BASENAME $ISLINK`
12245                let COUNTER=COUNTER+1
12246            done
12247            cd $STARTDIR
12248            BINARY=$sym_link_dir/$sym_link_file
12249        fi
12250    fi
12251
12252        BOOT_JDK=`dirname "$BINARY"`
12253        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12254        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12255            # Looks like we found ourselves an JDK
12256            BOOT_JDK_FOUND=maybe
12257            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12258$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12259        fi
12260    fi
12261
12262
12263    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12264    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12265      # Do we have a bin/java?
12266      if test ! -x "$BOOT_JDK/bin/java"; then
12267        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12269        BOOT_JDK_FOUND=no
12270      else
12271        # Do we have a bin/javac?
12272        if test ! -x "$BOOT_JDK/bin/javac"; then
12273          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12275          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12276$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12277          BOOT_JDK_FOUND=no
12278        else
12279          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12280          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12281            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12283            BOOT_JDK_FOUND=no
12284          else
12285            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12286            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12287
12288            # Extra M4 quote needed to protect [] in grep expression.
12289            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12290            if test "x$FOUND_VERSION_78" = x; then
12291              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12293              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12294$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12295              BOOT_JDK_FOUND=no
12296            else
12297              # We're done! :-)
12298              BOOT_JDK_FOUND=yes
12299
12300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12301
12302  # Input might be given as Windows format, start by converting to
12303  # unix format.
12304  path="$BOOT_JDK"
12305  new_path=`$CYGPATH -u "$path"`
12306
12307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12310  # "foo.exe" is OK but "foo" is an error.
12311  #
12312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12313  # It is also a way to make sure we got the proper file name for the real test later on.
12314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12315  if test "x$test_shortpath" = x; then
12316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12318    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12319  fi
12320
12321  # Call helper function which possibly converts this using DOS-style short mode.
12322  # If so, the updated path is stored in $new_path.
12323
12324  input_path="$new_path"
12325  # Check if we need to convert this using DOS-style short mode. If the path
12326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12327  # take no chances and rewrite it.
12328  # Note: m4 eats our [], so we need to use [ and ] instead.
12329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12330  if test "x$has_forbidden_chars" != x; then
12331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12335      # Going to short mode and back again did indeed matter. Since short mode is
12336      # case insensitive, let's make it lowercase to improve readability.
12337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12338      # Now convert it back to Unix-stile (cygpath)
12339      input_path=`$CYGPATH -u "$shortmode_path"`
12340      new_path="$input_path"
12341    fi
12342  fi
12343
12344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12345  if test "x$test_cygdrive_prefix" = x; then
12346    # As a simple fix, exclude /usr/bin since it's not a real path.
12347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12349      # a path prefixed by /cygdrive for fixpath to work.
12350      new_path="$CYGWIN_ROOT_PATH$input_path"
12351    fi
12352  fi
12353
12354
12355  if test "x$path" != "x$new_path"; then
12356    BOOT_JDK="$new_path"
12357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12359  fi
12360
12361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12362
12363  path="$BOOT_JDK"
12364  has_colon=`$ECHO $path | $GREP ^.:`
12365  new_path="$path"
12366  if test "x$has_colon" = x; then
12367    # Not in mixed or Windows style, start by that.
12368    new_path=`cmd //c echo $path`
12369  fi
12370
12371
12372  input_path="$new_path"
12373  # Check if we need to convert this using DOS-style short mode. If the path
12374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12375  # take no chances and rewrite it.
12376  # Note: m4 eats our [], so we need to use [ and ] instead.
12377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12378  if test "x$has_forbidden_chars" != x; then
12379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12381  fi
12382
12383
12384  windows_path="$new_path"
12385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12386    unix_path=`$CYGPATH -u "$windows_path"`
12387    new_path="$unix_path"
12388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12390    new_path="$unix_path"
12391  fi
12392
12393  if test "x$path" != "x$new_path"; then
12394    BOOT_JDK="$new_path"
12395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12397  fi
12398
12399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12401
12402  else
12403    # We're on a posix platform. Hooray! :)
12404    path="$BOOT_JDK"
12405    has_space=`$ECHO "$path" | $GREP " "`
12406    if test "x$has_space" != x; then
12407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12409      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12410    fi
12411
12412    # Use eval to expand a potential ~
12413    eval path="$path"
12414    if test ! -f "$path" && test ! -d "$path"; then
12415      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12416    fi
12417
12418    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12419  fi
12420
12421              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12422$as_echo_n "checking for Boot JDK... " >&6; }
12423              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12424$as_echo "$BOOT_JDK" >&6; }
12425              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12426$as_echo_n "checking Boot JDK version... " >&6; }
12427              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12428              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12429$as_echo "$BOOT_JDK_VERSION" >&6; }
12430            fi # end check jdk version
12431          fi # end check rt.jar
12432        fi # end check javac
12433      fi # end check java
12434    fi # end check boot jdk found
12435  fi
12436
12437
12438# Test: Is there a JDK installed in default, well-known locations?
12439
12440  if test "x$BOOT_JDK_FOUND" = xno; then
12441    # Now execute the test
12442
12443  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12444
12445  if test "x$BOOT_JDK_FOUND" = xno; then
12446    # Now execute the test
12447
12448  if test "x$ProgramW6432" != x; then
12449    VIRTUAL_DIR="$ProgramW6432/Java"
12450
12451  windows_path="$VIRTUAL_DIR"
12452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12453    unix_path=`$CYGPATH -u "$windows_path"`
12454    VIRTUAL_DIR="$unix_path"
12455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12457    VIRTUAL_DIR="$unix_path"
12458  fi
12459
12460
12461  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12462  BOOT_JDK_SUFFIX=""
12463  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12464  if test "x$ALL_JDKS_FOUND" != x; then
12465    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12466
12467  if test "x$BOOT_JDK_FOUND" = xno; then
12468    # Now execute the test
12469
12470        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12471        if test -d "$BOOT_JDK"; then
12472          BOOT_JDK_FOUND=maybe
12473          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12474$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12475        fi
12476
12477
12478    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12479    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12480      # Do we have a bin/java?
12481      if test ! -x "$BOOT_JDK/bin/java"; then
12482        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12483$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12484        BOOT_JDK_FOUND=no
12485      else
12486        # Do we have a bin/javac?
12487        if test ! -x "$BOOT_JDK/bin/javac"; then
12488          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12490          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12491$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12492          BOOT_JDK_FOUND=no
12493        else
12494          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12495          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12496            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12498            BOOT_JDK_FOUND=no
12499          else
12500            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12501            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12502
12503            # Extra M4 quote needed to protect [] in grep expression.
12504            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12505            if test "x$FOUND_VERSION_78" = x; then
12506              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12508              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12509$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12510              BOOT_JDK_FOUND=no
12511            else
12512              # We're done! :-)
12513              BOOT_JDK_FOUND=yes
12514
12515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12516
12517  # Input might be given as Windows format, start by converting to
12518  # unix format.
12519  path="$BOOT_JDK"
12520  new_path=`$CYGPATH -u "$path"`
12521
12522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12525  # "foo.exe" is OK but "foo" is an error.
12526  #
12527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12528  # It is also a way to make sure we got the proper file name for the real test later on.
12529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12530  if test "x$test_shortpath" = x; then
12531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12532$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12533    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12534  fi
12535
12536  # Call helper function which possibly converts this using DOS-style short mode.
12537  # If so, the updated path is stored in $new_path.
12538
12539  input_path="$new_path"
12540  # Check if we need to convert this using DOS-style short mode. If the path
12541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12542  # take no chances and rewrite it.
12543  # Note: m4 eats our [], so we need to use [ and ] instead.
12544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12545  if test "x$has_forbidden_chars" != x; then
12546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12550      # Going to short mode and back again did indeed matter. Since short mode is
12551      # case insensitive, let's make it lowercase to improve readability.
12552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12553      # Now convert it back to Unix-stile (cygpath)
12554      input_path=`$CYGPATH -u "$shortmode_path"`
12555      new_path="$input_path"
12556    fi
12557  fi
12558
12559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12560  if test "x$test_cygdrive_prefix" = x; then
12561    # As a simple fix, exclude /usr/bin since it's not a real path.
12562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12564      # a path prefixed by /cygdrive for fixpath to work.
12565      new_path="$CYGWIN_ROOT_PATH$input_path"
12566    fi
12567  fi
12568
12569
12570  if test "x$path" != "x$new_path"; then
12571    BOOT_JDK="$new_path"
12572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12573$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12574  fi
12575
12576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12577
12578  path="$BOOT_JDK"
12579  has_colon=`$ECHO $path | $GREP ^.:`
12580  new_path="$path"
12581  if test "x$has_colon" = x; then
12582    # Not in mixed or Windows style, start by that.
12583    new_path=`cmd //c echo $path`
12584  fi
12585
12586
12587  input_path="$new_path"
12588  # Check if we need to convert this using DOS-style short mode. If the path
12589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12590  # take no chances and rewrite it.
12591  # Note: m4 eats our [], so we need to use [ and ] instead.
12592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12593  if test "x$has_forbidden_chars" != x; then
12594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12596  fi
12597
12598
12599  windows_path="$new_path"
12600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12601    unix_path=`$CYGPATH -u "$windows_path"`
12602    new_path="$unix_path"
12603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12605    new_path="$unix_path"
12606  fi
12607
12608  if test "x$path" != "x$new_path"; then
12609    BOOT_JDK="$new_path"
12610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12611$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12612  fi
12613
12614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12616
12617  else
12618    # We're on a posix platform. Hooray! :)
12619    path="$BOOT_JDK"
12620    has_space=`$ECHO "$path" | $GREP " "`
12621    if test "x$has_space" != x; then
12622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12623$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12624      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12625    fi
12626
12627    # Use eval to expand a potential ~
12628    eval path="$path"
12629    if test ! -f "$path" && test ! -d "$path"; then
12630      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12631    fi
12632
12633    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12634  fi
12635
12636              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12637$as_echo_n "checking for Boot JDK... " >&6; }
12638              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12639$as_echo "$BOOT_JDK" >&6; }
12640              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12641$as_echo_n "checking Boot JDK version... " >&6; }
12642              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12643              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12644$as_echo "$BOOT_JDK_VERSION" >&6; }
12645            fi # end check jdk version
12646          fi # end check rt.jar
12647        fi # end check javac
12648      fi # end check java
12649    fi # end check boot jdk found
12650  fi
12651
12652    done
12653  fi
12654
12655  fi
12656
12657
12658    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12659    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12660      # Do we have a bin/java?
12661      if test ! -x "$BOOT_JDK/bin/java"; then
12662        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12664        BOOT_JDK_FOUND=no
12665      else
12666        # Do we have a bin/javac?
12667        if test ! -x "$BOOT_JDK/bin/javac"; then
12668          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12669$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12670          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12671$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12672          BOOT_JDK_FOUND=no
12673        else
12674          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12675          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12676            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12678            BOOT_JDK_FOUND=no
12679          else
12680            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12681            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12682
12683            # Extra M4 quote needed to protect [] in grep expression.
12684            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12685            if test "x$FOUND_VERSION_78" = x; then
12686              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12688              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12689$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12690              BOOT_JDK_FOUND=no
12691            else
12692              # We're done! :-)
12693              BOOT_JDK_FOUND=yes
12694
12695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12696
12697  # Input might be given as Windows format, start by converting to
12698  # unix format.
12699  path="$BOOT_JDK"
12700  new_path=`$CYGPATH -u "$path"`
12701
12702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12705  # "foo.exe" is OK but "foo" is an error.
12706  #
12707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12708  # It is also a way to make sure we got the proper file name for the real test later on.
12709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12710  if test "x$test_shortpath" = x; then
12711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12712$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12713    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12714  fi
12715
12716  # Call helper function which possibly converts this using DOS-style short mode.
12717  # If so, the updated path is stored in $new_path.
12718
12719  input_path="$new_path"
12720  # Check if we need to convert this using DOS-style short mode. If the path
12721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12722  # take no chances and rewrite it.
12723  # Note: m4 eats our [], so we need to use [ and ] instead.
12724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12725  if test "x$has_forbidden_chars" != x; then
12726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12730      # Going to short mode and back again did indeed matter. Since short mode is
12731      # case insensitive, let's make it lowercase to improve readability.
12732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12733      # Now convert it back to Unix-stile (cygpath)
12734      input_path=`$CYGPATH -u "$shortmode_path"`
12735      new_path="$input_path"
12736    fi
12737  fi
12738
12739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12740  if test "x$test_cygdrive_prefix" = x; then
12741    # As a simple fix, exclude /usr/bin since it's not a real path.
12742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12744      # a path prefixed by /cygdrive for fixpath to work.
12745      new_path="$CYGWIN_ROOT_PATH$input_path"
12746    fi
12747  fi
12748
12749
12750  if test "x$path" != "x$new_path"; then
12751    BOOT_JDK="$new_path"
12752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12753$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12754  fi
12755
12756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12757
12758  path="$BOOT_JDK"
12759  has_colon=`$ECHO $path | $GREP ^.:`
12760  new_path="$path"
12761  if test "x$has_colon" = x; then
12762    # Not in mixed or Windows style, start by that.
12763    new_path=`cmd //c echo $path`
12764  fi
12765
12766
12767  input_path="$new_path"
12768  # Check if we need to convert this using DOS-style short mode. If the path
12769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12770  # take no chances and rewrite it.
12771  # Note: m4 eats our [], so we need to use [ and ] instead.
12772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12773  if test "x$has_forbidden_chars" != x; then
12774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12776  fi
12777
12778
12779  windows_path="$new_path"
12780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12781    unix_path=`$CYGPATH -u "$windows_path"`
12782    new_path="$unix_path"
12783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12785    new_path="$unix_path"
12786  fi
12787
12788  if test "x$path" != "x$new_path"; then
12789    BOOT_JDK="$new_path"
12790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12791$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12792  fi
12793
12794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12796
12797  else
12798    # We're on a posix platform. Hooray! :)
12799    path="$BOOT_JDK"
12800    has_space=`$ECHO "$path" | $GREP " "`
12801    if test "x$has_space" != x; then
12802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12803$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12804      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12805    fi
12806
12807    # Use eval to expand a potential ~
12808    eval path="$path"
12809    if test ! -f "$path" && test ! -d "$path"; then
12810      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12811    fi
12812
12813    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12814  fi
12815
12816              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12817$as_echo_n "checking for Boot JDK... " >&6; }
12818              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12819$as_echo "$BOOT_JDK" >&6; }
12820              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12821$as_echo_n "checking Boot JDK version... " >&6; }
12822              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12823              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12824$as_echo "$BOOT_JDK_VERSION" >&6; }
12825            fi # end check jdk version
12826          fi # end check rt.jar
12827        fi # end check javac
12828      fi # end check java
12829    fi # end check boot jdk found
12830  fi
12831
12832
12833  if test "x$BOOT_JDK_FOUND" = xno; then
12834    # Now execute the test
12835
12836  if test "x$PROGRAMW6432" != x; then
12837    VIRTUAL_DIR="$PROGRAMW6432/Java"
12838
12839  windows_path="$VIRTUAL_DIR"
12840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12841    unix_path=`$CYGPATH -u "$windows_path"`
12842    VIRTUAL_DIR="$unix_path"
12843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12845    VIRTUAL_DIR="$unix_path"
12846  fi
12847
12848
12849  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12850  BOOT_JDK_SUFFIX=""
12851  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12852  if test "x$ALL_JDKS_FOUND" != x; then
12853    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12854
12855  if test "x$BOOT_JDK_FOUND" = xno; then
12856    # Now execute the test
12857
12858        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12859        if test -d "$BOOT_JDK"; then
12860          BOOT_JDK_FOUND=maybe
12861          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12862$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12863        fi
12864
12865
12866    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12867    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12868      # Do we have a bin/java?
12869      if test ! -x "$BOOT_JDK/bin/java"; then
12870        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12872        BOOT_JDK_FOUND=no
12873      else
12874        # Do we have a bin/javac?
12875        if test ! -x "$BOOT_JDK/bin/javac"; then
12876          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12878          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12879$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12880          BOOT_JDK_FOUND=no
12881        else
12882          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12883          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12884            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12886            BOOT_JDK_FOUND=no
12887          else
12888            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12889            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12890
12891            # Extra M4 quote needed to protect [] in grep expression.
12892            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12893            if test "x$FOUND_VERSION_78" = x; then
12894              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12895$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12896              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12897$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12898              BOOT_JDK_FOUND=no
12899            else
12900              # We're done! :-)
12901              BOOT_JDK_FOUND=yes
12902
12903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12904
12905  # Input might be given as Windows format, start by converting to
12906  # unix format.
12907  path="$BOOT_JDK"
12908  new_path=`$CYGPATH -u "$path"`
12909
12910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12913  # "foo.exe" is OK but "foo" is an error.
12914  #
12915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12916  # It is also a way to make sure we got the proper file name for the real test later on.
12917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12918  if test "x$test_shortpath" = x; then
12919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12920$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12921    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12922  fi
12923
12924  # Call helper function which possibly converts this using DOS-style short mode.
12925  # If so, the updated path is stored in $new_path.
12926
12927  input_path="$new_path"
12928  # Check if we need to convert this using DOS-style short mode. If the path
12929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12930  # take no chances and rewrite it.
12931  # Note: m4 eats our [], so we need to use [ and ] instead.
12932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12933  if test "x$has_forbidden_chars" != x; then
12934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12938      # Going to short mode and back again did indeed matter. Since short mode is
12939      # case insensitive, let's make it lowercase to improve readability.
12940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12941      # Now convert it back to Unix-stile (cygpath)
12942      input_path=`$CYGPATH -u "$shortmode_path"`
12943      new_path="$input_path"
12944    fi
12945  fi
12946
12947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12948  if test "x$test_cygdrive_prefix" = x; then
12949    # As a simple fix, exclude /usr/bin since it's not a real path.
12950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12952      # a path prefixed by /cygdrive for fixpath to work.
12953      new_path="$CYGWIN_ROOT_PATH$input_path"
12954    fi
12955  fi
12956
12957
12958  if test "x$path" != "x$new_path"; then
12959    BOOT_JDK="$new_path"
12960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12961$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12962  fi
12963
12964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12965
12966  path="$BOOT_JDK"
12967  has_colon=`$ECHO $path | $GREP ^.:`
12968  new_path="$path"
12969  if test "x$has_colon" = x; then
12970    # Not in mixed or Windows style, start by that.
12971    new_path=`cmd //c echo $path`
12972  fi
12973
12974
12975  input_path="$new_path"
12976  # Check if we need to convert this using DOS-style short mode. If the path
12977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12978  # take no chances and rewrite it.
12979  # Note: m4 eats our [], so we need to use [ and ] instead.
12980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12981  if test "x$has_forbidden_chars" != x; then
12982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12984  fi
12985
12986
12987  windows_path="$new_path"
12988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12989    unix_path=`$CYGPATH -u "$windows_path"`
12990    new_path="$unix_path"
12991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12993    new_path="$unix_path"
12994  fi
12995
12996  if test "x$path" != "x$new_path"; then
12997    BOOT_JDK="$new_path"
12998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12999$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13000  fi
13001
13002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13004
13005  else
13006    # We're on a posix platform. Hooray! :)
13007    path="$BOOT_JDK"
13008    has_space=`$ECHO "$path" | $GREP " "`
13009    if test "x$has_space" != x; then
13010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13011$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13012      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13013    fi
13014
13015    # Use eval to expand a potential ~
13016    eval path="$path"
13017    if test ! -f "$path" && test ! -d "$path"; then
13018      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13019    fi
13020
13021    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13022  fi
13023
13024              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13025$as_echo_n "checking for Boot JDK... " >&6; }
13026              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13027$as_echo "$BOOT_JDK" >&6; }
13028              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13029$as_echo_n "checking Boot JDK version... " >&6; }
13030              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13031              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13032$as_echo "$BOOT_JDK_VERSION" >&6; }
13033            fi # end check jdk version
13034          fi # end check rt.jar
13035        fi # end check javac
13036      fi # end check java
13037    fi # end check boot jdk found
13038  fi
13039
13040    done
13041  fi
13042
13043  fi
13044
13045
13046    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13047    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13048      # Do we have a bin/java?
13049      if test ! -x "$BOOT_JDK/bin/java"; then
13050        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13052        BOOT_JDK_FOUND=no
13053      else
13054        # Do we have a bin/javac?
13055        if test ! -x "$BOOT_JDK/bin/javac"; then
13056          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13058          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13059$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13060          BOOT_JDK_FOUND=no
13061        else
13062          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13063          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13064            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13066            BOOT_JDK_FOUND=no
13067          else
13068            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13069            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13070
13071            # Extra M4 quote needed to protect [] in grep expression.
13072            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13073            if test "x$FOUND_VERSION_78" = x; then
13074              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13076              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13077$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13078              BOOT_JDK_FOUND=no
13079            else
13080              # We're done! :-)
13081              BOOT_JDK_FOUND=yes
13082
13083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13084
13085  # Input might be given as Windows format, start by converting to
13086  # unix format.
13087  path="$BOOT_JDK"
13088  new_path=`$CYGPATH -u "$path"`
13089
13090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13093  # "foo.exe" is OK but "foo" is an error.
13094  #
13095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13096  # It is also a way to make sure we got the proper file name for the real test later on.
13097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13098  if test "x$test_shortpath" = x; then
13099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13100$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13101    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13102  fi
13103
13104  # Call helper function which possibly converts this using DOS-style short mode.
13105  # If so, the updated path is stored in $new_path.
13106
13107  input_path="$new_path"
13108  # Check if we need to convert this using DOS-style short mode. If the path
13109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13110  # take no chances and rewrite it.
13111  # Note: m4 eats our [], so we need to use [ and ] instead.
13112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13113  if test "x$has_forbidden_chars" != x; then
13114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13118      # Going to short mode and back again did indeed matter. Since short mode is
13119      # case insensitive, let's make it lowercase to improve readability.
13120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13121      # Now convert it back to Unix-stile (cygpath)
13122      input_path=`$CYGPATH -u "$shortmode_path"`
13123      new_path="$input_path"
13124    fi
13125  fi
13126
13127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13128  if test "x$test_cygdrive_prefix" = x; then
13129    # As a simple fix, exclude /usr/bin since it's not a real path.
13130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13132      # a path prefixed by /cygdrive for fixpath to work.
13133      new_path="$CYGWIN_ROOT_PATH$input_path"
13134    fi
13135  fi
13136
13137
13138  if test "x$path" != "x$new_path"; then
13139    BOOT_JDK="$new_path"
13140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13142  fi
13143
13144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13145
13146  path="$BOOT_JDK"
13147  has_colon=`$ECHO $path | $GREP ^.:`
13148  new_path="$path"
13149  if test "x$has_colon" = x; then
13150    # Not in mixed or Windows style, start by that.
13151    new_path=`cmd //c echo $path`
13152  fi
13153
13154
13155  input_path="$new_path"
13156  # Check if we need to convert this using DOS-style short mode. If the path
13157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13158  # take no chances and rewrite it.
13159  # Note: m4 eats our [], so we need to use [ and ] instead.
13160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13161  if test "x$has_forbidden_chars" != x; then
13162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13164  fi
13165
13166
13167  windows_path="$new_path"
13168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13169    unix_path=`$CYGPATH -u "$windows_path"`
13170    new_path="$unix_path"
13171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13173    new_path="$unix_path"
13174  fi
13175
13176  if test "x$path" != "x$new_path"; then
13177    BOOT_JDK="$new_path"
13178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13180  fi
13181
13182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13184
13185  else
13186    # We're on a posix platform. Hooray! :)
13187    path="$BOOT_JDK"
13188    has_space=`$ECHO "$path" | $GREP " "`
13189    if test "x$has_space" != x; then
13190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13192      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13193    fi
13194
13195    # Use eval to expand a potential ~
13196    eval path="$path"
13197    if test ! -f "$path" && test ! -d "$path"; then
13198      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13199    fi
13200
13201    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13202  fi
13203
13204              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13205$as_echo_n "checking for Boot JDK... " >&6; }
13206              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13207$as_echo "$BOOT_JDK" >&6; }
13208              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13209$as_echo_n "checking Boot JDK version... " >&6; }
13210              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13211              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13212$as_echo "$BOOT_JDK_VERSION" >&6; }
13213            fi # end check jdk version
13214          fi # end check rt.jar
13215        fi # end check javac
13216      fi # end check java
13217    fi # end check boot jdk found
13218  fi
13219
13220
13221  if test "x$BOOT_JDK_FOUND" = xno; then
13222    # Now execute the test
13223
13224  if test "x$PROGRAMFILES" != x; then
13225    VIRTUAL_DIR="$PROGRAMFILES/Java"
13226
13227  windows_path="$VIRTUAL_DIR"
13228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13229    unix_path=`$CYGPATH -u "$windows_path"`
13230    VIRTUAL_DIR="$unix_path"
13231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13233    VIRTUAL_DIR="$unix_path"
13234  fi
13235
13236
13237  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13238  BOOT_JDK_SUFFIX=""
13239  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13240  if test "x$ALL_JDKS_FOUND" != x; then
13241    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13242
13243  if test "x$BOOT_JDK_FOUND" = xno; then
13244    # Now execute the test
13245
13246        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13247        if test -d "$BOOT_JDK"; then
13248          BOOT_JDK_FOUND=maybe
13249          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13250$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13251        fi
13252
13253
13254    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13255    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13256      # Do we have a bin/java?
13257      if test ! -x "$BOOT_JDK/bin/java"; then
13258        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13260        BOOT_JDK_FOUND=no
13261      else
13262        # Do we have a bin/javac?
13263        if test ! -x "$BOOT_JDK/bin/javac"; then
13264          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13266          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13267$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13268          BOOT_JDK_FOUND=no
13269        else
13270          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13271          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13272            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13274            BOOT_JDK_FOUND=no
13275          else
13276            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13277            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13278
13279            # Extra M4 quote needed to protect [] in grep expression.
13280            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13281            if test "x$FOUND_VERSION_78" = x; then
13282              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13284              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13285$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13286              BOOT_JDK_FOUND=no
13287            else
13288              # We're done! :-)
13289              BOOT_JDK_FOUND=yes
13290
13291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13292
13293  # Input might be given as Windows format, start by converting to
13294  # unix format.
13295  path="$BOOT_JDK"
13296  new_path=`$CYGPATH -u "$path"`
13297
13298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13301  # "foo.exe" is OK but "foo" is an error.
13302  #
13303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13304  # It is also a way to make sure we got the proper file name for the real test later on.
13305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13306  if test "x$test_shortpath" = x; then
13307    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13308$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13309    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13310  fi
13311
13312  # Call helper function which possibly converts this using DOS-style short mode.
13313  # If so, the updated path is stored in $new_path.
13314
13315  input_path="$new_path"
13316  # Check if we need to convert this using DOS-style short mode. If the path
13317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13318  # take no chances and rewrite it.
13319  # Note: m4 eats our [], so we need to use [ and ] instead.
13320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13321  if test "x$has_forbidden_chars" != x; then
13322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13326      # Going to short mode and back again did indeed matter. Since short mode is
13327      # case insensitive, let's make it lowercase to improve readability.
13328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13329      # Now convert it back to Unix-stile (cygpath)
13330      input_path=`$CYGPATH -u "$shortmode_path"`
13331      new_path="$input_path"
13332    fi
13333  fi
13334
13335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13336  if test "x$test_cygdrive_prefix" = x; then
13337    # As a simple fix, exclude /usr/bin since it's not a real path.
13338    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13340      # a path prefixed by /cygdrive for fixpath to work.
13341      new_path="$CYGWIN_ROOT_PATH$input_path"
13342    fi
13343  fi
13344
13345
13346  if test "x$path" != "x$new_path"; then
13347    BOOT_JDK="$new_path"
13348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13349$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13350  fi
13351
13352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13353
13354  path="$BOOT_JDK"
13355  has_colon=`$ECHO $path | $GREP ^.:`
13356  new_path="$path"
13357  if test "x$has_colon" = x; then
13358    # Not in mixed or Windows style, start by that.
13359    new_path=`cmd //c echo $path`
13360  fi
13361
13362
13363  input_path="$new_path"
13364  # Check if we need to convert this using DOS-style short mode. If the path
13365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13366  # take no chances and rewrite it.
13367  # Note: m4 eats our [], so we need to use [ and ] instead.
13368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13369  if test "x$has_forbidden_chars" != x; then
13370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13372  fi
13373
13374
13375  windows_path="$new_path"
13376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13377    unix_path=`$CYGPATH -u "$windows_path"`
13378    new_path="$unix_path"
13379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13381    new_path="$unix_path"
13382  fi
13383
13384  if test "x$path" != "x$new_path"; then
13385    BOOT_JDK="$new_path"
13386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13387$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13388  fi
13389
13390  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13391  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13392
13393  else
13394    # We're on a posix platform. Hooray! :)
13395    path="$BOOT_JDK"
13396    has_space=`$ECHO "$path" | $GREP " "`
13397    if test "x$has_space" != x; then
13398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13399$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13400      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13401    fi
13402
13403    # Use eval to expand a potential ~
13404    eval path="$path"
13405    if test ! -f "$path" && test ! -d "$path"; then
13406      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13407    fi
13408
13409    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13410  fi
13411
13412              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13413$as_echo_n "checking for Boot JDK... " >&6; }
13414              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13415$as_echo "$BOOT_JDK" >&6; }
13416              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13417$as_echo_n "checking Boot JDK version... " >&6; }
13418              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13419              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13420$as_echo "$BOOT_JDK_VERSION" >&6; }
13421            fi # end check jdk version
13422          fi # end check rt.jar
13423        fi # end check javac
13424      fi # end check java
13425    fi # end check boot jdk found
13426  fi
13427
13428    done
13429  fi
13430
13431  fi
13432
13433
13434    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13435    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13436      # Do we have a bin/java?
13437      if test ! -x "$BOOT_JDK/bin/java"; then
13438        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13440        BOOT_JDK_FOUND=no
13441      else
13442        # Do we have a bin/javac?
13443        if test ! -x "$BOOT_JDK/bin/javac"; then
13444          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13446          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13447$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13448          BOOT_JDK_FOUND=no
13449        else
13450          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13451          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13452            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13454            BOOT_JDK_FOUND=no
13455          else
13456            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13457            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13458
13459            # Extra M4 quote needed to protect [] in grep expression.
13460            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13461            if test "x$FOUND_VERSION_78" = x; then
13462              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13463$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13464              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13465$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13466              BOOT_JDK_FOUND=no
13467            else
13468              # We're done! :-)
13469              BOOT_JDK_FOUND=yes
13470
13471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13472
13473  # Input might be given as Windows format, start by converting to
13474  # unix format.
13475  path="$BOOT_JDK"
13476  new_path=`$CYGPATH -u "$path"`
13477
13478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13481  # "foo.exe" is OK but "foo" is an error.
13482  #
13483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13484  # It is also a way to make sure we got the proper file name for the real test later on.
13485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13486  if test "x$test_shortpath" = x; then
13487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13488$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13489    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13490  fi
13491
13492  # Call helper function which possibly converts this using DOS-style short mode.
13493  # If so, the updated path is stored in $new_path.
13494
13495  input_path="$new_path"
13496  # Check if we need to convert this using DOS-style short mode. If the path
13497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13498  # take no chances and rewrite it.
13499  # Note: m4 eats our [], so we need to use [ and ] instead.
13500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13501  if test "x$has_forbidden_chars" != x; then
13502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13506      # Going to short mode and back again did indeed matter. Since short mode is
13507      # case insensitive, let's make it lowercase to improve readability.
13508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13509      # Now convert it back to Unix-stile (cygpath)
13510      input_path=`$CYGPATH -u "$shortmode_path"`
13511      new_path="$input_path"
13512    fi
13513  fi
13514
13515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13516  if test "x$test_cygdrive_prefix" = x; then
13517    # As a simple fix, exclude /usr/bin since it's not a real path.
13518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13520      # a path prefixed by /cygdrive for fixpath to work.
13521      new_path="$CYGWIN_ROOT_PATH$input_path"
13522    fi
13523  fi
13524
13525
13526  if test "x$path" != "x$new_path"; then
13527    BOOT_JDK="$new_path"
13528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13530  fi
13531
13532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13533
13534  path="$BOOT_JDK"
13535  has_colon=`$ECHO $path | $GREP ^.:`
13536  new_path="$path"
13537  if test "x$has_colon" = x; then
13538    # Not in mixed or Windows style, start by that.
13539    new_path=`cmd //c echo $path`
13540  fi
13541
13542
13543  input_path="$new_path"
13544  # Check if we need to convert this using DOS-style short mode. If the path
13545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13546  # take no chances and rewrite it.
13547  # Note: m4 eats our [], so we need to use [ and ] instead.
13548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13549  if test "x$has_forbidden_chars" != x; then
13550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13552  fi
13553
13554
13555  windows_path="$new_path"
13556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13557    unix_path=`$CYGPATH -u "$windows_path"`
13558    new_path="$unix_path"
13559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13561    new_path="$unix_path"
13562  fi
13563
13564  if test "x$path" != "x$new_path"; then
13565    BOOT_JDK="$new_path"
13566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13567$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13568  fi
13569
13570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13572
13573  else
13574    # We're on a posix platform. Hooray! :)
13575    path="$BOOT_JDK"
13576    has_space=`$ECHO "$path" | $GREP " "`
13577    if test "x$has_space" != x; then
13578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13579$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13580      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13581    fi
13582
13583    # Use eval to expand a potential ~
13584    eval path="$path"
13585    if test ! -f "$path" && test ! -d "$path"; then
13586      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13587    fi
13588
13589    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13590  fi
13591
13592              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13593$as_echo_n "checking for Boot JDK... " >&6; }
13594              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13595$as_echo "$BOOT_JDK" >&6; }
13596              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13597$as_echo_n "checking Boot JDK version... " >&6; }
13598              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13599              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13600$as_echo "$BOOT_JDK_VERSION" >&6; }
13601            fi # end check jdk version
13602          fi # end check rt.jar
13603        fi # end check javac
13604      fi # end check java
13605    fi # end check boot jdk found
13606  fi
13607
13608
13609  if test "x$BOOT_JDK_FOUND" = xno; then
13610    # Now execute the test
13611
13612  if test "x$ProgramFiles" != x; then
13613    VIRTUAL_DIR="$ProgramFiles/Java"
13614
13615  windows_path="$VIRTUAL_DIR"
13616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13617    unix_path=`$CYGPATH -u "$windows_path"`
13618    VIRTUAL_DIR="$unix_path"
13619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13621    VIRTUAL_DIR="$unix_path"
13622  fi
13623
13624
13625  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13626  BOOT_JDK_SUFFIX=""
13627  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13628  if test "x$ALL_JDKS_FOUND" != x; then
13629    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13630
13631  if test "x$BOOT_JDK_FOUND" = xno; then
13632    # Now execute the test
13633
13634        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13635        if test -d "$BOOT_JDK"; then
13636          BOOT_JDK_FOUND=maybe
13637          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13638$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13639        fi
13640
13641
13642    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13643    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13644      # Do we have a bin/java?
13645      if test ! -x "$BOOT_JDK/bin/java"; then
13646        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13647$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13648        BOOT_JDK_FOUND=no
13649      else
13650        # Do we have a bin/javac?
13651        if test ! -x "$BOOT_JDK/bin/javac"; then
13652          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13654          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13655$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13656          BOOT_JDK_FOUND=no
13657        else
13658          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13659          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13660            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13662            BOOT_JDK_FOUND=no
13663          else
13664            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13665            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13666
13667            # Extra M4 quote needed to protect [] in grep expression.
13668            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13669            if test "x$FOUND_VERSION_78" = x; then
13670              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13672              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13673$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13674              BOOT_JDK_FOUND=no
13675            else
13676              # We're done! :-)
13677              BOOT_JDK_FOUND=yes
13678
13679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13680
13681  # Input might be given as Windows format, start by converting to
13682  # unix format.
13683  path="$BOOT_JDK"
13684  new_path=`$CYGPATH -u "$path"`
13685
13686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13689  # "foo.exe" is OK but "foo" is an error.
13690  #
13691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13692  # It is also a way to make sure we got the proper file name for the real test later on.
13693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13694  if test "x$test_shortpath" = x; then
13695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13696$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13697    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13698  fi
13699
13700  # Call helper function which possibly converts this using DOS-style short mode.
13701  # If so, the updated path is stored in $new_path.
13702
13703  input_path="$new_path"
13704  # Check if we need to convert this using DOS-style short mode. If the path
13705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13706  # take no chances and rewrite it.
13707  # Note: m4 eats our [], so we need to use [ and ] instead.
13708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13709  if test "x$has_forbidden_chars" != x; then
13710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13714      # Going to short mode and back again did indeed matter. Since short mode is
13715      # case insensitive, let's make it lowercase to improve readability.
13716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13717      # Now convert it back to Unix-stile (cygpath)
13718      input_path=`$CYGPATH -u "$shortmode_path"`
13719      new_path="$input_path"
13720    fi
13721  fi
13722
13723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13724  if test "x$test_cygdrive_prefix" = x; then
13725    # As a simple fix, exclude /usr/bin since it's not a real path.
13726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13728      # a path prefixed by /cygdrive for fixpath to work.
13729      new_path="$CYGWIN_ROOT_PATH$input_path"
13730    fi
13731  fi
13732
13733
13734  if test "x$path" != "x$new_path"; then
13735    BOOT_JDK="$new_path"
13736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13737$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13738  fi
13739
13740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13741
13742  path="$BOOT_JDK"
13743  has_colon=`$ECHO $path | $GREP ^.:`
13744  new_path="$path"
13745  if test "x$has_colon" = x; then
13746    # Not in mixed or Windows style, start by that.
13747    new_path=`cmd //c echo $path`
13748  fi
13749
13750
13751  input_path="$new_path"
13752  # Check if we need to convert this using DOS-style short mode. If the path
13753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13754  # take no chances and rewrite it.
13755  # Note: m4 eats our [], so we need to use [ and ] instead.
13756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13757  if test "x$has_forbidden_chars" != x; then
13758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13760  fi
13761
13762
13763  windows_path="$new_path"
13764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13765    unix_path=`$CYGPATH -u "$windows_path"`
13766    new_path="$unix_path"
13767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13769    new_path="$unix_path"
13770  fi
13771
13772  if test "x$path" != "x$new_path"; then
13773    BOOT_JDK="$new_path"
13774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13775$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13776  fi
13777
13778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13780
13781  else
13782    # We're on a posix platform. Hooray! :)
13783    path="$BOOT_JDK"
13784    has_space=`$ECHO "$path" | $GREP " "`
13785    if test "x$has_space" != x; then
13786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13787$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13788      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13789    fi
13790
13791    # Use eval to expand a potential ~
13792    eval path="$path"
13793    if test ! -f "$path" && test ! -d "$path"; then
13794      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13795    fi
13796
13797    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13798  fi
13799
13800              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13801$as_echo_n "checking for Boot JDK... " >&6; }
13802              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13803$as_echo "$BOOT_JDK" >&6; }
13804              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13805$as_echo_n "checking Boot JDK version... " >&6; }
13806              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13807              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13808$as_echo "$BOOT_JDK_VERSION" >&6; }
13809            fi # end check jdk version
13810          fi # end check rt.jar
13811        fi # end check javac
13812      fi # end check java
13813    fi # end check boot jdk found
13814  fi
13815
13816    done
13817  fi
13818
13819  fi
13820
13821
13822    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13823    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13824      # Do we have a bin/java?
13825      if test ! -x "$BOOT_JDK/bin/java"; then
13826        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13828        BOOT_JDK_FOUND=no
13829      else
13830        # Do we have a bin/javac?
13831        if test ! -x "$BOOT_JDK/bin/javac"; then
13832          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13834          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13835$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13836          BOOT_JDK_FOUND=no
13837        else
13838          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13839          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13840            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13842            BOOT_JDK_FOUND=no
13843          else
13844            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13845            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13846
13847            # Extra M4 quote needed to protect [] in grep expression.
13848            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13849            if test "x$FOUND_VERSION_78" = x; then
13850              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13852              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13853$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13854              BOOT_JDK_FOUND=no
13855            else
13856              # We're done! :-)
13857              BOOT_JDK_FOUND=yes
13858
13859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13860
13861  # Input might be given as Windows format, start by converting to
13862  # unix format.
13863  path="$BOOT_JDK"
13864  new_path=`$CYGPATH -u "$path"`
13865
13866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13869  # "foo.exe" is OK but "foo" is an error.
13870  #
13871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13872  # It is also a way to make sure we got the proper file name for the real test later on.
13873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13874  if test "x$test_shortpath" = x; then
13875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13876$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13877    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13878  fi
13879
13880  # Call helper function which possibly converts this using DOS-style short mode.
13881  # If so, the updated path is stored in $new_path.
13882
13883  input_path="$new_path"
13884  # Check if we need to convert this using DOS-style short mode. If the path
13885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13886  # take no chances and rewrite it.
13887  # Note: m4 eats our [], so we need to use [ and ] instead.
13888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13889  if test "x$has_forbidden_chars" != x; then
13890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13894      # Going to short mode and back again did indeed matter. Since short mode is
13895      # case insensitive, let's make it lowercase to improve readability.
13896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13897      # Now convert it back to Unix-stile (cygpath)
13898      input_path=`$CYGPATH -u "$shortmode_path"`
13899      new_path="$input_path"
13900    fi
13901  fi
13902
13903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13904  if test "x$test_cygdrive_prefix" = x; then
13905    # As a simple fix, exclude /usr/bin since it's not a real path.
13906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13908      # a path prefixed by /cygdrive for fixpath to work.
13909      new_path="$CYGWIN_ROOT_PATH$input_path"
13910    fi
13911  fi
13912
13913
13914  if test "x$path" != "x$new_path"; then
13915    BOOT_JDK="$new_path"
13916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13918  fi
13919
13920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13921
13922  path="$BOOT_JDK"
13923  has_colon=`$ECHO $path | $GREP ^.:`
13924  new_path="$path"
13925  if test "x$has_colon" = x; then
13926    # Not in mixed or Windows style, start by that.
13927    new_path=`cmd //c echo $path`
13928  fi
13929
13930
13931  input_path="$new_path"
13932  # Check if we need to convert this using DOS-style short mode. If the path
13933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13934  # take no chances and rewrite it.
13935  # Note: m4 eats our [], so we need to use [ and ] instead.
13936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13937  if test "x$has_forbidden_chars" != x; then
13938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13940  fi
13941
13942
13943  windows_path="$new_path"
13944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13945    unix_path=`$CYGPATH -u "$windows_path"`
13946    new_path="$unix_path"
13947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13949    new_path="$unix_path"
13950  fi
13951
13952  if test "x$path" != "x$new_path"; then
13953    BOOT_JDK="$new_path"
13954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13955$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13956  fi
13957
13958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13960
13961  else
13962    # We're on a posix platform. Hooray! :)
13963    path="$BOOT_JDK"
13964    has_space=`$ECHO "$path" | $GREP " "`
13965    if test "x$has_space" != x; then
13966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13967$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13968      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13969    fi
13970
13971    # Use eval to expand a potential ~
13972    eval path="$path"
13973    if test ! -f "$path" && test ! -d "$path"; then
13974      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13975    fi
13976
13977    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13978  fi
13979
13980              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13981$as_echo_n "checking for Boot JDK... " >&6; }
13982              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13983$as_echo "$BOOT_JDK" >&6; }
13984              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13985$as_echo_n "checking Boot JDK version... " >&6; }
13986              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13987              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13988$as_echo "$BOOT_JDK_VERSION" >&6; }
13989            fi # end check jdk version
13990          fi # end check rt.jar
13991        fi # end check javac
13992      fi # end check java
13993    fi # end check boot jdk found
13994  fi
13995
13996
13997  if test "x$BOOT_JDK_FOUND" = xno; then
13998    # Now execute the test
13999
14000  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14001  BOOT_JDK_SUFFIX=""
14002  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14003  if test "x$ALL_JDKS_FOUND" != x; then
14004    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14005
14006  if test "x$BOOT_JDK_FOUND" = xno; then
14007    # Now execute the test
14008
14009        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14010        if test -d "$BOOT_JDK"; then
14011          BOOT_JDK_FOUND=maybe
14012          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14013$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14014        fi
14015
14016
14017    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14018    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14019      # Do we have a bin/java?
14020      if test ! -x "$BOOT_JDK/bin/java"; then
14021        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14023        BOOT_JDK_FOUND=no
14024      else
14025        # Do we have a bin/javac?
14026        if test ! -x "$BOOT_JDK/bin/javac"; then
14027          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14029          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14030$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14031          BOOT_JDK_FOUND=no
14032        else
14033          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14034          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14035            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14037            BOOT_JDK_FOUND=no
14038          else
14039            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14040            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14041
14042            # Extra M4 quote needed to protect [] in grep expression.
14043            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14044            if test "x$FOUND_VERSION_78" = x; then
14045              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14047              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14048$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14049              BOOT_JDK_FOUND=no
14050            else
14051              # We're done! :-)
14052              BOOT_JDK_FOUND=yes
14053
14054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14055
14056  # Input might be given as Windows format, start by converting to
14057  # unix format.
14058  path="$BOOT_JDK"
14059  new_path=`$CYGPATH -u "$path"`
14060
14061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14064  # "foo.exe" is OK but "foo" is an error.
14065  #
14066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14067  # It is also a way to make sure we got the proper file name for the real test later on.
14068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14069  if test "x$test_shortpath" = x; then
14070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14071$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14072    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14073  fi
14074
14075  # Call helper function which possibly converts this using DOS-style short mode.
14076  # If so, the updated path is stored in $new_path.
14077
14078  input_path="$new_path"
14079  # Check if we need to convert this using DOS-style short mode. If the path
14080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14081  # take no chances and rewrite it.
14082  # Note: m4 eats our [], so we need to use [ and ] instead.
14083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14084  if test "x$has_forbidden_chars" != x; then
14085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14089      # Going to short mode and back again did indeed matter. Since short mode is
14090      # case insensitive, let's make it lowercase to improve readability.
14091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14092      # Now convert it back to Unix-stile (cygpath)
14093      input_path=`$CYGPATH -u "$shortmode_path"`
14094      new_path="$input_path"
14095    fi
14096  fi
14097
14098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14099  if test "x$test_cygdrive_prefix" = x; then
14100    # As a simple fix, exclude /usr/bin since it's not a real path.
14101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14103      # a path prefixed by /cygdrive for fixpath to work.
14104      new_path="$CYGWIN_ROOT_PATH$input_path"
14105    fi
14106  fi
14107
14108
14109  if test "x$path" != "x$new_path"; then
14110    BOOT_JDK="$new_path"
14111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14113  fi
14114
14115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14116
14117  path="$BOOT_JDK"
14118  has_colon=`$ECHO $path | $GREP ^.:`
14119  new_path="$path"
14120  if test "x$has_colon" = x; then
14121    # Not in mixed or Windows style, start by that.
14122    new_path=`cmd //c echo $path`
14123  fi
14124
14125
14126  input_path="$new_path"
14127  # Check if we need to convert this using DOS-style short mode. If the path
14128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14129  # take no chances and rewrite it.
14130  # Note: m4 eats our [], so we need to use [ and ] instead.
14131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14132  if test "x$has_forbidden_chars" != x; then
14133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14135  fi
14136
14137
14138  windows_path="$new_path"
14139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14140    unix_path=`$CYGPATH -u "$windows_path"`
14141    new_path="$unix_path"
14142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14144    new_path="$unix_path"
14145  fi
14146
14147  if test "x$path" != "x$new_path"; then
14148    BOOT_JDK="$new_path"
14149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14150$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14151  fi
14152
14153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14155
14156  else
14157    # We're on a posix platform. Hooray! :)
14158    path="$BOOT_JDK"
14159    has_space=`$ECHO "$path" | $GREP " "`
14160    if test "x$has_space" != x; then
14161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14162$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14163      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14164    fi
14165
14166    # Use eval to expand a potential ~
14167    eval path="$path"
14168    if test ! -f "$path" && test ! -d "$path"; then
14169      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14170    fi
14171
14172    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14173  fi
14174
14175              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14176$as_echo_n "checking for Boot JDK... " >&6; }
14177              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14178$as_echo "$BOOT_JDK" >&6; }
14179              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14180$as_echo_n "checking Boot JDK version... " >&6; }
14181              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14182              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14183$as_echo "$BOOT_JDK_VERSION" >&6; }
14184            fi # end check jdk version
14185          fi # end check rt.jar
14186        fi # end check javac
14187      fi # end check java
14188    fi # end check boot jdk found
14189  fi
14190
14191    done
14192  fi
14193
14194
14195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14196    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14197      # Do we have a bin/java?
14198      if test ! -x "$BOOT_JDK/bin/java"; then
14199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14201        BOOT_JDK_FOUND=no
14202      else
14203        # Do we have a bin/javac?
14204        if test ! -x "$BOOT_JDK/bin/javac"; then
14205          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14207          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14208$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14209          BOOT_JDK_FOUND=no
14210        else
14211          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14212          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14213            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14215            BOOT_JDK_FOUND=no
14216          else
14217            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14218            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14219
14220            # Extra M4 quote needed to protect [] in grep expression.
14221            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14222            if test "x$FOUND_VERSION_78" = x; then
14223              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14225              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14226$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14227              BOOT_JDK_FOUND=no
14228            else
14229              # We're done! :-)
14230              BOOT_JDK_FOUND=yes
14231
14232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14233
14234  # Input might be given as Windows format, start by converting to
14235  # unix format.
14236  path="$BOOT_JDK"
14237  new_path=`$CYGPATH -u "$path"`
14238
14239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14242  # "foo.exe" is OK but "foo" is an error.
14243  #
14244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14245  # It is also a way to make sure we got the proper file name for the real test later on.
14246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14247  if test "x$test_shortpath" = x; then
14248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14249$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14250    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14251  fi
14252
14253  # Call helper function which possibly converts this using DOS-style short mode.
14254  # If so, the updated path is stored in $new_path.
14255
14256  input_path="$new_path"
14257  # Check if we need to convert this using DOS-style short mode. If the path
14258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14259  # take no chances and rewrite it.
14260  # Note: m4 eats our [], so we need to use [ and ] instead.
14261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14262  if test "x$has_forbidden_chars" != x; then
14263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14267      # Going to short mode and back again did indeed matter. Since short mode is
14268      # case insensitive, let's make it lowercase to improve readability.
14269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14270      # Now convert it back to Unix-stile (cygpath)
14271      input_path=`$CYGPATH -u "$shortmode_path"`
14272      new_path="$input_path"
14273    fi
14274  fi
14275
14276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14277  if test "x$test_cygdrive_prefix" = x; then
14278    # As a simple fix, exclude /usr/bin since it's not a real path.
14279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14281      # a path prefixed by /cygdrive for fixpath to work.
14282      new_path="$CYGWIN_ROOT_PATH$input_path"
14283    fi
14284  fi
14285
14286
14287  if test "x$path" != "x$new_path"; then
14288    BOOT_JDK="$new_path"
14289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14290$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14291  fi
14292
14293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14294
14295  path="$BOOT_JDK"
14296  has_colon=`$ECHO $path | $GREP ^.:`
14297  new_path="$path"
14298  if test "x$has_colon" = x; then
14299    # Not in mixed or Windows style, start by that.
14300    new_path=`cmd //c echo $path`
14301  fi
14302
14303
14304  input_path="$new_path"
14305  # Check if we need to convert this using DOS-style short mode. If the path
14306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14307  # take no chances and rewrite it.
14308  # Note: m4 eats our [], so we need to use [ and ] instead.
14309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14310  if test "x$has_forbidden_chars" != x; then
14311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14313  fi
14314
14315
14316  windows_path="$new_path"
14317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14318    unix_path=`$CYGPATH -u "$windows_path"`
14319    new_path="$unix_path"
14320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14322    new_path="$unix_path"
14323  fi
14324
14325  if test "x$path" != "x$new_path"; then
14326    BOOT_JDK="$new_path"
14327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14328$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14329  fi
14330
14331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14333
14334  else
14335    # We're on a posix platform. Hooray! :)
14336    path="$BOOT_JDK"
14337    has_space=`$ECHO "$path" | $GREP " "`
14338    if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
14342    fi
14343
14344    # Use eval to expand a potential ~
14345    eval path="$path"
14346    if test ! -f "$path" && test ! -d "$path"; then
14347      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14348    fi
14349
14350    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14351  fi
14352
14353              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14354$as_echo_n "checking for Boot JDK... " >&6; }
14355              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14356$as_echo "$BOOT_JDK" >&6; }
14357              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14358$as_echo_n "checking Boot JDK version... " >&6; }
14359              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14360              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14361$as_echo "$BOOT_JDK_VERSION" >&6; }
14362            fi # end check jdk version
14363          fi # end check rt.jar
14364        fi # end check javac
14365      fi # end check java
14366    fi # end check boot jdk found
14367  fi
14368
14369  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14370
14371  if test "x$BOOT_JDK_FOUND" = xno; then
14372    # Now execute the test
14373
14374  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14375  BOOT_JDK_SUFFIX="/Contents/Home"
14376  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14377  if test "x$ALL_JDKS_FOUND" != x; then
14378    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14379
14380  if test "x$BOOT_JDK_FOUND" = xno; then
14381    # Now execute the test
14382
14383        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14384        if test -d "$BOOT_JDK"; then
14385          BOOT_JDK_FOUND=maybe
14386          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14387$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14388        fi
14389
14390
14391    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14392    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14393      # Do we have a bin/java?
14394      if test ! -x "$BOOT_JDK/bin/java"; then
14395        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14397        BOOT_JDK_FOUND=no
14398      else
14399        # Do we have a bin/javac?
14400        if test ! -x "$BOOT_JDK/bin/javac"; then
14401          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14403          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14404$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14405          BOOT_JDK_FOUND=no
14406        else
14407          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14408          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14409            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14411            BOOT_JDK_FOUND=no
14412          else
14413            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14414            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14415
14416            # Extra M4 quote needed to protect [] in grep expression.
14417            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14418            if test "x$FOUND_VERSION_78" = x; then
14419              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14421              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14422$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14423              BOOT_JDK_FOUND=no
14424            else
14425              # We're done! :-)
14426              BOOT_JDK_FOUND=yes
14427
14428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14429
14430  # Input might be given as Windows format, start by converting to
14431  # unix format.
14432  path="$BOOT_JDK"
14433  new_path=`$CYGPATH -u "$path"`
14434
14435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14438  # "foo.exe" is OK but "foo" is an error.
14439  #
14440  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14441  # It is also a way to make sure we got the proper file name for the real test later on.
14442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14443  if test "x$test_shortpath" = x; then
14444    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14445$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14446    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14447  fi
14448
14449  # Call helper function which possibly converts this using DOS-style short mode.
14450  # If so, the updated path is stored in $new_path.
14451
14452  input_path="$new_path"
14453  # Check if we need to convert this using DOS-style short mode. If the path
14454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14455  # take no chances and rewrite it.
14456  # Note: m4 eats our [], so we need to use [ and ] instead.
14457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14458  if test "x$has_forbidden_chars" != x; then
14459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14463      # Going to short mode and back again did indeed matter. Since short mode is
14464      # case insensitive, let's make it lowercase to improve readability.
14465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14466      # Now convert it back to Unix-stile (cygpath)
14467      input_path=`$CYGPATH -u "$shortmode_path"`
14468      new_path="$input_path"
14469    fi
14470  fi
14471
14472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14473  if test "x$test_cygdrive_prefix" = x; then
14474    # As a simple fix, exclude /usr/bin since it's not a real path.
14475    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14477      # a path prefixed by /cygdrive for fixpath to work.
14478      new_path="$CYGWIN_ROOT_PATH$input_path"
14479    fi
14480  fi
14481
14482
14483  if test "x$path" != "x$new_path"; then
14484    BOOT_JDK="$new_path"
14485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14487  fi
14488
14489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14490
14491  path="$BOOT_JDK"
14492  has_colon=`$ECHO $path | $GREP ^.:`
14493  new_path="$path"
14494  if test "x$has_colon" = x; then
14495    # Not in mixed or Windows style, start by that.
14496    new_path=`cmd //c echo $path`
14497  fi
14498
14499
14500  input_path="$new_path"
14501  # Check if we need to convert this using DOS-style short mode. If the path
14502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14503  # take no chances and rewrite it.
14504  # Note: m4 eats our [], so we need to use [ and ] instead.
14505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14506  if test "x$has_forbidden_chars" != x; then
14507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14509  fi
14510
14511
14512  windows_path="$new_path"
14513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14514    unix_path=`$CYGPATH -u "$windows_path"`
14515    new_path="$unix_path"
14516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14518    new_path="$unix_path"
14519  fi
14520
14521  if test "x$path" != "x$new_path"; then
14522    BOOT_JDK="$new_path"
14523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14525  fi
14526
14527  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14528  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14529
14530  else
14531    # We're on a posix platform. Hooray! :)
14532    path="$BOOT_JDK"
14533    has_space=`$ECHO "$path" | $GREP " "`
14534    if test "x$has_space" != x; then
14535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14536$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14537      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14538    fi
14539
14540    # Use eval to expand a potential ~
14541    eval path="$path"
14542    if test ! -f "$path" && test ! -d "$path"; then
14543      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14544    fi
14545
14546    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14547  fi
14548
14549              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14550$as_echo_n "checking for Boot JDK... " >&6; }
14551              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14552$as_echo "$BOOT_JDK" >&6; }
14553              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14554$as_echo_n "checking Boot JDK version... " >&6; }
14555              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14556              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14557$as_echo "$BOOT_JDK_VERSION" >&6; }
14558            fi # end check jdk version
14559          fi # end check rt.jar
14560        fi # end check javac
14561      fi # end check java
14562    fi # end check boot jdk found
14563  fi
14564
14565    done
14566  fi
14567
14568
14569    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14570    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14571      # Do we have a bin/java?
14572      if test ! -x "$BOOT_JDK/bin/java"; then
14573        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14575        BOOT_JDK_FOUND=no
14576      else
14577        # Do we have a bin/javac?
14578        if test ! -x "$BOOT_JDK/bin/javac"; then
14579          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14581          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14582$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14583          BOOT_JDK_FOUND=no
14584        else
14585          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14586          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14589            BOOT_JDK_FOUND=no
14590          else
14591            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14592            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14593
14594            # Extra M4 quote needed to protect [] in grep expression.
14595            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14596            if test "x$FOUND_VERSION_78" = x; then
14597              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14599              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14600$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14601              BOOT_JDK_FOUND=no
14602            else
14603              # We're done! :-)
14604              BOOT_JDK_FOUND=yes
14605
14606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14607
14608  # Input might be given as Windows format, start by converting to
14609  # unix format.
14610  path="$BOOT_JDK"
14611  new_path=`$CYGPATH -u "$path"`
14612
14613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14616  # "foo.exe" is OK but "foo" is an error.
14617  #
14618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14619  # It is also a way to make sure we got the proper file name for the real test later on.
14620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14621  if test "x$test_shortpath" = x; then
14622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14623$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14624    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14625  fi
14626
14627  # Call helper function which possibly converts this using DOS-style short mode.
14628  # If so, the updated path is stored in $new_path.
14629
14630  input_path="$new_path"
14631  # Check if we need to convert this using DOS-style short mode. If the path
14632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14633  # take no chances and rewrite it.
14634  # Note: m4 eats our [], so we need to use [ and ] instead.
14635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14636  if test "x$has_forbidden_chars" != x; then
14637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14641      # Going to short mode and back again did indeed matter. Since short mode is
14642      # case insensitive, let's make it lowercase to improve readability.
14643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14644      # Now convert it back to Unix-stile (cygpath)
14645      input_path=`$CYGPATH -u "$shortmode_path"`
14646      new_path="$input_path"
14647    fi
14648  fi
14649
14650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14651  if test "x$test_cygdrive_prefix" = x; then
14652    # As a simple fix, exclude /usr/bin since it's not a real path.
14653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14655      # a path prefixed by /cygdrive for fixpath to work.
14656      new_path="$CYGWIN_ROOT_PATH$input_path"
14657    fi
14658  fi
14659
14660
14661  if test "x$path" != "x$new_path"; then
14662    BOOT_JDK="$new_path"
14663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14664$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14665  fi
14666
14667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14668
14669  path="$BOOT_JDK"
14670  has_colon=`$ECHO $path | $GREP ^.:`
14671  new_path="$path"
14672  if test "x$has_colon" = x; then
14673    # Not in mixed or Windows style, start by that.
14674    new_path=`cmd //c echo $path`
14675  fi
14676
14677
14678  input_path="$new_path"
14679  # Check if we need to convert this using DOS-style short mode. If the path
14680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14681  # take no chances and rewrite it.
14682  # Note: m4 eats our [], so we need to use [ and ] instead.
14683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14684  if test "x$has_forbidden_chars" != x; then
14685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14687  fi
14688
14689
14690  windows_path="$new_path"
14691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14692    unix_path=`$CYGPATH -u "$windows_path"`
14693    new_path="$unix_path"
14694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14696    new_path="$unix_path"
14697  fi
14698
14699  if test "x$path" != "x$new_path"; then
14700    BOOT_JDK="$new_path"
14701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14702$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14703  fi
14704
14705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14707
14708  else
14709    # We're on a posix platform. Hooray! :)
14710    path="$BOOT_JDK"
14711    has_space=`$ECHO "$path" | $GREP " "`
14712    if test "x$has_space" != x; then
14713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14714$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14715      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14716    fi
14717
14718    # Use eval to expand a potential ~
14719    eval path="$path"
14720    if test ! -f "$path" && test ! -d "$path"; then
14721      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14722    fi
14723
14724    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14725  fi
14726
14727              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14728$as_echo_n "checking for Boot JDK... " >&6; }
14729              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14730$as_echo "$BOOT_JDK" >&6; }
14731              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14732$as_echo_n "checking Boot JDK version... " >&6; }
14733              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14734              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14735$as_echo "$BOOT_JDK_VERSION" >&6; }
14736            fi # end check jdk version
14737          fi # end check rt.jar
14738        fi # end check javac
14739      fi # end check java
14740    fi # end check boot jdk found
14741  fi
14742
14743
14744  if test "x$BOOT_JDK_FOUND" = xno; then
14745    # Now execute the test
14746
14747  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14748  BOOT_JDK_SUFFIX="/Contents/Home"
14749  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14750  if test "x$ALL_JDKS_FOUND" != x; then
14751    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14752
14753  if test "x$BOOT_JDK_FOUND" = xno; then
14754    # Now execute the test
14755
14756        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14757        if test -d "$BOOT_JDK"; then
14758          BOOT_JDK_FOUND=maybe
14759          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14760$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14761        fi
14762
14763
14764    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14765    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14766      # Do we have a bin/java?
14767      if test ! -x "$BOOT_JDK/bin/java"; then
14768        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14770        BOOT_JDK_FOUND=no
14771      else
14772        # Do we have a bin/javac?
14773        if test ! -x "$BOOT_JDK/bin/javac"; then
14774          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14775$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14776          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14777$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14778          BOOT_JDK_FOUND=no
14779        else
14780          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14781          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14782            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14784            BOOT_JDK_FOUND=no
14785          else
14786            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14787            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14788
14789            # Extra M4 quote needed to protect [] in grep expression.
14790            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14791            if test "x$FOUND_VERSION_78" = x; then
14792              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14794              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14795$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14796              BOOT_JDK_FOUND=no
14797            else
14798              # We're done! :-)
14799              BOOT_JDK_FOUND=yes
14800
14801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14802
14803  # Input might be given as Windows format, start by converting to
14804  # unix format.
14805  path="$BOOT_JDK"
14806  new_path=`$CYGPATH -u "$path"`
14807
14808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14811  # "foo.exe" is OK but "foo" is an error.
14812  #
14813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14814  # It is also a way to make sure we got the proper file name for the real test later on.
14815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14816  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14820  fi
14821
14822  # Call helper function which possibly converts this using DOS-style short mode.
14823  # If so, the updated path is stored in $new_path.
14824
14825  input_path="$new_path"
14826  # Check if we need to convert this using DOS-style short mode. If the path
14827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14828  # take no chances and rewrite it.
14829  # Note: m4 eats our [], so we need to use [ and ] instead.
14830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14831  if test "x$has_forbidden_chars" != x; then
14832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14836      # Going to short mode and back again did indeed matter. Since short mode is
14837      # case insensitive, let's make it lowercase to improve readability.
14838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14839      # Now convert it back to Unix-stile (cygpath)
14840      input_path=`$CYGPATH -u "$shortmode_path"`
14841      new_path="$input_path"
14842    fi
14843  fi
14844
14845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14846  if test "x$test_cygdrive_prefix" = x; then
14847    # As a simple fix, exclude /usr/bin since it's not a real path.
14848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14850      # a path prefixed by /cygdrive for fixpath to work.
14851      new_path="$CYGWIN_ROOT_PATH$input_path"
14852    fi
14853  fi
14854
14855
14856  if test "x$path" != "x$new_path"; then
14857    BOOT_JDK="$new_path"
14858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14860  fi
14861
14862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14863
14864  path="$BOOT_JDK"
14865  has_colon=`$ECHO $path | $GREP ^.:`
14866  new_path="$path"
14867  if test "x$has_colon" = x; then
14868    # Not in mixed or Windows style, start by that.
14869    new_path=`cmd //c echo $path`
14870  fi
14871
14872
14873  input_path="$new_path"
14874  # Check if we need to convert this using DOS-style short mode. If the path
14875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14876  # take no chances and rewrite it.
14877  # Note: m4 eats our [], so we need to use [ and ] instead.
14878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14879  if test "x$has_forbidden_chars" != x; then
14880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14882  fi
14883
14884
14885  windows_path="$new_path"
14886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14887    unix_path=`$CYGPATH -u "$windows_path"`
14888    new_path="$unix_path"
14889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14891    new_path="$unix_path"
14892  fi
14893
14894  if test "x$path" != "x$new_path"; then
14895    BOOT_JDK="$new_path"
14896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14898  fi
14899
14900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14902
14903  else
14904    # We're on a posix platform. Hooray! :)
14905    path="$BOOT_JDK"
14906    has_space=`$ECHO "$path" | $GREP " "`
14907    if test "x$has_space" != x; then
14908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14910      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14911    fi
14912
14913    # Use eval to expand a potential ~
14914    eval path="$path"
14915    if test ! -f "$path" && test ! -d "$path"; then
14916      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14917    fi
14918
14919    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14920  fi
14921
14922              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14923$as_echo_n "checking for Boot JDK... " >&6; }
14924              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14925$as_echo "$BOOT_JDK" >&6; }
14926              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14927$as_echo_n "checking Boot JDK version... " >&6; }
14928              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14929              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14930$as_echo "$BOOT_JDK_VERSION" >&6; }
14931            fi # end check jdk version
14932          fi # end check rt.jar
14933        fi # end check javac
14934      fi # end check java
14935    fi # end check boot jdk found
14936  fi
14937
14938    done
14939  fi
14940
14941
14942    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14943    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14944      # Do we have a bin/java?
14945      if test ! -x "$BOOT_JDK/bin/java"; then
14946        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14948        BOOT_JDK_FOUND=no
14949      else
14950        # Do we have a bin/javac?
14951        if test ! -x "$BOOT_JDK/bin/javac"; then
14952          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14954          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14955$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14956          BOOT_JDK_FOUND=no
14957        else
14958          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14959          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14960            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14962            BOOT_JDK_FOUND=no
14963          else
14964            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14965            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14966
14967            # Extra M4 quote needed to protect [] in grep expression.
14968            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14969            if test "x$FOUND_VERSION_78" = x; then
14970              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14972              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14973$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14974              BOOT_JDK_FOUND=no
14975            else
14976              # We're done! :-)
14977              BOOT_JDK_FOUND=yes
14978
14979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14980
14981  # Input might be given as Windows format, start by converting to
14982  # unix format.
14983  path="$BOOT_JDK"
14984  new_path=`$CYGPATH -u "$path"`
14985
14986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14989  # "foo.exe" is OK but "foo" is an error.
14990  #
14991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14992  # It is also a way to make sure we got the proper file name for the real test later on.
14993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14994  if test "x$test_shortpath" = x; then
14995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14997    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14998  fi
14999
15000  # Call helper function which possibly converts this using DOS-style short mode.
15001  # If so, the updated path is stored in $new_path.
15002
15003  input_path="$new_path"
15004  # Check if we need to convert this using DOS-style short mode. If the path
15005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15006  # take no chances and rewrite it.
15007  # Note: m4 eats our [], so we need to use [ and ] instead.
15008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15009  if test "x$has_forbidden_chars" != x; then
15010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15014      # Going to short mode and back again did indeed matter. Since short mode is
15015      # case insensitive, let's make it lowercase to improve readability.
15016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15017      # Now convert it back to Unix-stile (cygpath)
15018      input_path=`$CYGPATH -u "$shortmode_path"`
15019      new_path="$input_path"
15020    fi
15021  fi
15022
15023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15024  if test "x$test_cygdrive_prefix" = x; then
15025    # As a simple fix, exclude /usr/bin since it's not a real path.
15026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15028      # a path prefixed by /cygdrive for fixpath to work.
15029      new_path="$CYGWIN_ROOT_PATH$input_path"
15030    fi
15031  fi
15032
15033
15034  if test "x$path" != "x$new_path"; then
15035    BOOT_JDK="$new_path"
15036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15038  fi
15039
15040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15041
15042  path="$BOOT_JDK"
15043  has_colon=`$ECHO $path | $GREP ^.:`
15044  new_path="$path"
15045  if test "x$has_colon" = x; then
15046    # Not in mixed or Windows style, start by that.
15047    new_path=`cmd //c echo $path`
15048  fi
15049
15050
15051  input_path="$new_path"
15052  # Check if we need to convert this using DOS-style short mode. If the path
15053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15054  # take no chances and rewrite it.
15055  # Note: m4 eats our [], so we need to use [ and ] instead.
15056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15057  if test "x$has_forbidden_chars" != x; then
15058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15060  fi
15061
15062
15063  windows_path="$new_path"
15064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15065    unix_path=`$CYGPATH -u "$windows_path"`
15066    new_path="$unix_path"
15067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15069    new_path="$unix_path"
15070  fi
15071
15072  if test "x$path" != "x$new_path"; then
15073    BOOT_JDK="$new_path"
15074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15076  fi
15077
15078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15080
15081  else
15082    # We're on a posix platform. Hooray! :)
15083    path="$BOOT_JDK"
15084    has_space=`$ECHO "$path" | $GREP " "`
15085    if test "x$has_space" != x; then
15086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15088      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15089    fi
15090
15091    # Use eval to expand a potential ~
15092    eval path="$path"
15093    if test ! -f "$path" && test ! -d "$path"; then
15094      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15095    fi
15096
15097    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15098  fi
15099
15100              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15101$as_echo_n "checking for Boot JDK... " >&6; }
15102              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15103$as_echo "$BOOT_JDK" >&6; }
15104              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15105$as_echo_n "checking Boot JDK version... " >&6; }
15106              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15107              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15108$as_echo "$BOOT_JDK_VERSION" >&6; }
15109            fi # end check jdk version
15110          fi # end check rt.jar
15111        fi # end check javac
15112      fi # end check java
15113    fi # end check boot jdk found
15114  fi
15115
15116  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15117
15118  if test "x$BOOT_JDK_FOUND" = xno; then
15119    # Now execute the test
15120
15121  BOOT_JDK_PREFIX="/usr/lib/jvm"
15122  BOOT_JDK_SUFFIX=""
15123  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15124  if test "x$ALL_JDKS_FOUND" != x; then
15125    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15126
15127  if test "x$BOOT_JDK_FOUND" = xno; then
15128    # Now execute the test
15129
15130        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15131        if test -d "$BOOT_JDK"; then
15132          BOOT_JDK_FOUND=maybe
15133          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15134$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15135        fi
15136
15137
15138    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15139    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15140      # Do we have a bin/java?
15141      if test ! -x "$BOOT_JDK/bin/java"; then
15142        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15144        BOOT_JDK_FOUND=no
15145      else
15146        # Do we have a bin/javac?
15147        if test ! -x "$BOOT_JDK/bin/javac"; then
15148          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15150          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15151$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15152          BOOT_JDK_FOUND=no
15153        else
15154          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15155          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15156            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15158            BOOT_JDK_FOUND=no
15159          else
15160            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15161            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15162
15163            # Extra M4 quote needed to protect [] in grep expression.
15164            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15165            if test "x$FOUND_VERSION_78" = x; then
15166              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15168              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15169$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15170              BOOT_JDK_FOUND=no
15171            else
15172              # We're done! :-)
15173              BOOT_JDK_FOUND=yes
15174
15175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15176
15177  # Input might be given as Windows format, start by converting to
15178  # unix format.
15179  path="$BOOT_JDK"
15180  new_path=`$CYGPATH -u "$path"`
15181
15182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15185  # "foo.exe" is OK but "foo" is an error.
15186  #
15187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15188  # It is also a way to make sure we got the proper file name for the real test later on.
15189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15190  if test "x$test_shortpath" = x; then
15191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15193    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15194  fi
15195
15196  # Call helper function which possibly converts this using DOS-style short mode.
15197  # If so, the updated path is stored in $new_path.
15198
15199  input_path="$new_path"
15200  # Check if we need to convert this using DOS-style short mode. If the path
15201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15202  # take no chances and rewrite it.
15203  # Note: m4 eats our [], so we need to use [ and ] instead.
15204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15205  if test "x$has_forbidden_chars" != x; then
15206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15210      # Going to short mode and back again did indeed matter. Since short mode is
15211      # case insensitive, let's make it lowercase to improve readability.
15212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15213      # Now convert it back to Unix-stile (cygpath)
15214      input_path=`$CYGPATH -u "$shortmode_path"`
15215      new_path="$input_path"
15216    fi
15217  fi
15218
15219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15220  if test "x$test_cygdrive_prefix" = x; then
15221    # As a simple fix, exclude /usr/bin since it's not a real path.
15222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15224      # a path prefixed by /cygdrive for fixpath to work.
15225      new_path="$CYGWIN_ROOT_PATH$input_path"
15226    fi
15227  fi
15228
15229
15230  if test "x$path" != "x$new_path"; then
15231    BOOT_JDK="$new_path"
15232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15233$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15234  fi
15235
15236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15237
15238  path="$BOOT_JDK"
15239  has_colon=`$ECHO $path | $GREP ^.:`
15240  new_path="$path"
15241  if test "x$has_colon" = x; then
15242    # Not in mixed or Windows style, start by that.
15243    new_path=`cmd //c echo $path`
15244  fi
15245
15246
15247  input_path="$new_path"
15248  # Check if we need to convert this using DOS-style short mode. If the path
15249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15250  # take no chances and rewrite it.
15251  # Note: m4 eats our [], so we need to use [ and ] instead.
15252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15253  if test "x$has_forbidden_chars" != x; then
15254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15256  fi
15257
15258
15259  windows_path="$new_path"
15260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15261    unix_path=`$CYGPATH -u "$windows_path"`
15262    new_path="$unix_path"
15263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15265    new_path="$unix_path"
15266  fi
15267
15268  if test "x$path" != "x$new_path"; then
15269    BOOT_JDK="$new_path"
15270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15272  fi
15273
15274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15276
15277  else
15278    # We're on a posix platform. Hooray! :)
15279    path="$BOOT_JDK"
15280    has_space=`$ECHO "$path" | $GREP " "`
15281    if test "x$has_space" != x; then
15282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15283$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15284      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15285    fi
15286
15287    # Use eval to expand a potential ~
15288    eval path="$path"
15289    if test ! -f "$path" && test ! -d "$path"; then
15290      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15291    fi
15292
15293    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15294  fi
15295
15296              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15297$as_echo_n "checking for Boot JDK... " >&6; }
15298              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15299$as_echo "$BOOT_JDK" >&6; }
15300              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15301$as_echo_n "checking Boot JDK version... " >&6; }
15302              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15303              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15304$as_echo "$BOOT_JDK_VERSION" >&6; }
15305            fi # end check jdk version
15306          fi # end check rt.jar
15307        fi # end check javac
15308      fi # end check java
15309    fi # end check boot jdk found
15310  fi
15311
15312    done
15313  fi
15314
15315
15316    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15317    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15318      # Do we have a bin/java?
15319      if test ! -x "$BOOT_JDK/bin/java"; then
15320        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15322        BOOT_JDK_FOUND=no
15323      else
15324        # Do we have a bin/javac?
15325        if test ! -x "$BOOT_JDK/bin/javac"; then
15326          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15328          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15329$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15330          BOOT_JDK_FOUND=no
15331        else
15332          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15333          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15334            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15336            BOOT_JDK_FOUND=no
15337          else
15338            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15339            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15340
15341            # Extra M4 quote needed to protect [] in grep expression.
15342            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15343            if test "x$FOUND_VERSION_78" = x; then
15344              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15346              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15347$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15348              BOOT_JDK_FOUND=no
15349            else
15350              # We're done! :-)
15351              BOOT_JDK_FOUND=yes
15352
15353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15354
15355  # Input might be given as Windows format, start by converting to
15356  # unix format.
15357  path="$BOOT_JDK"
15358  new_path=`$CYGPATH -u "$path"`
15359
15360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15363  # "foo.exe" is OK but "foo" is an error.
15364  #
15365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15366  # It is also a way to make sure we got the proper file name for the real test later on.
15367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15368  if test "x$test_shortpath" = x; then
15369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15371    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15372  fi
15373
15374  # Call helper function which possibly converts this using DOS-style short mode.
15375  # If so, the updated path is stored in $new_path.
15376
15377  input_path="$new_path"
15378  # Check if we need to convert this using DOS-style short mode. If the path
15379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15380  # take no chances and rewrite it.
15381  # Note: m4 eats our [], so we need to use [ and ] instead.
15382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15383  if test "x$has_forbidden_chars" != x; then
15384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15388      # Going to short mode and back again did indeed matter. Since short mode is
15389      # case insensitive, let's make it lowercase to improve readability.
15390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15391      # Now convert it back to Unix-stile (cygpath)
15392      input_path=`$CYGPATH -u "$shortmode_path"`
15393      new_path="$input_path"
15394    fi
15395  fi
15396
15397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15398  if test "x$test_cygdrive_prefix" = x; then
15399    # As a simple fix, exclude /usr/bin since it's not a real path.
15400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15402      # a path prefixed by /cygdrive for fixpath to work.
15403      new_path="$CYGWIN_ROOT_PATH$input_path"
15404    fi
15405  fi
15406
15407
15408  if test "x$path" != "x$new_path"; then
15409    BOOT_JDK="$new_path"
15410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15412  fi
15413
15414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15415
15416  path="$BOOT_JDK"
15417  has_colon=`$ECHO $path | $GREP ^.:`
15418  new_path="$path"
15419  if test "x$has_colon" = x; then
15420    # Not in mixed or Windows style, start by that.
15421    new_path=`cmd //c echo $path`
15422  fi
15423
15424
15425  input_path="$new_path"
15426  # Check if we need to convert this using DOS-style short mode. If the path
15427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15428  # take no chances and rewrite it.
15429  # Note: m4 eats our [], so we need to use [ and ] instead.
15430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15431  if test "x$has_forbidden_chars" != x; then
15432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15434  fi
15435
15436
15437  windows_path="$new_path"
15438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15439    unix_path=`$CYGPATH -u "$windows_path"`
15440    new_path="$unix_path"
15441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15443    new_path="$unix_path"
15444  fi
15445
15446  if test "x$path" != "x$new_path"; then
15447    BOOT_JDK="$new_path"
15448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15450  fi
15451
15452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15454
15455  else
15456    # We're on a posix platform. Hooray! :)
15457    path="$BOOT_JDK"
15458    has_space=`$ECHO "$path" | $GREP " "`
15459    if test "x$has_space" != x; then
15460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15462      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15463    fi
15464
15465    # Use eval to expand a potential ~
15466    eval path="$path"
15467    if test ! -f "$path" && test ! -d "$path"; then
15468      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15469    fi
15470
15471    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15472  fi
15473
15474              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15475$as_echo_n "checking for Boot JDK... " >&6; }
15476              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15477$as_echo "$BOOT_JDK" >&6; }
15478              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15479$as_echo_n "checking Boot JDK version... " >&6; }
15480              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15481              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15482$as_echo "$BOOT_JDK_VERSION" >&6; }
15483            fi # end check jdk version
15484          fi # end check rt.jar
15485        fi # end check javac
15486      fi # end check java
15487    fi # end check boot jdk found
15488  fi
15489
15490  fi
15491
15492
15493    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15494    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15495      # Do we have a bin/java?
15496      if test ! -x "$BOOT_JDK/bin/java"; then
15497        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15499        BOOT_JDK_FOUND=no
15500      else
15501        # Do we have a bin/javac?
15502        if test ! -x "$BOOT_JDK/bin/javac"; then
15503          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15505          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15506$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15507          BOOT_JDK_FOUND=no
15508        else
15509          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15510          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15511            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15513            BOOT_JDK_FOUND=no
15514          else
15515            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15516            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15517
15518            # Extra M4 quote needed to protect [] in grep expression.
15519            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15520            if test "x$FOUND_VERSION_78" = x; then
15521              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15523              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15524$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15525              BOOT_JDK_FOUND=no
15526            else
15527              # We're done! :-)
15528              BOOT_JDK_FOUND=yes
15529
15530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15531
15532  # Input might be given as Windows format, start by converting to
15533  # unix format.
15534  path="$BOOT_JDK"
15535  new_path=`$CYGPATH -u "$path"`
15536
15537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15540  # "foo.exe" is OK but "foo" is an error.
15541  #
15542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15543  # It is also a way to make sure we got the proper file name for the real test later on.
15544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15545  if test "x$test_shortpath" = x; then
15546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15548    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15549  fi
15550
15551  # Call helper function which possibly converts this using DOS-style short mode.
15552  # If so, the updated path is stored in $new_path.
15553
15554  input_path="$new_path"
15555  # Check if we need to convert this using DOS-style short mode. If the path
15556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15557  # take no chances and rewrite it.
15558  # Note: m4 eats our [], so we need to use [ and ] instead.
15559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15560  if test "x$has_forbidden_chars" != x; then
15561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15565      # Going to short mode and back again did indeed matter. Since short mode is
15566      # case insensitive, let's make it lowercase to improve readability.
15567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15568      # Now convert it back to Unix-stile (cygpath)
15569      input_path=`$CYGPATH -u "$shortmode_path"`
15570      new_path="$input_path"
15571    fi
15572  fi
15573
15574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15575  if test "x$test_cygdrive_prefix" = x; then
15576    # As a simple fix, exclude /usr/bin since it's not a real path.
15577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15579      # a path prefixed by /cygdrive for fixpath to work.
15580      new_path="$CYGWIN_ROOT_PATH$input_path"
15581    fi
15582  fi
15583
15584
15585  if test "x$path" != "x$new_path"; then
15586    BOOT_JDK="$new_path"
15587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15588$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15589  fi
15590
15591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15592
15593  path="$BOOT_JDK"
15594  has_colon=`$ECHO $path | $GREP ^.:`
15595  new_path="$path"
15596  if test "x$has_colon" = x; then
15597    # Not in mixed or Windows style, start by that.
15598    new_path=`cmd //c echo $path`
15599  fi
15600
15601
15602  input_path="$new_path"
15603  # Check if we need to convert this using DOS-style short mode. If the path
15604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15605  # take no chances and rewrite it.
15606  # Note: m4 eats our [], so we need to use [ and ] instead.
15607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15608  if test "x$has_forbidden_chars" != x; then
15609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15611  fi
15612
15613
15614  windows_path="$new_path"
15615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15616    unix_path=`$CYGPATH -u "$windows_path"`
15617    new_path="$unix_path"
15618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15620    new_path="$unix_path"
15621  fi
15622
15623  if test "x$path" != "x$new_path"; then
15624    BOOT_JDK="$new_path"
15625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15627  fi
15628
15629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15631
15632  else
15633    # We're on a posix platform. Hooray! :)
15634    path="$BOOT_JDK"
15635    has_space=`$ECHO "$path" | $GREP " "`
15636    if test "x$has_space" != x; then
15637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15638$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15639      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15640    fi
15641
15642    # Use eval to expand a potential ~
15643    eval path="$path"
15644    if test ! -f "$path" && test ! -d "$path"; then
15645      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15646    fi
15647
15648    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15649  fi
15650
15651              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15652$as_echo_n "checking for Boot JDK... " >&6; }
15653              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15654$as_echo "$BOOT_JDK" >&6; }
15655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15656$as_echo_n "checking Boot JDK version... " >&6; }
15657              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15659$as_echo "$BOOT_JDK_VERSION" >&6; }
15660            fi # end check jdk version
15661          fi # end check rt.jar
15662        fi # end check javac
15663      fi # end check java
15664    fi # end check boot jdk found
15665  fi
15666
15667
15668# If we haven't found anything yet, we've truly lost. Give up.
15669if test "x$BOOT_JDK_FOUND" = xno; then
15670
15671    # Print a helpful message on how to acquire the necessary build dependency.
15672    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15673    MISSING_DEPENDENCY=openjdk
15674    PKGHANDLER_COMMAND=
15675
15676    case $PKGHANDLER in
15677	apt-get)
15678                apt_help     $MISSING_DEPENDENCY ;;
15679    yum)
15680                yum_help     $MISSING_DEPENDENCY ;;
15681	port)
15682                port_help    $MISSING_DEPENDENCY ;;
15683	pkgutil)
15684                pkgutil_help $MISSING_DEPENDENCY ;;
15685	pkgadd)
15686                pkgadd_help  $MISSING_DEPENDENCY ;;
15687    * )
15688      break ;;
15689    esac
15690
15691    if test "x$PKGHANDLER_COMMAND" != x; then
15692        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15693    fi
15694
15695  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15696$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15697  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15698$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15699  as_fn_error $? "Cannot continue" "$LINENO" 5
15700fi
15701
15702# Setup proper paths for what we found
15703BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15704if test ! -f "$BOOT_RTJAR"; then
15705    # On MacOSX it is called classes.jar
15706    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15707    if test -f "$BOOT_RTJAR"; then
15708      # Remove the ..
15709      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15710    fi
15711fi
15712BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15713BOOT_JDK="$BOOT_JDK"
15714
15715
15716
15717
15718# Setup tools from the Boot JDK.
15719
15720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15721$as_echo_n "checking for java in Boot JDK... " >&6; }
15722  JAVA=$BOOT_JDK/bin/java
15723  if test ! -x $JAVA; then
15724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15725$as_echo "not found" >&6; }
15726      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15727$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15728      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15729  fi
15730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15731$as_echo "ok" >&6; }
15732
15733
15734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15735$as_echo_n "checking for javac in Boot JDK... " >&6; }
15736  JAVAC=$BOOT_JDK/bin/javac
15737  if test ! -x $JAVAC; then
15738      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15739$as_echo "not found" >&6; }
15740      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15741$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15742      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15743  fi
15744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15745$as_echo "ok" >&6; }
15746
15747
15748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15749$as_echo_n "checking for javah in Boot JDK... " >&6; }
15750  JAVAH=$BOOT_JDK/bin/javah
15751  if test ! -x $JAVAH; then
15752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15753$as_echo "not found" >&6; }
15754      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15755$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15756      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15757  fi
15758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15759$as_echo "ok" >&6; }
15760
15761
15762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15763$as_echo_n "checking for javap in Boot JDK... " >&6; }
15764  JAVAP=$BOOT_JDK/bin/javap
15765  if test ! -x $JAVAP; then
15766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15767$as_echo "not found" >&6; }
15768      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15769$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15770      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15771  fi
15772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15773$as_echo "ok" >&6; }
15774
15775
15776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15777$as_echo_n "checking for jar in Boot JDK... " >&6; }
15778  JAR=$BOOT_JDK/bin/jar
15779  if test ! -x $JAR; then
15780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15781$as_echo "not found" >&6; }
15782      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15783$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15784      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15785  fi
15786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15787$as_echo "ok" >&6; }
15788
15789
15790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15791$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15792  RMIC=$BOOT_JDK/bin/rmic
15793  if test ! -x $RMIC; then
15794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15795$as_echo "not found" >&6; }
15796      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15797$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15798      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15799  fi
15800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15801$as_echo "ok" >&6; }
15802
15803
15804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15805$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15806  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15807  if test ! -x $NATIVE2ASCII; then
15808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15809$as_echo "not found" >&6; }
15810      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15811$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15812      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15813  fi
15814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15815$as_echo "ok" >&6; }
15816
15817
15818# Finally, set some other options...
15819
15820# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15821BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15822
15823
15824
15825
15826##############################################################################
15827#
15828# Specify options for anything that is run with the Boot JDK.
15829#
15830
15831# Check whether --with-boot-jdk-jvmargs was given.
15832if test "${with_boot_jdk_jvmargs+set}" = set; then :
15833  withval=$with_boot_jdk_jvmargs;
15834fi
15835
15836
15837if test "x$with_boot_jdk_jvmargs" = x; then
15838    # Not all JVM:s accept the same arguments on the command line.
15839    # OpenJDK specific increase in thread stack for JDK build,
15840    # well more specifically, when running javac.
15841    if test "x$BUILD_NUM_BITS" = x32; then
15842       STACK_SIZE=768
15843    else
15844       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15845       # since 64-bit pointers are pushed on the stach. Apparently, we need
15846       # to increase the stack space when javacing the JDK....
15847       STACK_SIZE=1536
15848    fi
15849
15850    # Minimum amount of heap memory.
15851
15852    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15853    $ECHO "Command: $JAVA -Xms64M -version" >&5
15854    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15855    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15856    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15857    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15858        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15859	JVM_ARG_OK=true
15860    else
15861	$ECHO "Arg failed:" >&5
15862	$ECHO "$OUTPUT" >&5
15863	JVM_ARG_OK=false
15864    fi
15865
15866    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15867        # Why does macosx need more heap? Its the huge JDK batch.
15868
15869    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15870    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15871    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15872    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15873    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15874    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15875        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15876	JVM_ARG_OK=true
15877    else
15878	$ECHO "Arg failed:" >&5
15879	$ECHO "$OUTPUT" >&5
15880	JVM_ARG_OK=false
15881    fi
15882
15883    else
15884
15885    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15886    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15887    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15888    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15889    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15890    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15891        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15892	JVM_ARG_OK=true
15893    else
15894	$ECHO "Arg failed:" >&5
15895	$ECHO "$OUTPUT" >&5
15896	JVM_ARG_OK=false
15897    fi
15898
15899    fi
15900    # When is adding -client something that speeds up the JVM?
15901    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15902
15903    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15904    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15905    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15906    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15907    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15908    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15909        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15910	JVM_ARG_OK=true
15911    else
15912	$ECHO "Arg failed:" >&5
15913	$ECHO "$OUTPUT" >&5
15914	JVM_ARG_OK=false
15915    fi
15916
15917
15918    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15919    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15920    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15921    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15922    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15923    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15924        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15925	JVM_ARG_OK=true
15926    else
15927	$ECHO "Arg failed:" >&5
15928	$ECHO "$OUTPUT" >&5
15929	JVM_ARG_OK=false
15930    fi
15931
15932
15933    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15934    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15935    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15936    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15937    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15938    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15939        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15940	JVM_ARG_OK=true
15941    else
15942	$ECHO "Arg failed:" >&5
15943	$ECHO "$OUTPUT" >&5
15944	JVM_ARG_OK=false
15945    fi
15946
15947    # Disable special log output when a debug build is used as Boot JDK...
15948
15949    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15950    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15951    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15952    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15953    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15954    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15955        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15956	JVM_ARG_OK=true
15957    else
15958	$ECHO "Arg failed:" >&5
15959	$ECHO "$OUTPUT" >&5
15960	JVM_ARG_OK=false
15961    fi
15962
15963fi
15964
15965BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15966
15967
15968
15969###############################################################################
15970#
15971# Configure the sources to use. We can add or override individual directories.
15972#
15973###############################################################################
15974
15975
15976
15977# Where are the sources. Any of these can be overridden
15978# using --with-override-corba and the likes.
15979LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15980CORBA_TOPDIR="$SRC_ROOT/corba"
15981JAXP_TOPDIR="$SRC_ROOT/jaxp"
15982JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15983HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15984NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15985JDK_TOPDIR="$SRC_ROOT/jdk"
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996###############################################################################
15997#
15998# Pickup additional source for a component from outside of the source root
15999# or override source for a component.
16000#
16001
16002# Check whether --with-add-source-root was given.
16003if test "${with_add_source_root+set}" = set; then :
16004  withval=$with_add_source_root;
16005fi
16006
16007
16008
16009# Check whether --with-override-source-root was given.
16010if test "${with_override_source_root+set}" = set; then :
16011  withval=$with_override_source_root;
16012fi
16013
16014
16015
16016# Check whether --with-adds-and-overrides was given.
16017if test "${with_adds_and_overrides+set}" = set; then :
16018  withval=$with_adds_and_overrides;
16019fi
16020
16021
16022if test "x$with_adds_and_overrides" != x; then
16023    with_add_source_root="$with_adds_and_overrides/adds"
16024    with_override_source_root="$with_adds_and_overrides/overrides"
16025fi
16026
16027if test "x$with_add_source_root" != x; then
16028    if ! test -d $with_add_source_root; then
16029       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16030    fi
16031    CURDIR="$PWD"
16032    cd "$with_add_source_root"
16033    ADD_SRC_ROOT="`pwd`"
16034    cd "$CURDIR"
16035    # Verify that the addon source root does not have any root makefiles.
16036    # If it does, then it is usually an error, prevent this.
16037    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16038       test -f $with_add_source_root/langtools/make/Makefile; then
16039        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
16040    fi
16041    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16042       test -f $with_add_source_root/corba/make/Makefile; then
16043        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
16044    fi
16045    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16046       test -f $with_add_source_root/jaxp/make/Makefile; then
16047        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
16048    fi
16049    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16050       test -f $with_add_source_root/jaxws/make/Makefile; then
16051        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
16052    fi
16053    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16054       test -f $with_add_source_root/hotspot/make/Makefile; then
16055        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
16056    fi
16057    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16058       test -f $with_add_source_root/jdk/make/Makefile; then
16059        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
16060    fi
16061fi
16062
16063
16064if test "x$with_override_source_root" != x; then
16065    if ! test -d $with_override_source_root; then
16066       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16067    fi
16068    CURDIR="$PWD"
16069    cd "$with_override_source_root"
16070    OVERRIDE_SRC_ROOT="`pwd`"
16071    cd "$CURDIR"
16072    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16073       test -f $with_override_source_root/langtools/make/Makefile; then
16074        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
16075    fi
16076    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16077       test -f $with_override_source_root/corba/make/Makefile; then
16078        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
16079    fi
16080    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16081       test -f $with_override_source_root/jaxp/make/Makefile; then
16082        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
16083    fi
16084    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16085       test -f $with_override_source_root/jaxws/make/Makefile; then
16086        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
16087    fi
16088    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16089       test -f $with_override_source_root/hotspot/make/Makefile; then
16090        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
16091    fi
16092    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16093       test -f $with_override_source_root/jdk/make/Makefile; then
16094        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
16095    fi
16096fi
16097
16098
16099###############################################################################
16100#
16101# Override a repo completely, this is used for example when you have 3 small
16102# development sandboxes of the langtools sources and want to avoid having 3 full
16103# OpenJDK sources checked out on disk.
16104#
16105# Assuming that the 3 langtools sandboxes are located here:
16106# /home/fredrik/sandbox1/langtools
16107# /home/fredrik/sandbox2/langtools
16108# /home/fredrik/sandbox3/langtools
16109#
16110# From the source root you create build subdirs manually:
16111#     mkdir -p build1 build2 build3
16112# in each build directory run:
16113#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16114#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16115#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16116#
16117
16118
16119# Check whether --with-override-langtools was given.
16120if test "${with_override_langtools+set}" = set; then :
16121  withval=$with_override_langtools;
16122fi
16123
16124
16125
16126# Check whether --with-override-corba was given.
16127if test "${with_override_corba+set}" = set; then :
16128  withval=$with_override_corba;
16129fi
16130
16131
16132
16133# Check whether --with-override-jaxp was given.
16134if test "${with_override_jaxp+set}" = set; then :
16135  withval=$with_override_jaxp;
16136fi
16137
16138
16139
16140# Check whether --with-override-jaxws was given.
16141if test "${with_override_jaxws+set}" = set; then :
16142  withval=$with_override_jaxws;
16143fi
16144
16145
16146
16147# Check whether --with-override-hotspot was given.
16148if test "${with_override_hotspot+set}" = set; then :
16149  withval=$with_override_hotspot;
16150fi
16151
16152
16153
16154# Check whether --with-override-jdk was given.
16155if test "${with_override_jdk+set}" = set; then :
16156  withval=$with_override_jdk;
16157fi
16158
16159
16160if test "x$with_override_langtools" != x; then
16161    CURDIR="$PWD"
16162    cd "$with_override_langtools"
16163    LANGTOOLS_TOPDIR="`pwd`"
16164    cd "$CURDIR"
16165    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16166        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16167    fi
16168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16169$as_echo_n "checking if langtools should be overridden... " >&6; }
16170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16171$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16172fi
16173if test "x$with_override_corba" != x; then
16174    CURDIR="$PWD"
16175    cd "$with_override_corba"
16176    CORBA_TOPDIR="`pwd`"
16177    cd "$CURDIR"
16178    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16179        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16180    fi
16181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16182$as_echo_n "checking if corba should be overridden... " >&6; }
16183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16184$as_echo "yes with $CORBA_TOPDIR" >&6; }
16185fi
16186if test "x$with_override_jaxp" != x; then
16187    CURDIR="$PWD"
16188    cd "$with_override_jaxp"
16189    JAXP_TOPDIR="`pwd`"
16190    cd "$CURDIR"
16191    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16192        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16193    fi
16194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16195$as_echo_n "checking if jaxp should be overridden... " >&6; }
16196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16197$as_echo "yes with $JAXP_TOPDIR" >&6; }
16198fi
16199if test "x$with_override_jaxws" != x; then
16200    CURDIR="$PWD"
16201    cd "$with_override_jaxws"
16202    JAXWS_TOPDIR="`pwd`"
16203    cd "$CURDIR"
16204    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16205        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16206    fi
16207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16208$as_echo_n "checking if jaxws should be overridden... " >&6; }
16209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16210$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16211fi
16212if test "x$with_override_hotspot" != x; then
16213    CURDIR="$PWD"
16214    cd "$with_override_hotspot"
16215    HOTSPOT_TOPDIR="`pwd`"
16216    cd "$CURDIR"
16217    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16218       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16219        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16220    fi
16221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16222$as_echo_n "checking if hotspot should be overridden... " >&6; }
16223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16224$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16225fi
16226if test "x$with_override_nashorn" != x; then
16227    CURDIR="$PWD"
16228    cd "$with_override_nashorn"
16229    NASHORN_TOPDIR="`pwd`"
16230    cd "$CURDIR"
16231    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16232        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16233    fi
16234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16235$as_echo_n "checking if nashorn should be overridden... " >&6; }
16236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16237$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16238fi
16239if test "x$with_override_jdk" != x; then
16240    CURDIR="$PWD"
16241    cd "$with_override_jdk"
16242    JDK_TOPDIR="`pwd`"
16243    cd "$CURDIR"
16244    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16245        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16246    fi
16247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16248$as_echo_n "checking if JDK should be overridden... " >&6; }
16249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16250$as_echo "yes with $JDK_TOPDIR" >&6; }
16251fi
16252
16253
16254
16255BUILD_OUTPUT="$OUTPUT_ROOT"
16256
16257
16258HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16259BUILD_HOTSPOT=true
16260
16261
16262
16263# Check whether --with-import-hotspot was given.
16264if test "${with_import_hotspot+set}" = set; then :
16265  withval=$with_import_hotspot;
16266fi
16267
16268if test "x$with_import_hotspot" != x; then
16269    CURDIR="$PWD"
16270    cd "$with_import_hotspot"
16271    HOTSPOT_DIST="`pwd`"
16272    cd "$CURDIR"
16273    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16274        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16275    fi
16276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16277$as_echo_n "checking if hotspot should be imported... " >&6; }
16278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16279$as_echo "yes from $HOTSPOT_DIST" >&6; }
16280    BUILD_HOTSPOT=false
16281fi
16282
16283JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16284
16285
16286###############################################################################
16287#
16288# Setup the toolchain (compilers etc), i.e. the tools that need to be
16289# cross-compilation aware.
16290#
16291###############################################################################
16292
16293
16294###############################################################################
16295#
16296# Configure the development tool paths and potential sysroot.
16297#
16298ac_ext=cpp
16299ac_cpp='$CXXCPP $CPPFLAGS'
16300ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16301ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16302ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16303
16304
16305# The option used to specify the target .o,.a or .so file.
16306# When compiling, how to specify the to be created object file.
16307CC_OUT_OPTION='-o$(SPACE)'
16308# When linking, how to specify the to be created executable.
16309EXE_OUT_OPTION='-o$(SPACE)'
16310# When linking, how to specify the to be created dynamically linkable library.
16311LD_OUT_OPTION='-o$(SPACE)'
16312# When archiving, how to specify the to be create static archive for object files.
16313AR_OUT_OPTION='rcs$(SPACE)'
16314
16315
16316
16317
16318
16319# Locate the actual tools
16320
16321
16322# Check whether --with-jtreg was given.
16323if test "${with_jtreg+set}" = set; then :
16324  withval=$with_jtreg;
16325else
16326  with_jtreg=no
16327fi
16328
16329
16330  if test "x$with_jtreg" = xno; then
16331    # jtreg disabled
16332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16333$as_echo_n "checking for jtreg... " >&6; }
16334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16335$as_echo "no" >&6; }
16336  else
16337    if test "x$with_jtreg" != xyes; then
16338      # with path specified.
16339      JT_HOME="$with_jtreg"
16340    fi
16341
16342    if test "x$JT_HOME" != x; then
16343      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16344$as_echo_n "checking for jtreg... " >&6; }
16345
16346      # use JT_HOME enviroment var.
16347
16348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16349
16350  # Input might be given as Windows format, start by converting to
16351  # unix format.
16352  path="$JT_HOME"
16353  new_path=`$CYGPATH -u "$path"`
16354
16355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16358  # "foo.exe" is OK but "foo" is an error.
16359  #
16360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16361  # It is also a way to make sure we got the proper file name for the real test later on.
16362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16363  if test "x$test_shortpath" = x; then
16364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16365$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16366    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16367  fi
16368
16369  # Call helper function which possibly converts this using DOS-style short mode.
16370  # If so, the updated path is stored in $new_path.
16371
16372  input_path="$new_path"
16373  # Check if we need to convert this using DOS-style short mode. If the path
16374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16375  # take no chances and rewrite it.
16376  # Note: m4 eats our [], so we need to use [ and ] instead.
16377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16378  if test "x$has_forbidden_chars" != x; then
16379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16383      # Going to short mode and back again did indeed matter. Since short mode is
16384      # case insensitive, let's make it lowercase to improve readability.
16385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16386      # Now convert it back to Unix-stile (cygpath)
16387      input_path=`$CYGPATH -u "$shortmode_path"`
16388      new_path="$input_path"
16389    fi
16390  fi
16391
16392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16393  if test "x$test_cygdrive_prefix" = x; then
16394    # As a simple fix, exclude /usr/bin since it's not a real path.
16395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16397      # a path prefixed by /cygdrive for fixpath to work.
16398      new_path="$CYGWIN_ROOT_PATH$input_path"
16399    fi
16400  fi
16401
16402
16403  if test "x$path" != "x$new_path"; then
16404    JT_HOME="$new_path"
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16406$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16407  fi
16408
16409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16410
16411  path="$JT_HOME"
16412  has_colon=`$ECHO $path | $GREP ^.:`
16413  new_path="$path"
16414  if test "x$has_colon" = x; then
16415    # Not in mixed or Windows style, start by that.
16416    new_path=`cmd //c echo $path`
16417  fi
16418
16419
16420  input_path="$new_path"
16421  # Check if we need to convert this using DOS-style short mode. If the path
16422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16423  # take no chances and rewrite it.
16424  # Note: m4 eats our [], so we need to use [ and ] instead.
16425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16426  if test "x$has_forbidden_chars" != x; then
16427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16429  fi
16430
16431
16432  windows_path="$new_path"
16433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16434    unix_path=`$CYGPATH -u "$windows_path"`
16435    new_path="$unix_path"
16436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16438    new_path="$unix_path"
16439  fi
16440
16441  if test "x$path" != "x$new_path"; then
16442    JT_HOME="$new_path"
16443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16444$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16445  fi
16446
16447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16449
16450  else
16451    # We're on a posix platform. Hooray! :)
16452    path="$JT_HOME"
16453    has_space=`$ECHO "$path" | $GREP " "`
16454    if test "x$has_space" != x; then
16455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16456$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16457      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16458    fi
16459
16460    # Use eval to expand a potential ~
16461    eval path="$path"
16462    if test ! -f "$path" && test ! -d "$path"; then
16463      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16464    fi
16465
16466    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16467  fi
16468
16469
16470      # jtreg win32 script works for everybody
16471      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16472
16473      if test ! -f "$JTREGEXE"; then
16474        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16475      fi
16476
16477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16478$as_echo "$JTREGEXE" >&6; }
16479    else
16480      # try to find jtreg on path
16481
16482    for ac_prog in jtreg
16483do
16484  # Extract the first word of "$ac_prog", so it can be a program name with args.
16485set dummy $ac_prog; ac_word=$2
16486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16487$as_echo_n "checking for $ac_word... " >&6; }
16488if ${ac_cv_path_JTREGEXE+:} false; then :
16489  $as_echo_n "(cached) " >&6
16490else
16491  case $JTREGEXE in
16492  [\\/]* | ?:[\\/]*)
16493  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16494  ;;
16495  *)
16496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16497for as_dir in $PATH
16498do
16499  IFS=$as_save_IFS
16500  test -z "$as_dir" && as_dir=.
16501    for ac_exec_ext in '' $ac_executable_extensions; do
16502  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16503    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16505    break 2
16506  fi
16507done
16508  done
16509IFS=$as_save_IFS
16510
16511  ;;
16512esac
16513fi
16514JTREGEXE=$ac_cv_path_JTREGEXE
16515if test -n "$JTREGEXE"; then
16516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16517$as_echo "$JTREGEXE" >&6; }
16518else
16519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16520$as_echo "no" >&6; }
16521fi
16522
16523
16524  test -n "$JTREGEXE" && break
16525done
16526
16527
16528    if test "x$JTREGEXE" = x; then
16529        if test "xjtreg" = x; then
16530          PROG_NAME=jtregexe
16531        else
16532          PROG_NAME=jtreg
16533        fi
16534        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16535$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16536        as_fn_error $? "Cannot continue" "$LINENO" 5
16537    fi
16538
16539
16540      JT_HOME="`$DIRNAME $JTREGEXE`"
16541    fi
16542  fi
16543
16544
16545
16546
16547
16548if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16549
16550  # Store path to cygwin link.exe to help excluding it when searching for
16551  # VS linker. This must be done before changing the PATH when looking for VS.
16552  # Extract the first word of "link", so it can be a program name with args.
16553set dummy link; ac_word=$2
16554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16555$as_echo_n "checking for $ac_word... " >&6; }
16556if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16557  $as_echo_n "(cached) " >&6
16558else
16559  case $CYGWIN_LINK in
16560  [\\/]* | ?:[\\/]*)
16561  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16562  ;;
16563  *)
16564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16565for as_dir in $PATH
16566do
16567  IFS=$as_save_IFS
16568  test -z "$as_dir" && as_dir=.
16569    for ac_exec_ext in '' $ac_executable_extensions; do
16570  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16571    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16573    break 2
16574  fi
16575done
16576  done
16577IFS=$as_save_IFS
16578
16579  ;;
16580esac
16581fi
16582CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16583if test -n "$CYGWIN_LINK"; then
16584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16585$as_echo "$CYGWIN_LINK" >&6; }
16586else
16587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16588$as_echo "no" >&6; }
16589fi
16590
16591
16592  if test "x$CYGWIN_LINK" != x; then
16593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16594$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16595    "$CYGWIN_LINK" --version > /dev/null
16596    if test $? -eq 0 ; then
16597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16598$as_echo "yes" >&6; }
16599    else
16600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16601$as_echo "no" >&6; }
16602      # This might be the VS linker. Don't exclude it later on.
16603      CYGWIN_LINK=""
16604    fi
16605  fi
16606
16607  # First-hand choice is to locate and run the vsvars bat file.
16608
16609  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16610    VCVARSFILE="vc/bin/vcvars32.bat"
16611  else
16612    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16613  fi
16614
16615  VS_ENV_CMD=""
16616  VS_ENV_ARGS=""
16617  if test "x$with_toolsdir" != x; then
16618
16619  if test "x$VS_ENV_CMD" = x; then
16620    VS100BASE="$with_toolsdir/../.."
16621    METHOD="--with-tools-dir"
16622
16623  windows_path="$VS100BASE"
16624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16625    unix_path=`$CYGPATH -u "$windows_path"`
16626    VS100BASE="$unix_path"
16627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16629    VS100BASE="$unix_path"
16630  fi
16631
16632    if test -d "$VS100BASE"; then
16633      if test -f "$VS100BASE/$VCVARSFILE"; then
16634        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16635$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16636        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16637      else
16638        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16639$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16640        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16641$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16642      fi
16643    fi
16644  fi
16645
16646  fi
16647
16648  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16649    # Having specified an argument which is incorrect will produce an instant failure;
16650    # we should not go on looking
16651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16652$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16653    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16654$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16655    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16656  fi
16657
16658  if test "x$VS100COMNTOOLS" != x; then
16659
16660  if test "x$VS_ENV_CMD" = x; then
16661    VS100BASE="$VS100COMNTOOLS/../.."
16662    METHOD="VS100COMNTOOLS variable"
16663
16664  windows_path="$VS100BASE"
16665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16666    unix_path=`$CYGPATH -u "$windows_path"`
16667    VS100BASE="$unix_path"
16668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16670    VS100BASE="$unix_path"
16671  fi
16672
16673    if test -d "$VS100BASE"; then
16674      if test -f "$VS100BASE/$VCVARSFILE"; then
16675        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16676$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16677        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16678      else
16679        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16680$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16681        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16682$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16683      fi
16684    fi
16685  fi
16686
16687  fi
16688  if test "x$PROGRAMFILES" != x; then
16689
16690  if test "x$VS_ENV_CMD" = x; then
16691    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16692    METHOD="well-known name"
16693
16694  windows_path="$VS100BASE"
16695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16696    unix_path=`$CYGPATH -u "$windows_path"`
16697    VS100BASE="$unix_path"
16698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16700    VS100BASE="$unix_path"
16701  fi
16702
16703    if test -d "$VS100BASE"; then
16704      if test -f "$VS100BASE/$VCVARSFILE"; then
16705        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16706$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16707        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16708      else
16709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16710$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16711        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16712$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16713      fi
16714    fi
16715  fi
16716
16717  fi
16718
16719  if test "x$VS_ENV_CMD" = x; then
16720    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16721    METHOD="well-known name"
16722
16723  windows_path="$VS100BASE"
16724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16725    unix_path=`$CYGPATH -u "$windows_path"`
16726    VS100BASE="$unix_path"
16727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16729    VS100BASE="$unix_path"
16730  fi
16731
16732    if test -d "$VS100BASE"; then
16733      if test -f "$VS100BASE/$VCVARSFILE"; then
16734        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16735$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16736        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16737      else
16738        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16739$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16740        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16741$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16742      fi
16743    fi
16744  fi
16745
16746
16747  if test "x$VS_ENV_CMD" = x; then
16748    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16749    METHOD="well-known name"
16750
16751  windows_path="$VS100BASE"
16752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16753    unix_path=`$CYGPATH -u "$windows_path"`
16754    VS100BASE="$unix_path"
16755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16757    VS100BASE="$unix_path"
16758  fi
16759
16760    if test -d "$VS100BASE"; then
16761      if test -f "$VS100BASE/$VCVARSFILE"; then
16762        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16763$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16764        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16765      else
16766        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16767$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16768        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16769$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16770      fi
16771    fi
16772  fi
16773
16774
16775  if test "x$ProgramW6432" != x; then
16776
16777  if test "x$VS_ENV_CMD" = x; then
16778    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16779    METHOD="well-known name"
16780
16781  windows_path="$WIN_SDK_BASE"
16782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16783    unix_path=`$CYGPATH -u "$windows_path"`
16784    WIN_SDK_BASE="$unix_path"
16785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16787    WIN_SDK_BASE="$unix_path"
16788  fi
16789
16790    if test -d "$WIN_SDK_BASE"; then
16791      # There have been cases of partial or broken SDK installations. A missing
16792      # lib dir is not going to work.
16793      if test ! -d "$WIN_SDK_BASE/../lib"; then
16794        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16795$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16796        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16797$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16798      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16800$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16801        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16802        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16803          VS_ENV_ARGS="/x86"
16804        else
16805          VS_ENV_ARGS="/x64"
16806        fi
16807      else
16808        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16809$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16810        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16811$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16812      fi
16813    fi
16814  fi
16815
16816  fi
16817  if test "x$PROGRAMW6432" != x; then
16818
16819  if test "x$VS_ENV_CMD" = x; then
16820    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16821    METHOD="well-known name"
16822
16823  windows_path="$WIN_SDK_BASE"
16824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16825    unix_path=`$CYGPATH -u "$windows_path"`
16826    WIN_SDK_BASE="$unix_path"
16827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16829    WIN_SDK_BASE="$unix_path"
16830  fi
16831
16832    if test -d "$WIN_SDK_BASE"; then
16833      # There have been cases of partial or broken SDK installations. A missing
16834      # lib dir is not going to work.
16835      if test ! -d "$WIN_SDK_BASE/../lib"; then
16836        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16837$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16838        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16839$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16840      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16842$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16843        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16844        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16845          VS_ENV_ARGS="/x86"
16846        else
16847          VS_ENV_ARGS="/x64"
16848        fi
16849      else
16850        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16851$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16852        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16853$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16854      fi
16855    fi
16856  fi
16857
16858  fi
16859  if test "x$PROGRAMFILES" != x; then
16860
16861  if test "x$VS_ENV_CMD" = x; then
16862    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16863    METHOD="well-known name"
16864
16865  windows_path="$WIN_SDK_BASE"
16866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16867    unix_path=`$CYGPATH -u "$windows_path"`
16868    WIN_SDK_BASE="$unix_path"
16869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16871    WIN_SDK_BASE="$unix_path"
16872  fi
16873
16874    if test -d "$WIN_SDK_BASE"; then
16875      # There have been cases of partial or broken SDK installations. A missing
16876      # lib dir is not going to work.
16877      if test ! -d "$WIN_SDK_BASE/../lib"; then
16878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16879$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16880        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16881$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16882      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16883        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16884$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16885        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16886        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16887          VS_ENV_ARGS="/x86"
16888        else
16889          VS_ENV_ARGS="/x64"
16890        fi
16891      else
16892        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16893$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16894        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16895$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16896      fi
16897    fi
16898  fi
16899
16900  fi
16901
16902  if test "x$VS_ENV_CMD" = x; then
16903    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16904    METHOD="well-known name"
16905
16906  windows_path="$WIN_SDK_BASE"
16907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16908    unix_path=`$CYGPATH -u "$windows_path"`
16909    WIN_SDK_BASE="$unix_path"
16910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16912    WIN_SDK_BASE="$unix_path"
16913  fi
16914
16915    if test -d "$WIN_SDK_BASE"; then
16916      # There have been cases of partial or broken SDK installations. A missing
16917      # lib dir is not going to work.
16918      if test ! -d "$WIN_SDK_BASE/../lib"; then
16919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16920$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16921        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16922$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16923      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16924        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16925$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16926        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16927        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16928          VS_ENV_ARGS="/x86"
16929        else
16930          VS_ENV_ARGS="/x64"
16931        fi
16932      else
16933        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16934$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16935        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16936$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16937      fi
16938    fi
16939  fi
16940
16941
16942  if test "x$VS_ENV_CMD" = x; then
16943    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16944    METHOD="well-known name"
16945
16946  windows_path="$WIN_SDK_BASE"
16947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16948    unix_path=`$CYGPATH -u "$windows_path"`
16949    WIN_SDK_BASE="$unix_path"
16950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16952    WIN_SDK_BASE="$unix_path"
16953  fi
16954
16955    if test -d "$WIN_SDK_BASE"; then
16956      # There have been cases of partial or broken SDK installations. A missing
16957      # lib dir is not going to work.
16958      if test ! -d "$WIN_SDK_BASE/../lib"; then
16959        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16960$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16961        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16962$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16963      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16964        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16965$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16966        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16967        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16968          VS_ENV_ARGS="/x86"
16969        else
16970          VS_ENV_ARGS="/x64"
16971        fi
16972      else
16973        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16974$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16975        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16976$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16977      fi
16978    fi
16979  fi
16980
16981
16982  if test "x$VS_ENV_CMD" != x; then
16983    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16984
16985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16986
16987  # First separate the path from the arguments. This will split at the first
16988  # space.
16989  complete="$VS_ENV_CMD"
16990  path="${complete%% *}"
16991  tmp="$complete EOL"
16992  arguments="${tmp#* }"
16993
16994  # Input might be given as Windows format, start by converting to
16995  # unix format.
16996  new_path=`$CYGPATH -u "$path"`
16997
16998  # Now try to locate executable using which
16999  new_path=`$WHICH "$new_path" 2> /dev/null`
17000  # bat and cmd files are not always considered executable in cygwin causing which
17001  # to not find them
17002  if test "x$new_path" = x \
17003           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17004           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17005    new_path=`$CYGPATH -u "$path"`
17006  fi
17007  if test "x$new_path" = x; then
17008    # Oops. Which didn't find the executable.
17009    # The splitting of arguments from the executable at a space might have been incorrect,
17010    # since paths with space are more likely in Windows. Give it another try with the whole
17011    # argument.
17012    path="$complete"
17013    arguments="EOL"
17014    new_path=`$CYGPATH -u "$path"`
17015    new_path=`$WHICH "$new_path" 2> /dev/null`
17016    # bat and cmd files are not always considered executable in cygwin causing which
17017    # to not find them
17018    if test "x$new_path" = x \
17019             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17020             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17021      new_path=`$CYGPATH -u "$path"`
17022    fi
17023    if test "x$new_path" = x; then
17024      # It's still not found. Now this is an unrecoverable error.
17025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17026$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17027      has_space=`$ECHO "$complete" | $GREP " "`
17028      if test "x$has_space" != x; then
17029        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17030$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17031      fi
17032      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17033    fi
17034  fi
17035
17036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17039  # "foo.exe" is OK but "foo" is an error.
17040  #
17041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17042  # It is also a way to make sure we got the proper file name for the real test later on.
17043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17044  if test "x$test_shortpath" = x; then
17045    # Short path failed, file does not exist as specified.
17046    # Try adding .exe or .cmd
17047    if test -f "${new_path}.exe"; then
17048       input_to_shortpath="${new_path}.exe"
17049    elif test -f "${new_path}.cmd"; then
17050       input_to_shortpath="${new_path}.cmd"
17051    else
17052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17053$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17054      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17055$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17056      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17057    fi
17058  else
17059    input_to_shortpath="$new_path"
17060  fi
17061
17062  # Call helper function which possibly converts this using DOS-style short mode.
17063  # If so, the updated path is stored in $new_path.
17064  new_path="$input_to_shortpath"
17065
17066  input_path="$input_to_shortpath"
17067  # Check if we need to convert this using DOS-style short mode. If the path
17068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17069  # take no chances and rewrite it.
17070  # Note: m4 eats our [], so we need to use [ and ] instead.
17071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17072  if test "x$has_forbidden_chars" != x; then
17073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17077      # Going to short mode and back again did indeed matter. Since short mode is
17078      # case insensitive, let's make it lowercase to improve readability.
17079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17080      # Now convert it back to Unix-stile (cygpath)
17081      input_path=`$CYGPATH -u "$shortmode_path"`
17082      new_path="$input_path"
17083    fi
17084  fi
17085
17086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17087  if test "x$test_cygdrive_prefix" = x; then
17088    # As a simple fix, exclude /usr/bin since it's not a real path.
17089    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17091      # a path prefixed by /cygdrive for fixpath to work.
17092      new_path="$CYGWIN_ROOT_PATH$input_path"
17093    fi
17094  fi
17095
17096  # remove trailing .exe if any
17097  new_path="${new_path/%.exe/}"
17098
17099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17100
17101  # First separate the path from the arguments. This will split at the first
17102  # space.
17103  complete="$VS_ENV_CMD"
17104  path="${complete%% *}"
17105  tmp="$complete EOL"
17106  arguments="${tmp#* }"
17107
17108  # Input might be given as Windows format, start by converting to
17109  # unix format.
17110  new_path="$path"
17111
17112  windows_path="$new_path"
17113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17114    unix_path=`$CYGPATH -u "$windows_path"`
17115    new_path="$unix_path"
17116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17118    new_path="$unix_path"
17119  fi
17120
17121
17122  # Now try to locate executable using which
17123  new_path=`$WHICH "$new_path" 2> /dev/null`
17124
17125  if test "x$new_path" = x; then
17126    # Oops. Which didn't find the executable.
17127    # The splitting of arguments from the executable at a space might have been incorrect,
17128    # since paths with space are more likely in Windows. Give it another try with the whole
17129    # argument.
17130    path="$complete"
17131    arguments="EOL"
17132    new_path="$path"
17133
17134  windows_path="$new_path"
17135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17136    unix_path=`$CYGPATH -u "$windows_path"`
17137    new_path="$unix_path"
17138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17140    new_path="$unix_path"
17141  fi
17142
17143
17144    new_path=`$WHICH "$new_path" 2> /dev/null`
17145
17146    if test "x$new_path" = x; then
17147      # It's still not found. Now this is an unrecoverable error.
17148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17149$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17150      has_space=`$ECHO "$complete" | $GREP " "`
17151      if test "x$has_space" != x; then
17152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17154      fi
17155      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17156    fi
17157  fi
17158
17159  # Now new_path has a complete unix path to the binary
17160  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17161    # Keep paths in /bin as-is, but remove trailing .exe if any
17162    new_path="${new_path/%.exe/}"
17163    # Do not save /bin paths to all_fixpath_prefixes!
17164  else
17165    # Not in mixed or Windows style, start by that.
17166    new_path=`cmd //c echo $new_path`
17167
17168  input_path="$new_path"
17169  # Check if we need to convert this using DOS-style short mode. If the path
17170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17171  # take no chances and rewrite it.
17172  # Note: m4 eats our [], so we need to use [ and ] instead.
17173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17174  if test "x$has_forbidden_chars" != x; then
17175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17177  fi
17178
17179    # Output is in $new_path
17180
17181  windows_path="$new_path"
17182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17183    unix_path=`$CYGPATH -u "$windows_path"`
17184    new_path="$unix_path"
17185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17187    new_path="$unix_path"
17188  fi
17189
17190    # remove trailing .exe if any
17191    new_path="${new_path/%.exe/}"
17192
17193    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17194    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17195  fi
17196
17197  else
17198    # We're on a posix platform. Hooray! :)
17199    # First separate the path from the arguments. This will split at the first
17200    # space.
17201    complete="$VS_ENV_CMD"
17202    path="${complete%% *}"
17203    tmp="$complete EOL"
17204    arguments="${tmp#* }"
17205
17206    # Cannot rely on the command "which" here since it doesn't always work.
17207    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17208    if test -z "$is_absolute_path"; then
17209      # Path to executable is not absolute. Find it.
17210      IFS_save="$IFS"
17211      IFS=:
17212      for p in $PATH; do
17213        if test -f "$p/$path" && test -x "$p/$path"; then
17214          new_path="$p/$path"
17215          break
17216        fi
17217      done
17218      IFS="$IFS_save"
17219    else
17220      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17221$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17222      new_path="$path"
17223    fi
17224
17225    if test "x$new_path" = x; then
17226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17227$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17228        has_space=`$ECHO "$complete" | $GREP " "`
17229        if test "x$has_space" != x; then
17230          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17231$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17232        fi
17233        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17234      fi
17235  fi
17236
17237      # Now join together the path and the arguments once again
17238      if test "x$arguments" != xEOL; then
17239        new_complete="$new_path ${arguments% *}"
17240      else
17241        new_complete="$new_path"
17242      fi
17243
17244  if test "x$complete" != "x$new_complete"; then
17245      VS_ENV_CMD="$new_complete"
17246      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17247$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17248    fi
17249
17250
17251    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17252    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17253$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17254    cd $OUTPUT_ROOT
17255    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17256    # to autoconf standards.
17257
17258    #----
17259
17260    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17261    # but calculate the difference in Cygwin environment before/after running it and then
17262    # apply the diff.
17263
17264    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17265      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17266      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17267      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17268    else
17269      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17270      _dosbash=`cmd //c echo \`which bash\``
17271    fi
17272
17273    # generate the set of exported vars before/after the vs10 setup
17274    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17275    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17276    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17277    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17278
17279    # Now execute the newly created bat file.
17280    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17281    cmd /c localdevenvtmp.bat | cat
17282
17283    # apply the diff (less some non-vs10 vars named by "!")
17284    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17285    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17286    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17287
17288    # cleanup
17289    $RM localdevenvtmp*
17290    #----
17291    cd $CURDIR
17292    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17293      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17294$as_echo "no" >&6; }
17295      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17296$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17297      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17298$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17299      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17300$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17301      as_fn_error $? "Cannot continue" "$LINENO" 5
17302    fi
17303
17304    # Now set all paths and other env variables. This will allow the rest of
17305    # the configure script to find and run the compiler in the proper way.
17306    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17307$as_echo "$as_me: Setting extracted environment variables" >&6;}
17308    . $OUTPUT_ROOT/localdevenv.sh
17309  else
17310    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17311    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17312$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17313  fi
17314
17315  # At this point, we should have corrent variables in the environment, or we can't continue.
17316  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17317$as_echo_n "checking for Visual Studio variables... " >&6; }
17318
17319  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17320    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17322$as_echo "present but broken" >&6; }
17323      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17324    else
17325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17326$as_echo "ok" >&6; }
17327      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17328      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17329      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17330      # Remove any paths containing # (typically F#) as that messes up make
17331      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17332      VS_PATH="$PATH"
17333
17334
17335
17336    fi
17337  else
17338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17339$as_echo "not found" >&6; }
17340
17341    if test "x$VS_ENV_CMD" = x; then
17342      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17343$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17344      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17345$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17346    else
17347      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17348$as_echo "$as_me: Running the extraction script failed." >&6;}
17349    fi
17350    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17351$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17352    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17353$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17354    as_fn_error $? "Cannot continue" "$LINENO" 5
17355  fi
17356
17357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17358$as_echo_n "checking for msvcr100.dll... " >&6; }
17359
17360# Check whether --with-msvcr-dll was given.
17361if test "${with_msvcr_dll+set}" = set; then :
17362  withval=$with_msvcr_dll;
17363fi
17364
17365  if test "x$with_msvcr_dll" != x; then
17366    MSVCR_DLL="$with_msvcr_dll"
17367  else
17368    if test "x$VCINSTALLDIR" != x; then
17369      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17370        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17371      else
17372        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17373        if test "x$MSVCR_DLL" = x; then
17374          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17375        fi
17376      fi
17377      if test "x$MSVCR_DLL" != x; then
17378        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17379$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17380      else
17381        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17382$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17383      fi
17384    fi
17385    # Try some fallback alternatives
17386    if test "x$MSVCR_DLL" = x; then
17387      # If visual studio express is installed, there is usually one with the debugger
17388      if test "x$VS100COMNTOOLS" != x; then
17389        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17390          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17391          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17392$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17393        fi
17394      fi
17395    fi
17396    if test "x$MSVCR_DLL" = x; then
17397      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17398        # Fallback for 32bit builds, look in the windows directory.
17399        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17400          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17401$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17402          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17403        fi
17404      fi
17405    fi
17406  fi
17407  if test "x$MSVCR_DLL" = x; then
17408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17409$as_echo "no" >&6; }
17410    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17411  fi
17412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17413$as_echo "$MSVCR_DLL" >&6; }
17414
17415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17416
17417  # Input might be given as Windows format, start by converting to
17418  # unix format.
17419  path="$MSVCR_DLL"
17420  new_path=`$CYGPATH -u "$path"`
17421
17422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17425  # "foo.exe" is OK but "foo" is an error.
17426  #
17427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17428  # It is also a way to make sure we got the proper file name for the real test later on.
17429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17430  if test "x$test_shortpath" = x; then
17431    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17432$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17433    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17434  fi
17435
17436  # Call helper function which possibly converts this using DOS-style short mode.
17437  # If so, the updated path is stored in $new_path.
17438
17439  input_path="$new_path"
17440  # Check if we need to convert this using DOS-style short mode. If the path
17441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17442  # take no chances and rewrite it.
17443  # Note: m4 eats our [], so we need to use [ and ] instead.
17444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17445  if test "x$has_forbidden_chars" != x; then
17446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17450      # Going to short mode and back again did indeed matter. Since short mode is
17451      # case insensitive, let's make it lowercase to improve readability.
17452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17453      # Now convert it back to Unix-stile (cygpath)
17454      input_path=`$CYGPATH -u "$shortmode_path"`
17455      new_path="$input_path"
17456    fi
17457  fi
17458
17459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17460  if test "x$test_cygdrive_prefix" = x; then
17461    # As a simple fix, exclude /usr/bin since it's not a real path.
17462    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17464      # a path prefixed by /cygdrive for fixpath to work.
17465      new_path="$CYGWIN_ROOT_PATH$input_path"
17466    fi
17467  fi
17468
17469
17470  if test "x$path" != "x$new_path"; then
17471    MSVCR_DLL="$new_path"
17472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17473$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17474  fi
17475
17476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17477
17478  path="$MSVCR_DLL"
17479  has_colon=`$ECHO $path | $GREP ^.:`
17480  new_path="$path"
17481  if test "x$has_colon" = x; then
17482    # Not in mixed or Windows style, start by that.
17483    new_path=`cmd //c echo $path`
17484  fi
17485
17486
17487  input_path="$new_path"
17488  # Check if we need to convert this using DOS-style short mode. If the path
17489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17490  # take no chances and rewrite it.
17491  # Note: m4 eats our [], so we need to use [ and ] instead.
17492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17493  if test "x$has_forbidden_chars" != x; then
17494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17496  fi
17497
17498
17499  windows_path="$new_path"
17500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17501    unix_path=`$CYGPATH -u "$windows_path"`
17502    new_path="$unix_path"
17503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17505    new_path="$unix_path"
17506  fi
17507
17508  if test "x$path" != "x$new_path"; then
17509    MSVCR_DLL="$new_path"
17510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17511$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17512  fi
17513
17514  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17515  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17516
17517  else
17518    # We're on a posix platform. Hooray! :)
17519    path="$MSVCR_DLL"
17520    has_space=`$ECHO "$path" | $GREP " "`
17521    if test "x$has_space" != x; then
17522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17523$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17524      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17525    fi
17526
17527    # Use eval to expand a potential ~
17528    eval path="$path"
17529    if test ! -f "$path" && test ! -d "$path"; then
17530      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17531    fi
17532
17533    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17534  fi
17535
17536
17537
17538
17539# Check whether --with-dxsdk was given.
17540if test "${with_dxsdk+set}" = set; then :
17541  withval=$with_dxsdk;
17542fi
17543
17544
17545# Check whether --with-dxsdk-lib was given.
17546if test "${with_dxsdk_lib+set}" = set; then :
17547  withval=$with_dxsdk_lib;
17548fi
17549
17550
17551# Check whether --with-dxsdk-include was given.
17552if test "${with_dxsdk_include+set}" = set; then :
17553  withval=$with_dxsdk_include;
17554fi
17555
17556
17557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17558$as_echo_n "checking for DirectX SDK... " >&6; }
17559
17560  if test "x$with_dxsdk" != x; then
17561    dxsdk_path="$with_dxsdk"
17562  elif test "x$DXSDK_DIR" != x; then
17563    dxsdk_path="$DXSDK_DIR"
17564  elif test -d "C:/DXSDK"; then
17565    dxsdk_path="C:/DXSDK"
17566  else
17567    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17568  fi
17569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17570$as_echo "$dxsdk_path" >&6; }
17571
17572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17573
17574  # Input might be given as Windows format, start by converting to
17575  # unix format.
17576  path="$dxsdk_path"
17577  new_path=`$CYGPATH -u "$path"`
17578
17579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17582  # "foo.exe" is OK but "foo" is an error.
17583  #
17584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17585  # It is also a way to make sure we got the proper file name for the real test later on.
17586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17587  if test "x$test_shortpath" = x; then
17588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17589$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17590    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17591  fi
17592
17593  # Call helper function which possibly converts this using DOS-style short mode.
17594  # If so, the updated path is stored in $new_path.
17595
17596  input_path="$new_path"
17597  # Check if we need to convert this using DOS-style short mode. If the path
17598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17599  # take no chances and rewrite it.
17600  # Note: m4 eats our [], so we need to use [ and ] instead.
17601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17602  if test "x$has_forbidden_chars" != x; then
17603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17607      # Going to short mode and back again did indeed matter. Since short mode is
17608      # case insensitive, let's make it lowercase to improve readability.
17609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17610      # Now convert it back to Unix-stile (cygpath)
17611      input_path=`$CYGPATH -u "$shortmode_path"`
17612      new_path="$input_path"
17613    fi
17614  fi
17615
17616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17617  if test "x$test_cygdrive_prefix" = x; then
17618    # As a simple fix, exclude /usr/bin since it's not a real path.
17619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17621      # a path prefixed by /cygdrive for fixpath to work.
17622      new_path="$CYGWIN_ROOT_PATH$input_path"
17623    fi
17624  fi
17625
17626
17627  if test "x$path" != "x$new_path"; then
17628    dxsdk_path="$new_path"
17629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17630$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17631  fi
17632
17633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17634
17635  path="$dxsdk_path"
17636  has_colon=`$ECHO $path | $GREP ^.:`
17637  new_path="$path"
17638  if test "x$has_colon" = x; then
17639    # Not in mixed or Windows style, start by that.
17640    new_path=`cmd //c echo $path`
17641  fi
17642
17643
17644  input_path="$new_path"
17645  # Check if we need to convert this using DOS-style short mode. If the path
17646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17647  # take no chances and rewrite it.
17648  # Note: m4 eats our [], so we need to use [ and ] instead.
17649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17650  if test "x$has_forbidden_chars" != x; then
17651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17653  fi
17654
17655
17656  windows_path="$new_path"
17657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17658    unix_path=`$CYGPATH -u "$windows_path"`
17659    new_path="$unix_path"
17660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17662    new_path="$unix_path"
17663  fi
17664
17665  if test "x$path" != "x$new_path"; then
17666    dxsdk_path="$new_path"
17667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17668$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17669  fi
17670
17671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17673
17674  else
17675    # We're on a posix platform. Hooray! :)
17676    path="$dxsdk_path"
17677    has_space=`$ECHO "$path" | $GREP " "`
17678    if test "x$has_space" != x; then
17679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17680$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17681      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17682    fi
17683
17684    # Use eval to expand a potential ~
17685    eval path="$path"
17686    if test ! -f "$path" && test ! -d "$path"; then
17687      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17688    fi
17689
17690    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17691  fi
17692
17693
17694  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17695$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17696  if test "x$with_dxsdk_lib" != x; then
17697    DXSDK_LIB_PATH="$with_dxsdk_lib"
17698  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17699    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17700  else
17701    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17702  fi
17703  # dsound.lib is linked to in jsoundds
17704  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17705    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17706  fi
17707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17708$as_echo "$DXSDK_LIB_PATH" >&6; }
17709
17710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17711
17712  # Input might be given as Windows format, start by converting to
17713  # unix format.
17714  path="$DXSDK_LIB_PATH"
17715  new_path=`$CYGPATH -u "$path"`
17716
17717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17720  # "foo.exe" is OK but "foo" is an error.
17721  #
17722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17723  # It is also a way to make sure we got the proper file name for the real test later on.
17724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17725  if test "x$test_shortpath" = x; then
17726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17727$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17728    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17729  fi
17730
17731  # Call helper function which possibly converts this using DOS-style short mode.
17732  # If so, the updated path is stored in $new_path.
17733
17734  input_path="$new_path"
17735  # Check if we need to convert this using DOS-style short mode. If the path
17736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17737  # take no chances and rewrite it.
17738  # Note: m4 eats our [], so we need to use [ and ] instead.
17739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17740  if test "x$has_forbidden_chars" != x; then
17741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17745      # Going to short mode and back again did indeed matter. Since short mode is
17746      # case insensitive, let's make it lowercase to improve readability.
17747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17748      # Now convert it back to Unix-stile (cygpath)
17749      input_path=`$CYGPATH -u "$shortmode_path"`
17750      new_path="$input_path"
17751    fi
17752  fi
17753
17754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17755  if test "x$test_cygdrive_prefix" = x; then
17756    # As a simple fix, exclude /usr/bin since it's not a real path.
17757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17759      # a path prefixed by /cygdrive for fixpath to work.
17760      new_path="$CYGWIN_ROOT_PATH$input_path"
17761    fi
17762  fi
17763
17764
17765  if test "x$path" != "x$new_path"; then
17766    DXSDK_LIB_PATH="$new_path"
17767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17768$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17769  fi
17770
17771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17772
17773  path="$DXSDK_LIB_PATH"
17774  has_colon=`$ECHO $path | $GREP ^.:`
17775  new_path="$path"
17776  if test "x$has_colon" = x; then
17777    # Not in mixed or Windows style, start by that.
17778    new_path=`cmd //c echo $path`
17779  fi
17780
17781
17782  input_path="$new_path"
17783  # Check if we need to convert this using DOS-style short mode. If the path
17784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17785  # take no chances and rewrite it.
17786  # Note: m4 eats our [], so we need to use [ and ] instead.
17787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17788  if test "x$has_forbidden_chars" != x; then
17789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17791  fi
17792
17793
17794  windows_path="$new_path"
17795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17796    unix_path=`$CYGPATH -u "$windows_path"`
17797    new_path="$unix_path"
17798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17800    new_path="$unix_path"
17801  fi
17802
17803  if test "x$path" != "x$new_path"; then
17804    DXSDK_LIB_PATH="$new_path"
17805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17806$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17807  fi
17808
17809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17811
17812  else
17813    # We're on a posix platform. Hooray! :)
17814    path="$DXSDK_LIB_PATH"
17815    has_space=`$ECHO "$path" | $GREP " "`
17816    if test "x$has_space" != x; then
17817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17818$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17819      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17820    fi
17821
17822    # Use eval to expand a potential ~
17823    eval path="$path"
17824    if test ! -f "$path" && test ! -d "$path"; then
17825      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17826    fi
17827
17828    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17829  fi
17830
17831
17832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17833$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17834  if test "x$with_dxsdk_include" != x; then
17835    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17836  else
17837    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17838  fi
17839  # dsound.h is included in jsoundds
17840  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17841    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17842  fi
17843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17844$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17845
17846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17847
17848  # Input might be given as Windows format, start by converting to
17849  # unix format.
17850  path="$DXSDK_INCLUDE_PATH"
17851  new_path=`$CYGPATH -u "$path"`
17852
17853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17856  # "foo.exe" is OK but "foo" is an error.
17857  #
17858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17859  # It is also a way to make sure we got the proper file name for the real test later on.
17860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17861  if test "x$test_shortpath" = x; then
17862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17863$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17864    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17865  fi
17866
17867  # Call helper function which possibly converts this using DOS-style short mode.
17868  # If so, the updated path is stored in $new_path.
17869
17870  input_path="$new_path"
17871  # Check if we need to convert this using DOS-style short mode. If the path
17872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17873  # take no chances and rewrite it.
17874  # Note: m4 eats our [], so we need to use [ and ] instead.
17875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17876  if test "x$has_forbidden_chars" != x; then
17877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17881      # Going to short mode and back again did indeed matter. Since short mode is
17882      # case insensitive, let's make it lowercase to improve readability.
17883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17884      # Now convert it back to Unix-stile (cygpath)
17885      input_path=`$CYGPATH -u "$shortmode_path"`
17886      new_path="$input_path"
17887    fi
17888  fi
17889
17890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17891  if test "x$test_cygdrive_prefix" = x; then
17892    # As a simple fix, exclude /usr/bin since it's not a real path.
17893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17895      # a path prefixed by /cygdrive for fixpath to work.
17896      new_path="$CYGWIN_ROOT_PATH$input_path"
17897    fi
17898  fi
17899
17900
17901  if test "x$path" != "x$new_path"; then
17902    DXSDK_INCLUDE_PATH="$new_path"
17903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17904$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17905  fi
17906
17907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17908
17909  path="$DXSDK_INCLUDE_PATH"
17910  has_colon=`$ECHO $path | $GREP ^.:`
17911  new_path="$path"
17912  if test "x$has_colon" = x; then
17913    # Not in mixed or Windows style, start by that.
17914    new_path=`cmd //c echo $path`
17915  fi
17916
17917
17918  input_path="$new_path"
17919  # Check if we need to convert this using DOS-style short mode. If the path
17920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17921  # take no chances and rewrite it.
17922  # Note: m4 eats our [], so we need to use [ and ] instead.
17923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17924  if test "x$has_forbidden_chars" != x; then
17925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17927  fi
17928
17929
17930  windows_path="$new_path"
17931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17932    unix_path=`$CYGPATH -u "$windows_path"`
17933    new_path="$unix_path"
17934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17936    new_path="$unix_path"
17937  fi
17938
17939  if test "x$path" != "x$new_path"; then
17940    DXSDK_INCLUDE_PATH="$new_path"
17941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17942$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17943  fi
17944
17945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17947
17948  else
17949    # We're on a posix platform. Hooray! :)
17950    path="$DXSDK_INCLUDE_PATH"
17951    has_space=`$ECHO "$path" | $GREP " "`
17952    if test "x$has_space" != x; then
17953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17954$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17955      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17956    fi
17957
17958    # Use eval to expand a potential ~
17959    eval path="$path"
17960    if test ! -f "$path" && test ! -d "$path"; then
17961      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17962    fi
17963
17964    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17965  fi
17966
17967
17968
17969
17970  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17971
17972fi
17973
17974
17975
17976# If --build AND --host is set, then the configure script will find any
17977# cross compilation tools in the PATH. Cross compilation tools
17978# follows the cross compilation standard where they are prefixed with ${host}.
17979# For example the binary i686-sun-solaris2.10-gcc
17980# will cross compile for i686-sun-solaris2.10
17981# If neither of build and host is not set, then build=host and the
17982# default compiler found in the path will be used.
17983# Setting only --host, does not seem to be really supported.
17984# Please set both --build and --host if you want to cross compile.
17985
17986if test "x$COMPILE_TYPE" = "xcross"; then
17987    # Now we to find a C/C++ compiler that can build executables for the build
17988    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17989    # once. Also, we need to do this before adding a tools dir to the path,
17990    # otherwise we might pick up cross-compilers which don't use standard naming.
17991    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17992    # to wait until they are properly discovered.
17993    for ac_prog in cl cc gcc
17994do
17995  # Extract the first word of "$ac_prog", so it can be a program name with args.
17996set dummy $ac_prog; ac_word=$2
17997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17998$as_echo_n "checking for $ac_word... " >&6; }
17999if ${ac_cv_path_BUILD_CC+:} false; then :
18000  $as_echo_n "(cached) " >&6
18001else
18002  case $BUILD_CC in
18003  [\\/]* | ?:[\\/]*)
18004  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18005  ;;
18006  *)
18007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18008for as_dir in $PATH
18009do
18010  IFS=$as_save_IFS
18011  test -z "$as_dir" && as_dir=.
18012    for ac_exec_ext in '' $ac_executable_extensions; do
18013  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18014    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18016    break 2
18017  fi
18018done
18019  done
18020IFS=$as_save_IFS
18021
18022  ;;
18023esac
18024fi
18025BUILD_CC=$ac_cv_path_BUILD_CC
18026if test -n "$BUILD_CC"; then
18027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18028$as_echo "$BUILD_CC" >&6; }
18029else
18030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18031$as_echo "no" >&6; }
18032fi
18033
18034
18035  test -n "$BUILD_CC" && break
18036done
18037
18038
18039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18040
18041  # First separate the path from the arguments. This will split at the first
18042  # space.
18043  complete="$BUILD_CC"
18044  path="${complete%% *}"
18045  tmp="$complete EOL"
18046  arguments="${tmp#* }"
18047
18048  # Input might be given as Windows format, start by converting to
18049  # unix format.
18050  new_path=`$CYGPATH -u "$path"`
18051
18052  # Now try to locate executable using which
18053  new_path=`$WHICH "$new_path" 2> /dev/null`
18054  # bat and cmd files are not always considered executable in cygwin causing which
18055  # to not find them
18056  if test "x$new_path" = x \
18057           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18058           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18059    new_path=`$CYGPATH -u "$path"`
18060  fi
18061  if test "x$new_path" = x; then
18062    # Oops. Which didn't find the executable.
18063    # The splitting of arguments from the executable at a space might have been incorrect,
18064    # since paths with space are more likely in Windows. Give it another try with the whole
18065    # argument.
18066    path="$complete"
18067    arguments="EOL"
18068    new_path=`$CYGPATH -u "$path"`
18069    new_path=`$WHICH "$new_path" 2> /dev/null`
18070    # bat and cmd files are not always considered executable in cygwin causing which
18071    # to not find them
18072    if test "x$new_path" = x \
18073             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18074             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18075      new_path=`$CYGPATH -u "$path"`
18076    fi
18077    if test "x$new_path" = x; then
18078      # It's still not found. Now this is an unrecoverable error.
18079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18080$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18081      has_space=`$ECHO "$complete" | $GREP " "`
18082      if test "x$has_space" != x; then
18083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18085      fi
18086      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18087    fi
18088  fi
18089
18090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18093  # "foo.exe" is OK but "foo" is an error.
18094  #
18095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18096  # It is also a way to make sure we got the proper file name for the real test later on.
18097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18098  if test "x$test_shortpath" = x; then
18099    # Short path failed, file does not exist as specified.
18100    # Try adding .exe or .cmd
18101    if test -f "${new_path}.exe"; then
18102       input_to_shortpath="${new_path}.exe"
18103    elif test -f "${new_path}.cmd"; then
18104       input_to_shortpath="${new_path}.cmd"
18105    else
18106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18107$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18108      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18109$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18110      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18111    fi
18112  else
18113    input_to_shortpath="$new_path"
18114  fi
18115
18116  # Call helper function which possibly converts this using DOS-style short mode.
18117  # If so, the updated path is stored in $new_path.
18118  new_path="$input_to_shortpath"
18119
18120  input_path="$input_to_shortpath"
18121  # Check if we need to convert this using DOS-style short mode. If the path
18122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18123  # take no chances and rewrite it.
18124  # Note: m4 eats our [], so we need to use [ and ] instead.
18125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18126  if test "x$has_forbidden_chars" != x; then
18127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18131      # Going to short mode and back again did indeed matter. Since short mode is
18132      # case insensitive, let's make it lowercase to improve readability.
18133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18134      # Now convert it back to Unix-stile (cygpath)
18135      input_path=`$CYGPATH -u "$shortmode_path"`
18136      new_path="$input_path"
18137    fi
18138  fi
18139
18140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18141  if test "x$test_cygdrive_prefix" = x; then
18142    # As a simple fix, exclude /usr/bin since it's not a real path.
18143    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18145      # a path prefixed by /cygdrive for fixpath to work.
18146      new_path="$CYGWIN_ROOT_PATH$input_path"
18147    fi
18148  fi
18149
18150  # remove trailing .exe if any
18151  new_path="${new_path/%.exe/}"
18152
18153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18154
18155  # First separate the path from the arguments. This will split at the first
18156  # space.
18157  complete="$BUILD_CC"
18158  path="${complete%% *}"
18159  tmp="$complete EOL"
18160  arguments="${tmp#* }"
18161
18162  # Input might be given as Windows format, start by converting to
18163  # unix format.
18164  new_path="$path"
18165
18166  windows_path="$new_path"
18167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18168    unix_path=`$CYGPATH -u "$windows_path"`
18169    new_path="$unix_path"
18170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18172    new_path="$unix_path"
18173  fi
18174
18175
18176  # Now try to locate executable using which
18177  new_path=`$WHICH "$new_path" 2> /dev/null`
18178
18179  if test "x$new_path" = x; then
18180    # Oops. Which didn't find the executable.
18181    # The splitting of arguments from the executable at a space might have been incorrect,
18182    # since paths with space are more likely in Windows. Give it another try with the whole
18183    # argument.
18184    path="$complete"
18185    arguments="EOL"
18186    new_path="$path"
18187
18188  windows_path="$new_path"
18189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18190    unix_path=`$CYGPATH -u "$windows_path"`
18191    new_path="$unix_path"
18192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18194    new_path="$unix_path"
18195  fi
18196
18197
18198    new_path=`$WHICH "$new_path" 2> /dev/null`
18199
18200    if test "x$new_path" = x; then
18201      # It's still not found. Now this is an unrecoverable error.
18202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18203$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18204      has_space=`$ECHO "$complete" | $GREP " "`
18205      if test "x$has_space" != x; then
18206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18208      fi
18209      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18210    fi
18211  fi
18212
18213  # Now new_path has a complete unix path to the binary
18214  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18215    # Keep paths in /bin as-is, but remove trailing .exe if any
18216    new_path="${new_path/%.exe/}"
18217    # Do not save /bin paths to all_fixpath_prefixes!
18218  else
18219    # Not in mixed or Windows style, start by that.
18220    new_path=`cmd //c echo $new_path`
18221
18222  input_path="$new_path"
18223  # Check if we need to convert this using DOS-style short mode. If the path
18224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18225  # take no chances and rewrite it.
18226  # Note: m4 eats our [], so we need to use [ and ] instead.
18227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18228  if test "x$has_forbidden_chars" != x; then
18229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18231  fi
18232
18233    # Output is in $new_path
18234
18235  windows_path="$new_path"
18236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18237    unix_path=`$CYGPATH -u "$windows_path"`
18238    new_path="$unix_path"
18239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18241    new_path="$unix_path"
18242  fi
18243
18244    # remove trailing .exe if any
18245    new_path="${new_path/%.exe/}"
18246
18247    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18248    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18249  fi
18250
18251  else
18252    # We're on a posix platform. Hooray! :)
18253    # First separate the path from the arguments. This will split at the first
18254    # space.
18255    complete="$BUILD_CC"
18256    path="${complete%% *}"
18257    tmp="$complete EOL"
18258    arguments="${tmp#* }"
18259
18260    # Cannot rely on the command "which" here since it doesn't always work.
18261    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18262    if test -z "$is_absolute_path"; then
18263      # Path to executable is not absolute. Find it.
18264      IFS_save="$IFS"
18265      IFS=:
18266      for p in $PATH; do
18267        if test -f "$p/$path" && test -x "$p/$path"; then
18268          new_path="$p/$path"
18269          break
18270        fi
18271      done
18272      IFS="$IFS_save"
18273    else
18274      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18275$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18276      new_path="$path"
18277    fi
18278
18279    if test "x$new_path" = x; then
18280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18281$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18282        has_space=`$ECHO "$complete" | $GREP " "`
18283        if test "x$has_space" != x; then
18284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18286        fi
18287        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18288      fi
18289  fi
18290
18291      # Now join together the path and the arguments once again
18292      if test "x$arguments" != xEOL; then
18293        new_complete="$new_path ${arguments% *}"
18294      else
18295        new_complete="$new_path"
18296      fi
18297
18298  if test "x$complete" != "x$new_complete"; then
18299      BUILD_CC="$new_complete"
18300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18301$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18302    fi
18303
18304    for ac_prog in cl CC g++
18305do
18306  # Extract the first word of "$ac_prog", so it can be a program name with args.
18307set dummy $ac_prog; ac_word=$2
18308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18309$as_echo_n "checking for $ac_word... " >&6; }
18310if ${ac_cv_path_BUILD_CXX+:} false; then :
18311  $as_echo_n "(cached) " >&6
18312else
18313  case $BUILD_CXX in
18314  [\\/]* | ?:[\\/]*)
18315  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18316  ;;
18317  *)
18318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18319for as_dir in $PATH
18320do
18321  IFS=$as_save_IFS
18322  test -z "$as_dir" && as_dir=.
18323    for ac_exec_ext in '' $ac_executable_extensions; do
18324  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18325    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18327    break 2
18328  fi
18329done
18330  done
18331IFS=$as_save_IFS
18332
18333  ;;
18334esac
18335fi
18336BUILD_CXX=$ac_cv_path_BUILD_CXX
18337if test -n "$BUILD_CXX"; then
18338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18339$as_echo "$BUILD_CXX" >&6; }
18340else
18341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18342$as_echo "no" >&6; }
18343fi
18344
18345
18346  test -n "$BUILD_CXX" && break
18347done
18348
18349
18350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18351
18352  # First separate the path from the arguments. This will split at the first
18353  # space.
18354  complete="$BUILD_CXX"
18355  path="${complete%% *}"
18356  tmp="$complete EOL"
18357  arguments="${tmp#* }"
18358
18359  # Input might be given as Windows format, start by converting to
18360  # unix format.
18361  new_path=`$CYGPATH -u "$path"`
18362
18363  # Now try to locate executable using which
18364  new_path=`$WHICH "$new_path" 2> /dev/null`
18365  # bat and cmd files are not always considered executable in cygwin causing which
18366  # to not find them
18367  if test "x$new_path" = x \
18368           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18369           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18370    new_path=`$CYGPATH -u "$path"`
18371  fi
18372  if test "x$new_path" = x; then
18373    # Oops. Which didn't find the executable.
18374    # The splitting of arguments from the executable at a space might have been incorrect,
18375    # since paths with space are more likely in Windows. Give it another try with the whole
18376    # argument.
18377    path="$complete"
18378    arguments="EOL"
18379    new_path=`$CYGPATH -u "$path"`
18380    new_path=`$WHICH "$new_path" 2> /dev/null`
18381    # bat and cmd files are not always considered executable in cygwin causing which
18382    # to not find them
18383    if test "x$new_path" = x \
18384             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18385             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18386      new_path=`$CYGPATH -u "$path"`
18387    fi
18388    if test "x$new_path" = x; then
18389      # It's still not found. Now this is an unrecoverable error.
18390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18391$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18392      has_space=`$ECHO "$complete" | $GREP " "`
18393      if test "x$has_space" != x; then
18394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18396      fi
18397      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18398    fi
18399  fi
18400
18401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18404  # "foo.exe" is OK but "foo" is an error.
18405  #
18406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18407  # It is also a way to make sure we got the proper file name for the real test later on.
18408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18409  if test "x$test_shortpath" = x; then
18410    # Short path failed, file does not exist as specified.
18411    # Try adding .exe or .cmd
18412    if test -f "${new_path}.exe"; then
18413       input_to_shortpath="${new_path}.exe"
18414    elif test -f "${new_path}.cmd"; then
18415       input_to_shortpath="${new_path}.cmd"
18416    else
18417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18418$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18419      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18420$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18421      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18422    fi
18423  else
18424    input_to_shortpath="$new_path"
18425  fi
18426
18427  # Call helper function which possibly converts this using DOS-style short mode.
18428  # If so, the updated path is stored in $new_path.
18429  new_path="$input_to_shortpath"
18430
18431  input_path="$input_to_shortpath"
18432  # Check if we need to convert this using DOS-style short mode. If the path
18433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18434  # take no chances and rewrite it.
18435  # Note: m4 eats our [], so we need to use [ and ] instead.
18436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18437  if test "x$has_forbidden_chars" != x; then
18438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18442      # Going to short mode and back again did indeed matter. Since short mode is
18443      # case insensitive, let's make it lowercase to improve readability.
18444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18445      # Now convert it back to Unix-stile (cygpath)
18446      input_path=`$CYGPATH -u "$shortmode_path"`
18447      new_path="$input_path"
18448    fi
18449  fi
18450
18451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18452  if test "x$test_cygdrive_prefix" = x; then
18453    # As a simple fix, exclude /usr/bin since it's not a real path.
18454    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18456      # a path prefixed by /cygdrive for fixpath to work.
18457      new_path="$CYGWIN_ROOT_PATH$input_path"
18458    fi
18459  fi
18460
18461  # remove trailing .exe if any
18462  new_path="${new_path/%.exe/}"
18463
18464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18465
18466  # First separate the path from the arguments. This will split at the first
18467  # space.
18468  complete="$BUILD_CXX"
18469  path="${complete%% *}"
18470  tmp="$complete EOL"
18471  arguments="${tmp#* }"
18472
18473  # Input might be given as Windows format, start by converting to
18474  # unix format.
18475  new_path="$path"
18476
18477  windows_path="$new_path"
18478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18479    unix_path=`$CYGPATH -u "$windows_path"`
18480    new_path="$unix_path"
18481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18483    new_path="$unix_path"
18484  fi
18485
18486
18487  # Now try to locate executable using which
18488  new_path=`$WHICH "$new_path" 2> /dev/null`
18489
18490  if test "x$new_path" = x; then
18491    # Oops. Which didn't find the executable.
18492    # The splitting of arguments from the executable at a space might have been incorrect,
18493    # since paths with space are more likely in Windows. Give it another try with the whole
18494    # argument.
18495    path="$complete"
18496    arguments="EOL"
18497    new_path="$path"
18498
18499  windows_path="$new_path"
18500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18501    unix_path=`$CYGPATH -u "$windows_path"`
18502    new_path="$unix_path"
18503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18505    new_path="$unix_path"
18506  fi
18507
18508
18509    new_path=`$WHICH "$new_path" 2> /dev/null`
18510
18511    if test "x$new_path" = x; then
18512      # It's still not found. Now this is an unrecoverable error.
18513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18514$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18515      has_space=`$ECHO "$complete" | $GREP " "`
18516      if test "x$has_space" != x; then
18517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18519      fi
18520      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18521    fi
18522  fi
18523
18524  # Now new_path has a complete unix path to the binary
18525  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18526    # Keep paths in /bin as-is, but remove trailing .exe if any
18527    new_path="${new_path/%.exe/}"
18528    # Do not save /bin paths to all_fixpath_prefixes!
18529  else
18530    # Not in mixed or Windows style, start by that.
18531    new_path=`cmd //c echo $new_path`
18532
18533  input_path="$new_path"
18534  # Check if we need to convert this using DOS-style short mode. If the path
18535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18536  # take no chances and rewrite it.
18537  # Note: m4 eats our [], so we need to use [ and ] instead.
18538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18539  if test "x$has_forbidden_chars" != x; then
18540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18542  fi
18543
18544    # Output is in $new_path
18545
18546  windows_path="$new_path"
18547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18548    unix_path=`$CYGPATH -u "$windows_path"`
18549    new_path="$unix_path"
18550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18552    new_path="$unix_path"
18553  fi
18554
18555    # remove trailing .exe if any
18556    new_path="${new_path/%.exe/}"
18557
18558    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18559    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18560  fi
18561
18562  else
18563    # We're on a posix platform. Hooray! :)
18564    # First separate the path from the arguments. This will split at the first
18565    # space.
18566    complete="$BUILD_CXX"
18567    path="${complete%% *}"
18568    tmp="$complete EOL"
18569    arguments="${tmp#* }"
18570
18571    # Cannot rely on the command "which" here since it doesn't always work.
18572    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18573    if test -z "$is_absolute_path"; then
18574      # Path to executable is not absolute. Find it.
18575      IFS_save="$IFS"
18576      IFS=:
18577      for p in $PATH; do
18578        if test -f "$p/$path" && test -x "$p/$path"; then
18579          new_path="$p/$path"
18580          break
18581        fi
18582      done
18583      IFS="$IFS_save"
18584    else
18585      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18586$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18587      new_path="$path"
18588    fi
18589
18590    if test "x$new_path" = x; then
18591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18592$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18593        has_space=`$ECHO "$complete" | $GREP " "`
18594        if test "x$has_space" != x; then
18595          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18596$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18597        fi
18598        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18599      fi
18600  fi
18601
18602      # Now join together the path and the arguments once again
18603      if test "x$arguments" != xEOL; then
18604        new_complete="$new_path ${arguments% *}"
18605      else
18606        new_complete="$new_path"
18607      fi
18608
18609  if test "x$complete" != "x$new_complete"; then
18610      BUILD_CXX="$new_complete"
18611      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18612$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18613    fi
18614
18615    # Extract the first word of "ld", so it can be a program name with args.
18616set dummy ld; ac_word=$2
18617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18618$as_echo_n "checking for $ac_word... " >&6; }
18619if ${ac_cv_path_BUILD_LD+:} false; then :
18620  $as_echo_n "(cached) " >&6
18621else
18622  case $BUILD_LD in
18623  [\\/]* | ?:[\\/]*)
18624  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18625  ;;
18626  *)
18627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18628for as_dir in $PATH
18629do
18630  IFS=$as_save_IFS
18631  test -z "$as_dir" && as_dir=.
18632    for ac_exec_ext in '' $ac_executable_extensions; do
18633  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18634    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18636    break 2
18637  fi
18638done
18639  done
18640IFS=$as_save_IFS
18641
18642  ;;
18643esac
18644fi
18645BUILD_LD=$ac_cv_path_BUILD_LD
18646if test -n "$BUILD_LD"; then
18647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18648$as_echo "$BUILD_LD" >&6; }
18649else
18650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18651$as_echo "no" >&6; }
18652fi
18653
18654
18655
18656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18657
18658  # First separate the path from the arguments. This will split at the first
18659  # space.
18660  complete="$BUILD_LD"
18661  path="${complete%% *}"
18662  tmp="$complete EOL"
18663  arguments="${tmp#* }"
18664
18665  # Input might be given as Windows format, start by converting to
18666  # unix format.
18667  new_path=`$CYGPATH -u "$path"`
18668
18669  # Now try to locate executable using which
18670  new_path=`$WHICH "$new_path" 2> /dev/null`
18671  # bat and cmd files are not always considered executable in cygwin causing which
18672  # to not find them
18673  if test "x$new_path" = x \
18674           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18675           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18676    new_path=`$CYGPATH -u "$path"`
18677  fi
18678  if test "x$new_path" = x; then
18679    # Oops. Which didn't find the executable.
18680    # The splitting of arguments from the executable at a space might have been incorrect,
18681    # since paths with space are more likely in Windows. Give it another try with the whole
18682    # argument.
18683    path="$complete"
18684    arguments="EOL"
18685    new_path=`$CYGPATH -u "$path"`
18686    new_path=`$WHICH "$new_path" 2> /dev/null`
18687    # bat and cmd files are not always considered executable in cygwin causing which
18688    # to not find them
18689    if test "x$new_path" = x \
18690             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18691             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18692      new_path=`$CYGPATH -u "$path"`
18693    fi
18694    if test "x$new_path" = x; then
18695      # It's still not found. Now this is an unrecoverable error.
18696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18697$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18698      has_space=`$ECHO "$complete" | $GREP " "`
18699      if test "x$has_space" != x; then
18700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18702      fi
18703      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18704    fi
18705  fi
18706
18707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18710  # "foo.exe" is OK but "foo" is an error.
18711  #
18712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18713  # It is also a way to make sure we got the proper file name for the real test later on.
18714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18715  if test "x$test_shortpath" = x; then
18716    # Short path failed, file does not exist as specified.
18717    # Try adding .exe or .cmd
18718    if test -f "${new_path}.exe"; then
18719       input_to_shortpath="${new_path}.exe"
18720    elif test -f "${new_path}.cmd"; then
18721       input_to_shortpath="${new_path}.cmd"
18722    else
18723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18724$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18725      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18726$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18727      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18728    fi
18729  else
18730    input_to_shortpath="$new_path"
18731  fi
18732
18733  # Call helper function which possibly converts this using DOS-style short mode.
18734  # If so, the updated path is stored in $new_path.
18735  new_path="$input_to_shortpath"
18736
18737  input_path="$input_to_shortpath"
18738  # Check if we need to convert this using DOS-style short mode. If the path
18739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18740  # take no chances and rewrite it.
18741  # Note: m4 eats our [], so we need to use [ and ] instead.
18742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18743  if test "x$has_forbidden_chars" != x; then
18744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18748      # Going to short mode and back again did indeed matter. Since short mode is
18749      # case insensitive, let's make it lowercase to improve readability.
18750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18751      # Now convert it back to Unix-stile (cygpath)
18752      input_path=`$CYGPATH -u "$shortmode_path"`
18753      new_path="$input_path"
18754    fi
18755  fi
18756
18757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18758  if test "x$test_cygdrive_prefix" = x; then
18759    # As a simple fix, exclude /usr/bin since it's not a real path.
18760    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18762      # a path prefixed by /cygdrive for fixpath to work.
18763      new_path="$CYGWIN_ROOT_PATH$input_path"
18764    fi
18765  fi
18766
18767  # remove trailing .exe if any
18768  new_path="${new_path/%.exe/}"
18769
18770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18771
18772  # First separate the path from the arguments. This will split at the first
18773  # space.
18774  complete="$BUILD_LD"
18775  path="${complete%% *}"
18776  tmp="$complete EOL"
18777  arguments="${tmp#* }"
18778
18779  # Input might be given as Windows format, start by converting to
18780  # unix format.
18781  new_path="$path"
18782
18783  windows_path="$new_path"
18784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18785    unix_path=`$CYGPATH -u "$windows_path"`
18786    new_path="$unix_path"
18787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18789    new_path="$unix_path"
18790  fi
18791
18792
18793  # Now try to locate executable using which
18794  new_path=`$WHICH "$new_path" 2> /dev/null`
18795
18796  if test "x$new_path" = x; then
18797    # Oops. Which didn't find the executable.
18798    # The splitting of arguments from the executable at a space might have been incorrect,
18799    # since paths with space are more likely in Windows. Give it another try with the whole
18800    # argument.
18801    path="$complete"
18802    arguments="EOL"
18803    new_path="$path"
18804
18805  windows_path="$new_path"
18806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18807    unix_path=`$CYGPATH -u "$windows_path"`
18808    new_path="$unix_path"
18809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18811    new_path="$unix_path"
18812  fi
18813
18814
18815    new_path=`$WHICH "$new_path" 2> /dev/null`
18816
18817    if test "x$new_path" = x; then
18818      # It's still not found. Now this is an unrecoverable error.
18819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18820$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18821      has_space=`$ECHO "$complete" | $GREP " "`
18822      if test "x$has_space" != x; then
18823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18825      fi
18826      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18827    fi
18828  fi
18829
18830  # Now new_path has a complete unix path to the binary
18831  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18832    # Keep paths in /bin as-is, but remove trailing .exe if any
18833    new_path="${new_path/%.exe/}"
18834    # Do not save /bin paths to all_fixpath_prefixes!
18835  else
18836    # Not in mixed or Windows style, start by that.
18837    new_path=`cmd //c echo $new_path`
18838
18839  input_path="$new_path"
18840  # Check if we need to convert this using DOS-style short mode. If the path
18841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18842  # take no chances and rewrite it.
18843  # Note: m4 eats our [], so we need to use [ and ] instead.
18844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18845  if test "x$has_forbidden_chars" != x; then
18846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18848  fi
18849
18850    # Output is in $new_path
18851
18852  windows_path="$new_path"
18853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18854    unix_path=`$CYGPATH -u "$windows_path"`
18855    new_path="$unix_path"
18856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18858    new_path="$unix_path"
18859  fi
18860
18861    # remove trailing .exe if any
18862    new_path="${new_path/%.exe/}"
18863
18864    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18865    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18866  fi
18867
18868  else
18869    # We're on a posix platform. Hooray! :)
18870    # First separate the path from the arguments. This will split at the first
18871    # space.
18872    complete="$BUILD_LD"
18873    path="${complete%% *}"
18874    tmp="$complete EOL"
18875    arguments="${tmp#* }"
18876
18877    # Cannot rely on the command "which" here since it doesn't always work.
18878    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18879    if test -z "$is_absolute_path"; then
18880      # Path to executable is not absolute. Find it.
18881      IFS_save="$IFS"
18882      IFS=:
18883      for p in $PATH; do
18884        if test -f "$p/$path" && test -x "$p/$path"; then
18885          new_path="$p/$path"
18886          break
18887        fi
18888      done
18889      IFS="$IFS_save"
18890    else
18891      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18892$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18893      new_path="$path"
18894    fi
18895
18896    if test "x$new_path" = x; then
18897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18898$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18899        has_space=`$ECHO "$complete" | $GREP " "`
18900        if test "x$has_space" != x; then
18901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18903        fi
18904        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18905      fi
18906  fi
18907
18908      # Now join together the path and the arguments once again
18909      if test "x$arguments" != xEOL; then
18910        new_complete="$new_path ${arguments% *}"
18911      else
18912        new_complete="$new_path"
18913      fi
18914
18915  if test "x$complete" != "x$new_complete"; then
18916      BUILD_LD="$new_complete"
18917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18918$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18919    fi
18920
18921fi
18922
18923
18924
18925
18926# If a devkit is found on the builddeps server, then prepend its path to the
18927# PATH variable. If there are cross compilers available in the devkit, these
18928# will be found by AC_PROG_CC et al.
18929DEVKIT=
18930
18931
18932    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18933        # Source the builddeps file again, to make sure it uses the latest variables!
18934        . $builddepsfile
18935        # Look for a target and build machine specific resource!
18936        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18937        if test "x$resource" = x; then
18938            # Ok, lets instead look for a target specific resource
18939            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18940        fi
18941        if test "x$resource" = x; then
18942            # Ok, lets instead look for a build specific resource
18943            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18944        fi
18945        if test "x$resource" = x; then
18946            # Ok, lets instead look for a generic resource
18947            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18948            resource=${builddep_devkit}
18949        fi
18950        if test "x$resource" != x; then
18951            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18952$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18953	    # If the resource in the builddeps.conf file is an existing directory,
18954	    # for example /java/linux/cups
18955	    if test -d ${resource}; then
18956	       depdir=${resource}
18957	    else
18958
18959# devkit is for example mymodule
18960# $resource is for example libs/general/libmymod_1_2_3.zip
18961# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18962# $with_builddeps_dir is for example /localhome/builddeps
18963# depdir is the name of the variable into which we store the depdir, eg MYMOD
18964# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18965# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18966    filename=`basename $resource`
18967    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18968    filebase=${filename%%.*}
18969    extension=${filename#*.}
18970    installdir=$with_builddeps_dir/$filebase
18971    if test ! -f $installdir/$filename.unpacked; then
18972        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18973$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18974        if test ! -d $installdir; then
18975            mkdir -p $installdir
18976        fi
18977        if test ! -d $installdir; then
18978            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18979        fi
18980        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18981        touch $tmpfile
18982        if test ! -f $tmpfile; then
18983            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18984        fi
18985
18986    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18987    # $tmpfile is the local file name for the downloaded file.
18988    VALID_TOOL=no
18989    if test "x$BDEPS_FTP" = xwget; then
18990       VALID_TOOL=yes
18991       wget -O $tmpfile $with_builddeps_server/$resource
18992    fi
18993    if test "x$BDEPS_FTP" = xlftp; then
18994       VALID_TOOL=yes
18995       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18996    fi
18997    if test "x$BDEPS_FTP" = xftp; then
18998        VALID_TOOL=yes
18999        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19000        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19001        FTPUSERPWD=${FTPSERVER%%@*}
19002        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19003            FTPUSER=${userpwd%%:*}
19004            FTPPWD=${userpwd#*@}
19005            FTPSERVER=${FTPSERVER#*@}
19006        else
19007            FTPUSER=ftp
19008            FTPPWD=ftp
19009        fi
19010        # the "pass" command does not work on some
19011        # ftp clients (read ftp.exe) but if it works,
19012        # passive mode is better!
19013        (\
19014            echo "user $FTPUSER $FTPPWD"        ;\
19015            echo "pass"                         ;\
19016            echo "bin"                          ;\
19017            echo "get $FTPPATH $tmpfile"              ;\
19018        ) | ftp -in $FTPSERVER
19019    fi
19020    if test "x$VALID_TOOL" != xyes; then
19021       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19022    fi
19023
19024        mv $tmpfile $installdir/$filename
19025        if test ! -s $installdir/$filename; then
19026            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19027        fi
19028        case "$extension" in
19029            zip)  echo "Unzipping $installdir/$filename..."
19030               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19031            ;;
19032            tar.gz) echo "Untaring $installdir/$filename..."
19033               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19034            ;;
19035            tgz) echo "Untaring $installdir/$filename..."
19036               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19037            ;;
19038            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19039            ;;
19040        esac
19041    fi
19042    if test -f $installdir/$filename.unpacked; then
19043        depdir=$installdir
19044    fi
19045
19046	    fi
19047            # Source the builddeps file again, because in the previous command, the depdir
19048            # was updated to point at the current build dependency install directory.
19049            . $builddepsfile
19050            # Now extract variables from the builddeps.conf files.
19051            theroot=${builddep_devkit_ROOT}
19052            thecflags=${builddep_devkit_CFLAGS}
19053            thelibs=${builddep_devkit_LIBS}
19054            if test "x$depdir" = x; then
19055                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19056            fi
19057            DEVKIT=$depdir
19058            if test "x$theroot" != x; then
19059               DEVKIT="$theroot"
19060            fi
19061            if test "x$thecflags" != x; then
19062               DEVKIT_CFLAGS="$thecflags"
19063            fi
19064            if test "x$thelibs" != x; then
19065               DEVKIT_LIBS="$thelibs"
19066            fi
19067            # Found devkit
19068                     PATH="$DEVKIT/bin:$PATH"
19069                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19070                     if test "x$x_includes" = "xNONE"; then
19071                         x_includes="$SYS_ROOT/usr/include/X11"
19072                     fi
19073                     if test "x$x_libraries" = "xNONE"; then
19074                         x_libraries="$SYS_ROOT/usr/lib"
19075                     fi
19076
19077
19078        fi
19079
19080    fi
19081
19082
19083# Store the CFLAGS etal passed to the configure script.
19084ORG_CFLAGS="$CFLAGS"
19085ORG_CXXFLAGS="$CXXFLAGS"
19086ORG_OBJCFLAGS="$OBJCFLAGS"
19087
19088# autoconf magic only relies on PATH, so update it if tools dir is specified
19089OLD_PATH="$PATH"
19090if test "x$TOOLS_DIR" != x; then
19091  PATH=$TOOLS_DIR:$PATH
19092fi
19093
19094
19095### Locate C compiler (CC)
19096
19097# On windows, only cl.exe is supported.
19098# On Solaris, cc is preferred to gcc.
19099# Elsewhere, gcc is preferred to cc.
19100
19101if test "x$CC" != x; then
19102  COMPILER_CHECK_LIST="$CC"
19103elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19104  COMPILER_CHECK_LIST="cl"
19105elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19106  COMPILER_CHECK_LIST="cc gcc"
19107else
19108  COMPILER_CHECK_LIST="gcc cc"
19109fi
19110
19111
19112  COMPILER_NAME=C
19113
19114  CC=
19115  # If TOOLS_DIR is set, check for all compiler names in there first
19116  # before checking the rest of the PATH.
19117  if test -n "$TOOLS_DIR"; then
19118    PATH_save="$PATH"
19119    PATH="$TOOLS_DIR"
19120    for ac_prog in $COMPILER_CHECK_LIST
19121do
19122  # Extract the first word of "$ac_prog", so it can be a program name with args.
19123set dummy $ac_prog; ac_word=$2
19124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19125$as_echo_n "checking for $ac_word... " >&6; }
19126if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19127  $as_echo_n "(cached) " >&6
19128else
19129  case $TOOLS_DIR_CC in
19130  [\\/]* | ?:[\\/]*)
19131  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19132  ;;
19133  *)
19134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19135for as_dir in $PATH
19136do
19137  IFS=$as_save_IFS
19138  test -z "$as_dir" && as_dir=.
19139    for ac_exec_ext in '' $ac_executable_extensions; do
19140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19141    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19143    break 2
19144  fi
19145done
19146  done
19147IFS=$as_save_IFS
19148
19149  ;;
19150esac
19151fi
19152TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19153if test -n "$TOOLS_DIR_CC"; then
19154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19155$as_echo "$TOOLS_DIR_CC" >&6; }
19156else
19157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19158$as_echo "no" >&6; }
19159fi
19160
19161
19162  test -n "$TOOLS_DIR_CC" && break
19163done
19164
19165    CC=$TOOLS_DIR_CC
19166    PATH="$PATH_save"
19167  fi
19168
19169  # AC_PATH_PROGS can't be run multiple times with the same variable,
19170  # so create a new name for this run.
19171  if test "x$CC" = x; then
19172    for ac_prog in $COMPILER_CHECK_LIST
19173do
19174  # Extract the first word of "$ac_prog", so it can be a program name with args.
19175set dummy $ac_prog; ac_word=$2
19176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19177$as_echo_n "checking for $ac_word... " >&6; }
19178if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19179  $as_echo_n "(cached) " >&6
19180else
19181  case $POTENTIAL_CC in
19182  [\\/]* | ?:[\\/]*)
19183  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19184  ;;
19185  *)
19186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19187for as_dir in $PATH
19188do
19189  IFS=$as_save_IFS
19190  test -z "$as_dir" && as_dir=.
19191    for ac_exec_ext in '' $ac_executable_extensions; do
19192  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19193    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19195    break 2
19196  fi
19197done
19198  done
19199IFS=$as_save_IFS
19200
19201  ;;
19202esac
19203fi
19204POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19205if test -n "$POTENTIAL_CC"; then
19206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19207$as_echo "$POTENTIAL_CC" >&6; }
19208else
19209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19210$as_echo "no" >&6; }
19211fi
19212
19213
19214  test -n "$POTENTIAL_CC" && break
19215done
19216
19217    CC=$POTENTIAL_CC
19218  fi
19219
19220  if test "x$CC" = x; then
19221
19222    # Print a helpful message on how to acquire the necessary build dependency.
19223    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19224    MISSING_DEPENDENCY=devkit
19225    PKGHANDLER_COMMAND=
19226
19227    case $PKGHANDLER in
19228	apt-get)
19229                apt_help     $MISSING_DEPENDENCY ;;
19230    yum)
19231                yum_help     $MISSING_DEPENDENCY ;;
19232	port)
19233                port_help    $MISSING_DEPENDENCY ;;
19234	pkgutil)
19235                pkgutil_help $MISSING_DEPENDENCY ;;
19236	pkgadd)
19237                pkgadd_help  $MISSING_DEPENDENCY ;;
19238    * )
19239      break ;;
19240    esac
19241
19242    if test "x$PKGHANDLER_COMMAND" != x; then
19243        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19244    fi
19245
19246      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19247  fi
19248
19249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19250
19251  # First separate the path from the arguments. This will split at the first
19252  # space.
19253  complete="$CC"
19254  path="${complete%% *}"
19255  tmp="$complete EOL"
19256  arguments="${tmp#* }"
19257
19258  # Input might be given as Windows format, start by converting to
19259  # unix format.
19260  new_path=`$CYGPATH -u "$path"`
19261
19262  # Now try to locate executable using which
19263  new_path=`$WHICH "$new_path" 2> /dev/null`
19264  # bat and cmd files are not always considered executable in cygwin causing which
19265  # to not find them
19266  if test "x$new_path" = x \
19267           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19268           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19269    new_path=`$CYGPATH -u "$path"`
19270  fi
19271  if test "x$new_path" = x; then
19272    # Oops. Which didn't find the executable.
19273    # The splitting of arguments from the executable at a space might have been incorrect,
19274    # since paths with space are more likely in Windows. Give it another try with the whole
19275    # argument.
19276    path="$complete"
19277    arguments="EOL"
19278    new_path=`$CYGPATH -u "$path"`
19279    new_path=`$WHICH "$new_path" 2> /dev/null`
19280    # bat and cmd files are not always considered executable in cygwin causing which
19281    # to not find them
19282    if test "x$new_path" = x \
19283             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19284             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19285      new_path=`$CYGPATH -u "$path"`
19286    fi
19287    if test "x$new_path" = x; then
19288      # It's still not found. Now this is an unrecoverable error.
19289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19290$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19291      has_space=`$ECHO "$complete" | $GREP " "`
19292      if test "x$has_space" != x; then
19293        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19294$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19295      fi
19296      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19297    fi
19298  fi
19299
19300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19303  # "foo.exe" is OK but "foo" is an error.
19304  #
19305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19306  # It is also a way to make sure we got the proper file name for the real test later on.
19307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19308  if test "x$test_shortpath" = x; then
19309    # Short path failed, file does not exist as specified.
19310    # Try adding .exe or .cmd
19311    if test -f "${new_path}.exe"; then
19312       input_to_shortpath="${new_path}.exe"
19313    elif test -f "${new_path}.cmd"; then
19314       input_to_shortpath="${new_path}.cmd"
19315    else
19316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19317$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19318      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19319$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19320      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19321    fi
19322  else
19323    input_to_shortpath="$new_path"
19324  fi
19325
19326  # Call helper function which possibly converts this using DOS-style short mode.
19327  # If so, the updated path is stored in $new_path.
19328  new_path="$input_to_shortpath"
19329
19330  input_path="$input_to_shortpath"
19331  # Check if we need to convert this using DOS-style short mode. If the path
19332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19333  # take no chances and rewrite it.
19334  # Note: m4 eats our [], so we need to use [ and ] instead.
19335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19336  if test "x$has_forbidden_chars" != x; then
19337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19341      # Going to short mode and back again did indeed matter. Since short mode is
19342      # case insensitive, let's make it lowercase to improve readability.
19343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19344      # Now convert it back to Unix-stile (cygpath)
19345      input_path=`$CYGPATH -u "$shortmode_path"`
19346      new_path="$input_path"
19347    fi
19348  fi
19349
19350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19351  if test "x$test_cygdrive_prefix" = x; then
19352    # As a simple fix, exclude /usr/bin since it's not a real path.
19353    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19355      # a path prefixed by /cygdrive for fixpath to work.
19356      new_path="$CYGWIN_ROOT_PATH$input_path"
19357    fi
19358  fi
19359
19360  # remove trailing .exe if any
19361  new_path="${new_path/%.exe/}"
19362
19363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19364
19365  # First separate the path from the arguments. This will split at the first
19366  # space.
19367  complete="$CC"
19368  path="${complete%% *}"
19369  tmp="$complete EOL"
19370  arguments="${tmp#* }"
19371
19372  # Input might be given as Windows format, start by converting to
19373  # unix format.
19374  new_path="$path"
19375
19376  windows_path="$new_path"
19377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19378    unix_path=`$CYGPATH -u "$windows_path"`
19379    new_path="$unix_path"
19380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19382    new_path="$unix_path"
19383  fi
19384
19385
19386  # Now try to locate executable using which
19387  new_path=`$WHICH "$new_path" 2> /dev/null`
19388
19389  if test "x$new_path" = x; then
19390    # Oops. Which didn't find the executable.
19391    # The splitting of arguments from the executable at a space might have been incorrect,
19392    # since paths with space are more likely in Windows. Give it another try with the whole
19393    # argument.
19394    path="$complete"
19395    arguments="EOL"
19396    new_path="$path"
19397
19398  windows_path="$new_path"
19399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19400    unix_path=`$CYGPATH -u "$windows_path"`
19401    new_path="$unix_path"
19402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19404    new_path="$unix_path"
19405  fi
19406
19407
19408    new_path=`$WHICH "$new_path" 2> /dev/null`
19409
19410    if test "x$new_path" = x; then
19411      # It's still not found. Now this is an unrecoverable error.
19412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19413$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19414      has_space=`$ECHO "$complete" | $GREP " "`
19415      if test "x$has_space" != x; then
19416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19418      fi
19419      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19420    fi
19421  fi
19422
19423  # Now new_path has a complete unix path to the binary
19424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19425    # Keep paths in /bin as-is, but remove trailing .exe if any
19426    new_path="${new_path/%.exe/}"
19427    # Do not save /bin paths to all_fixpath_prefixes!
19428  else
19429    # Not in mixed or Windows style, start by that.
19430    new_path=`cmd //c echo $new_path`
19431
19432  input_path="$new_path"
19433  # Check if we need to convert this using DOS-style short mode. If the path
19434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19435  # take no chances and rewrite it.
19436  # Note: m4 eats our [], so we need to use [ and ] instead.
19437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19438  if test "x$has_forbidden_chars" != x; then
19439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19441  fi
19442
19443    # Output is in $new_path
19444
19445  windows_path="$new_path"
19446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19447    unix_path=`$CYGPATH -u "$windows_path"`
19448    new_path="$unix_path"
19449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19451    new_path="$unix_path"
19452  fi
19453
19454    # remove trailing .exe if any
19455    new_path="${new_path/%.exe/}"
19456
19457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19459  fi
19460
19461  else
19462    # We're on a posix platform. Hooray! :)
19463    # First separate the path from the arguments. This will split at the first
19464    # space.
19465    complete="$CC"
19466    path="${complete%% *}"
19467    tmp="$complete EOL"
19468    arguments="${tmp#* }"
19469
19470    # Cannot rely on the command "which" here since it doesn't always work.
19471    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19472    if test -z "$is_absolute_path"; then
19473      # Path to executable is not absolute. Find it.
19474      IFS_save="$IFS"
19475      IFS=:
19476      for p in $PATH; do
19477        if test -f "$p/$path" && test -x "$p/$path"; then
19478          new_path="$p/$path"
19479          break
19480        fi
19481      done
19482      IFS="$IFS_save"
19483    else
19484      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19485$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19486      new_path="$path"
19487    fi
19488
19489    if test "x$new_path" = x; then
19490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19491$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19492        has_space=`$ECHO "$complete" | $GREP " "`
19493        if test "x$has_space" != x; then
19494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19496        fi
19497        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19498      fi
19499  fi
19500
19501      # Now join together the path and the arguments once again
19502      if test "x$arguments" != xEOL; then
19503        new_complete="$new_path ${arguments% *}"
19504      else
19505        new_complete="$new_path"
19506      fi
19507
19508  if test "x$complete" != "x$new_complete"; then
19509      CC="$new_complete"
19510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19511$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19512    fi
19513
19514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19515$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19516  TEST_COMPILER="$CC"
19517
19518    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19519        # Follow a chain of symbolic links. Use readlink
19520        # where it exists, else fall back to horribly
19521        # complicated shell code.
19522        if test "x$READLINK_TESTED" != yes; then
19523            # On MacOSX there is a readlink tool with a different
19524            # purpose than the GNU readlink tool. Check the found readlink.
19525            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19526            if test "x$ISGNU" = x; then
19527                 # A readlink that we do not know how to use.
19528                 # Are there other non-GNU readlinks out there?
19529                 READLINK_TESTED=yes
19530                 READLINK=
19531            fi
19532        fi
19533
19534        if test "x$READLINK" != x; then
19535            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19536        else
19537            # Save the current directory for restoring afterwards
19538            STARTDIR=$PWD
19539            COUNTER=0
19540            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19541            sym_link_file=`$BASENAME $TEST_COMPILER`
19542            cd $sym_link_dir
19543            # Use -P flag to resolve symlinks in directories.
19544            cd `$THEPWDCMD -P`
19545            sym_link_dir=`$THEPWDCMD -P`
19546            # Resolve file symlinks
19547            while test $COUNTER -lt 20; do
19548                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19549                if test "x$ISLINK" == x; then
19550                    # This is not a symbolic link! We are done!
19551                    break
19552                fi
19553                # Again resolve directory symlinks since the target of the just found
19554                # link could be in a different directory
19555                cd `$DIRNAME $ISLINK`
19556                sym_link_dir=`$THEPWDCMD -P`
19557                sym_link_file=`$BASENAME $ISLINK`
19558                let COUNTER=COUNTER+1
19559            done
19560            cd $STARTDIR
19561            TEST_COMPILER=$sym_link_dir/$sym_link_file
19562        fi
19563    fi
19564
19565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19566$as_echo "$TEST_COMPILER" >&6; }
19567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19568$as_echo_n "checking if CC is disguised ccache... " >&6; }
19569
19570  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19571  if test "x$COMPILER_BASENAME" = "xccache"; then
19572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19573$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19574    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19575    # We want to control ccache invocation ourselves, so ignore this cc and try
19576    # searching again.
19577
19578    # Remove the path to the fake ccache cc from the PATH
19579    RETRY_COMPILER_SAVED_PATH="$PATH"
19580    COMPILER_DIRNAME=`$DIRNAME $CC`
19581    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19582
19583    # Try again looking for our compiler
19584    if test -n "$ac_tool_prefix"; then
19585  for ac_prog in $COMPILER_CHECK_LIST
19586  do
19587    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19588set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19590$as_echo_n "checking for $ac_word... " >&6; }
19591if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19592  $as_echo_n "(cached) " >&6
19593else
19594  if test -n "$PROPER_COMPILER_CC"; then
19595  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19596else
19597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19598for as_dir in $PATH
19599do
19600  IFS=$as_save_IFS
19601  test -z "$as_dir" && as_dir=.
19602    for ac_exec_ext in '' $ac_executable_extensions; do
19603  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19604    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19606    break 2
19607  fi
19608done
19609  done
19610IFS=$as_save_IFS
19611
19612fi
19613fi
19614PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19615if test -n "$PROPER_COMPILER_CC"; then
19616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19617$as_echo "$PROPER_COMPILER_CC" >&6; }
19618else
19619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19620$as_echo "no" >&6; }
19621fi
19622
19623
19624    test -n "$PROPER_COMPILER_CC" && break
19625  done
19626fi
19627if test -z "$PROPER_COMPILER_CC"; then
19628  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19629  for ac_prog in $COMPILER_CHECK_LIST
19630do
19631  # Extract the first word of "$ac_prog", so it can be a program name with args.
19632set dummy $ac_prog; ac_word=$2
19633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19634$as_echo_n "checking for $ac_word... " >&6; }
19635if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19636  $as_echo_n "(cached) " >&6
19637else
19638  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19639  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19640else
19641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19642for as_dir in $PATH
19643do
19644  IFS=$as_save_IFS
19645  test -z "$as_dir" && as_dir=.
19646    for ac_exec_ext in '' $ac_executable_extensions; do
19647  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19648    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19650    break 2
19651  fi
19652done
19653  done
19654IFS=$as_save_IFS
19655
19656fi
19657fi
19658ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19659if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19661$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19662else
19663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19664$as_echo "no" >&6; }
19665fi
19666
19667
19668  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19669done
19670
19671  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19672    PROPER_COMPILER_CC=""
19673  else
19674    case $cross_compiling:$ac_tool_warned in
19675yes:)
19676{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19677$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19678ac_tool_warned=yes ;;
19679esac
19680    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19681  fi
19682fi
19683
19684
19685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19686
19687  # First separate the path from the arguments. This will split at the first
19688  # space.
19689  complete="$PROPER_COMPILER_CC"
19690  path="${complete%% *}"
19691  tmp="$complete EOL"
19692  arguments="${tmp#* }"
19693
19694  # Input might be given as Windows format, start by converting to
19695  # unix format.
19696  new_path=`$CYGPATH -u "$path"`
19697
19698  # Now try to locate executable using which
19699  new_path=`$WHICH "$new_path" 2> /dev/null`
19700  # bat and cmd files are not always considered executable in cygwin causing which
19701  # to not find them
19702  if test "x$new_path" = x \
19703           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19704           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19705    new_path=`$CYGPATH -u "$path"`
19706  fi
19707  if test "x$new_path" = x; then
19708    # Oops. Which didn't find the executable.
19709    # The splitting of arguments from the executable at a space might have been incorrect,
19710    # since paths with space are more likely in Windows. Give it another try with the whole
19711    # argument.
19712    path="$complete"
19713    arguments="EOL"
19714    new_path=`$CYGPATH -u "$path"`
19715    new_path=`$WHICH "$new_path" 2> /dev/null`
19716    # bat and cmd files are not always considered executable in cygwin causing which
19717    # to not find them
19718    if test "x$new_path" = x \
19719             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19720             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19721      new_path=`$CYGPATH -u "$path"`
19722    fi
19723    if test "x$new_path" = x; then
19724      # It's still not found. Now this is an unrecoverable error.
19725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19726$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19727      has_space=`$ECHO "$complete" | $GREP " "`
19728      if test "x$has_space" != x; then
19729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19731      fi
19732      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19733    fi
19734  fi
19735
19736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19739  # "foo.exe" is OK but "foo" is an error.
19740  #
19741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19742  # It is also a way to make sure we got the proper file name for the real test later on.
19743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19744  if test "x$test_shortpath" = x; then
19745    # Short path failed, file does not exist as specified.
19746    # Try adding .exe or .cmd
19747    if test -f "${new_path}.exe"; then
19748       input_to_shortpath="${new_path}.exe"
19749    elif test -f "${new_path}.cmd"; then
19750       input_to_shortpath="${new_path}.cmd"
19751    else
19752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19753$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19754      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19755$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19756      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19757    fi
19758  else
19759    input_to_shortpath="$new_path"
19760  fi
19761
19762  # Call helper function which possibly converts this using DOS-style short mode.
19763  # If so, the updated path is stored in $new_path.
19764  new_path="$input_to_shortpath"
19765
19766  input_path="$input_to_shortpath"
19767  # Check if we need to convert this using DOS-style short mode. If the path
19768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19769  # take no chances and rewrite it.
19770  # Note: m4 eats our [], so we need to use [ and ] instead.
19771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19772  if test "x$has_forbidden_chars" != x; then
19773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19777      # Going to short mode and back again did indeed matter. Since short mode is
19778      # case insensitive, let's make it lowercase to improve readability.
19779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19780      # Now convert it back to Unix-stile (cygpath)
19781      input_path=`$CYGPATH -u "$shortmode_path"`
19782      new_path="$input_path"
19783    fi
19784  fi
19785
19786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19787  if test "x$test_cygdrive_prefix" = x; then
19788    # As a simple fix, exclude /usr/bin since it's not a real path.
19789    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19791      # a path prefixed by /cygdrive for fixpath to work.
19792      new_path="$CYGWIN_ROOT_PATH$input_path"
19793    fi
19794  fi
19795
19796  # remove trailing .exe if any
19797  new_path="${new_path/%.exe/}"
19798
19799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19800
19801  # First separate the path from the arguments. This will split at the first
19802  # space.
19803  complete="$PROPER_COMPILER_CC"
19804  path="${complete%% *}"
19805  tmp="$complete EOL"
19806  arguments="${tmp#* }"
19807
19808  # Input might be given as Windows format, start by converting to
19809  # unix format.
19810  new_path="$path"
19811
19812  windows_path="$new_path"
19813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19814    unix_path=`$CYGPATH -u "$windows_path"`
19815    new_path="$unix_path"
19816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19818    new_path="$unix_path"
19819  fi
19820
19821
19822  # Now try to locate executable using which
19823  new_path=`$WHICH "$new_path" 2> /dev/null`
19824
19825  if test "x$new_path" = x; then
19826    # Oops. Which didn't find the executable.
19827    # The splitting of arguments from the executable at a space might have been incorrect,
19828    # since paths with space are more likely in Windows. Give it another try with the whole
19829    # argument.
19830    path="$complete"
19831    arguments="EOL"
19832    new_path="$path"
19833
19834  windows_path="$new_path"
19835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19836    unix_path=`$CYGPATH -u "$windows_path"`
19837    new_path="$unix_path"
19838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19840    new_path="$unix_path"
19841  fi
19842
19843
19844    new_path=`$WHICH "$new_path" 2> /dev/null`
19845
19846    if test "x$new_path" = x; then
19847      # It's still not found. Now this is an unrecoverable error.
19848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19849$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19850      has_space=`$ECHO "$complete" | $GREP " "`
19851      if test "x$has_space" != x; then
19852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19854      fi
19855      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19856    fi
19857  fi
19858
19859  # Now new_path has a complete unix path to the binary
19860  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19861    # Keep paths in /bin as-is, but remove trailing .exe if any
19862    new_path="${new_path/%.exe/}"
19863    # Do not save /bin paths to all_fixpath_prefixes!
19864  else
19865    # Not in mixed or Windows style, start by that.
19866    new_path=`cmd //c echo $new_path`
19867
19868  input_path="$new_path"
19869  # Check if we need to convert this using DOS-style short mode. If the path
19870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19871  # take no chances and rewrite it.
19872  # Note: m4 eats our [], so we need to use [ and ] instead.
19873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19874  if test "x$has_forbidden_chars" != x; then
19875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19877  fi
19878
19879    # Output is in $new_path
19880
19881  windows_path="$new_path"
19882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19883    unix_path=`$CYGPATH -u "$windows_path"`
19884    new_path="$unix_path"
19885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19887    new_path="$unix_path"
19888  fi
19889
19890    # remove trailing .exe if any
19891    new_path="${new_path/%.exe/}"
19892
19893    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19894    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19895  fi
19896
19897  else
19898    # We're on a posix platform. Hooray! :)
19899    # First separate the path from the arguments. This will split at the first
19900    # space.
19901    complete="$PROPER_COMPILER_CC"
19902    path="${complete%% *}"
19903    tmp="$complete EOL"
19904    arguments="${tmp#* }"
19905
19906    # Cannot rely on the command "which" here since it doesn't always work.
19907    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19908    if test -z "$is_absolute_path"; then
19909      # Path to executable is not absolute. Find it.
19910      IFS_save="$IFS"
19911      IFS=:
19912      for p in $PATH; do
19913        if test -f "$p/$path" && test -x "$p/$path"; then
19914          new_path="$p/$path"
19915          break
19916        fi
19917      done
19918      IFS="$IFS_save"
19919    else
19920      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19921$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19922      new_path="$path"
19923    fi
19924
19925    if test "x$new_path" = x; then
19926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19927$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19928        has_space=`$ECHO "$complete" | $GREP " "`
19929        if test "x$has_space" != x; then
19930          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19931$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19932        fi
19933        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19934      fi
19935  fi
19936
19937      # Now join together the path and the arguments once again
19938      if test "x$arguments" != xEOL; then
19939        new_complete="$new_path ${arguments% *}"
19940      else
19941        new_complete="$new_path"
19942      fi
19943
19944  if test "x$complete" != "x$new_complete"; then
19945      PROPER_COMPILER_CC="$new_complete"
19946      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19947$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19948    fi
19949
19950    PATH="$RETRY_COMPILER_SAVED_PATH"
19951
19952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19953$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19954
19955    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19956        # Follow a chain of symbolic links. Use readlink
19957        # where it exists, else fall back to horribly
19958        # complicated shell code.
19959        if test "x$READLINK_TESTED" != yes; then
19960            # On MacOSX there is a readlink tool with a different
19961            # purpose than the GNU readlink tool. Check the found readlink.
19962            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19963            if test "x$ISGNU" = x; then
19964                 # A readlink that we do not know how to use.
19965                 # Are there other non-GNU readlinks out there?
19966                 READLINK_TESTED=yes
19967                 READLINK=
19968            fi
19969        fi
19970
19971        if test "x$READLINK" != x; then
19972            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19973        else
19974            # Save the current directory for restoring afterwards
19975            STARTDIR=$PWD
19976            COUNTER=0
19977            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19978            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19979            cd $sym_link_dir
19980            # Use -P flag to resolve symlinks in directories.
19981            cd `$THEPWDCMD -P`
19982            sym_link_dir=`$THEPWDCMD -P`
19983            # Resolve file symlinks
19984            while test $COUNTER -lt 20; do
19985                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19986                if test "x$ISLINK" == x; then
19987                    # This is not a symbolic link! We are done!
19988                    break
19989                fi
19990                # Again resolve directory symlinks since the target of the just found
19991                # link could be in a different directory
19992                cd `$DIRNAME $ISLINK`
19993                sym_link_dir=`$THEPWDCMD -P`
19994                sym_link_file=`$BASENAME $ISLINK`
19995                let COUNTER=COUNTER+1
19996            done
19997            cd $STARTDIR
19998            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19999        fi
20000    fi
20001
20002    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20003$as_echo "$PROPER_COMPILER_CC" >&6; }
20004    CC="$PROPER_COMPILER_CC"
20005  else
20006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20007$as_echo "no, keeping CC" >&6; }
20008    CC="$TEST_COMPILER"
20009  fi
20010
20011  COMPILER=$CC
20012  COMPILER_NAME=$COMPILER_NAME
20013
20014  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20015    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20016    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20017    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20018    if test $? -ne 0; then
20019      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20020
20021      { $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
20022$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20023      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20024$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20025      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20026    else
20027      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20028      COMPILER_VENDOR="Sun Studio"
20029    fi
20030  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20031    # First line typically looks something like:
20032    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20033    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20034    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20035    COMPILER_VENDOR="Microsoft CL.EXE"
20036    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20037    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20038      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20039        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20040      fi
20041    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20042      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20043        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20044      fi
20045    fi
20046  else
20047    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20048    # Check that this is likely to be GCC.
20049    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20050    if test $? -ne 0; then
20051      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20052$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20053      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20054$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20055      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20056    fi
20057
20058    # First line typically looks something like:
20059    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20060    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20061    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20062  fi
20063  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20064  CC_VERSION="$COMPILER_VERSION"
20065  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20066  CC_VENDOR="$COMPILER_VENDOR"
20067
20068  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20069$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20070
20071
20072# Now that we have resolved CC ourself, let autoconf have its go at it
20073ac_ext=c
20074ac_cpp='$CPP $CPPFLAGS'
20075ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20076ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20077ac_compiler_gnu=$ac_cv_c_compiler_gnu
20078if test -n "$ac_tool_prefix"; then
20079  for ac_prog in $CC
20080  do
20081    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20082set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20084$as_echo_n "checking for $ac_word... " >&6; }
20085if ${ac_cv_prog_CC+:} false; then :
20086  $as_echo_n "(cached) " >&6
20087else
20088  if test -n "$CC"; then
20089  ac_cv_prog_CC="$CC" # Let the user override the test.
20090else
20091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20092for as_dir in $PATH
20093do
20094  IFS=$as_save_IFS
20095  test -z "$as_dir" && as_dir=.
20096    for ac_exec_ext in '' $ac_executable_extensions; do
20097  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20098    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20100    break 2
20101  fi
20102done
20103  done
20104IFS=$as_save_IFS
20105
20106fi
20107fi
20108CC=$ac_cv_prog_CC
20109if test -n "$CC"; then
20110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20111$as_echo "$CC" >&6; }
20112else
20113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20114$as_echo "no" >&6; }
20115fi
20116
20117
20118    test -n "$CC" && break
20119  done
20120fi
20121if test -z "$CC"; then
20122  ac_ct_CC=$CC
20123  for ac_prog in $CC
20124do
20125  # Extract the first word of "$ac_prog", so it can be a program name with args.
20126set dummy $ac_prog; ac_word=$2
20127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20128$as_echo_n "checking for $ac_word... " >&6; }
20129if ${ac_cv_prog_ac_ct_CC+:} false; then :
20130  $as_echo_n "(cached) " >&6
20131else
20132  if test -n "$ac_ct_CC"; then
20133  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20134else
20135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20136for as_dir in $PATH
20137do
20138  IFS=$as_save_IFS
20139  test -z "$as_dir" && as_dir=.
20140    for ac_exec_ext in '' $ac_executable_extensions; do
20141  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20142    ac_cv_prog_ac_ct_CC="$ac_prog"
20143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20144    break 2
20145  fi
20146done
20147  done
20148IFS=$as_save_IFS
20149
20150fi
20151fi
20152ac_ct_CC=$ac_cv_prog_ac_ct_CC
20153if test -n "$ac_ct_CC"; then
20154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20155$as_echo "$ac_ct_CC" >&6; }
20156else
20157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20158$as_echo "no" >&6; }
20159fi
20160
20161
20162  test -n "$ac_ct_CC" && break
20163done
20164
20165  if test "x$ac_ct_CC" = x; then
20166    CC=""
20167  else
20168    case $cross_compiling:$ac_tool_warned in
20169yes:)
20170{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20171$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20172ac_tool_warned=yes ;;
20173esac
20174    CC=$ac_ct_CC
20175  fi
20176fi
20177
20178
20179test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20180$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20181as_fn_error $? "no acceptable C compiler found in \$PATH
20182See \`config.log' for more details" "$LINENO" 5; }
20183
20184# Provide some information about the compiler.
20185$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20186set X $ac_compile
20187ac_compiler=$2
20188for ac_option in --version -v -V -qversion; do
20189  { { ac_try="$ac_compiler $ac_option >&5"
20190case "(($ac_try" in
20191  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20192  *) ac_try_echo=$ac_try;;
20193esac
20194eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20195$as_echo "$ac_try_echo"; } >&5
20196  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20197  ac_status=$?
20198  if test -s conftest.err; then
20199    sed '10a\
20200... rest of stderr output deleted ...
20201         10q' conftest.err >conftest.er1
20202    cat conftest.er1 >&5
20203  fi
20204  rm -f conftest.er1 conftest.err
20205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20206  test $ac_status = 0; }
20207done
20208
20209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20210/* end confdefs.h.  */
20211
20212int
20213main ()
20214{
20215
20216  ;
20217  return 0;
20218}
20219_ACEOF
20220ac_clean_files_save=$ac_clean_files
20221ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20222# Try to create an executable without -o first, disregard a.out.
20223# It will help us diagnose broken compilers, and finding out an intuition
20224# of exeext.
20225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20226$as_echo_n "checking whether the C compiler works... " >&6; }
20227ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20228
20229# The possible output files:
20230ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20231
20232ac_rmfiles=
20233for ac_file in $ac_files
20234do
20235  case $ac_file in
20236    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20237    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20238  esac
20239done
20240rm -f $ac_rmfiles
20241
20242if { { ac_try="$ac_link_default"
20243case "(($ac_try" in
20244  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20245  *) ac_try_echo=$ac_try;;
20246esac
20247eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20248$as_echo "$ac_try_echo"; } >&5
20249  (eval "$ac_link_default") 2>&5
20250  ac_status=$?
20251  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20252  test $ac_status = 0; }; then :
20253  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20254# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20255# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20256# so that the user can short-circuit this test for compilers unknown to
20257# Autoconf.
20258for ac_file in $ac_files ''
20259do
20260  test -f "$ac_file" || continue
20261  case $ac_file in
20262    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20263	;;
20264    [ab].out )
20265	# We found the default executable, but exeext='' is most
20266	# certainly right.
20267	break;;
20268    *.* )
20269	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20270	then :; else
20271	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20272	fi
20273	# We set ac_cv_exeext here because the later test for it is not
20274	# safe: cross compilers may not add the suffix if given an `-o'
20275	# argument, so we may need to know it at that point already.
20276	# Even if this section looks crufty: it has the advantage of
20277	# actually working.
20278	break;;
20279    * )
20280	break;;
20281  esac
20282done
20283test "$ac_cv_exeext" = no && ac_cv_exeext=
20284
20285else
20286  ac_file=''
20287fi
20288if test -z "$ac_file"; then :
20289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20290$as_echo "no" >&6; }
20291$as_echo "$as_me: failed program was:" >&5
20292sed 's/^/| /' conftest.$ac_ext >&5
20293
20294{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20296as_fn_error 77 "C compiler cannot create executables
20297See \`config.log' for more details" "$LINENO" 5; }
20298else
20299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20300$as_echo "yes" >&6; }
20301fi
20302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20303$as_echo_n "checking for C compiler default output file name... " >&6; }
20304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20305$as_echo "$ac_file" >&6; }
20306ac_exeext=$ac_cv_exeext
20307
20308rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20309ac_clean_files=$ac_clean_files_save
20310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20311$as_echo_n "checking for suffix of executables... " >&6; }
20312if { { ac_try="$ac_link"
20313case "(($ac_try" in
20314  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20315  *) ac_try_echo=$ac_try;;
20316esac
20317eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20318$as_echo "$ac_try_echo"; } >&5
20319  (eval "$ac_link") 2>&5
20320  ac_status=$?
20321  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20322  test $ac_status = 0; }; then :
20323  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20324# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20325# work properly (i.e., refer to `conftest.exe'), while it won't with
20326# `rm'.
20327for ac_file in conftest.exe conftest conftest.*; do
20328  test -f "$ac_file" || continue
20329  case $ac_file in
20330    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20331    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20332	  break;;
20333    * ) break;;
20334  esac
20335done
20336else
20337  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20339as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20340See \`config.log' for more details" "$LINENO" 5; }
20341fi
20342rm -f conftest conftest$ac_cv_exeext
20343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20344$as_echo "$ac_cv_exeext" >&6; }
20345
20346rm -f conftest.$ac_ext
20347EXEEXT=$ac_cv_exeext
20348ac_exeext=$EXEEXT
20349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20350/* end confdefs.h.  */
20351#include <stdio.h>
20352int
20353main ()
20354{
20355FILE *f = fopen ("conftest.out", "w");
20356 return ferror (f) || fclose (f) != 0;
20357
20358  ;
20359  return 0;
20360}
20361_ACEOF
20362ac_clean_files="$ac_clean_files conftest.out"
20363# Check that the compiler produces executables we can run.  If not, either
20364# the compiler is broken, or we cross compile.
20365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20366$as_echo_n "checking whether we are cross compiling... " >&6; }
20367if test "$cross_compiling" != yes; then
20368  { { ac_try="$ac_link"
20369case "(($ac_try" in
20370  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20371  *) ac_try_echo=$ac_try;;
20372esac
20373eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20374$as_echo "$ac_try_echo"; } >&5
20375  (eval "$ac_link") 2>&5
20376  ac_status=$?
20377  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20378  test $ac_status = 0; }
20379  if { ac_try='./conftest$ac_cv_exeext'
20380  { { case "(($ac_try" in
20381  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20382  *) ac_try_echo=$ac_try;;
20383esac
20384eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20385$as_echo "$ac_try_echo"; } >&5
20386  (eval "$ac_try") 2>&5
20387  ac_status=$?
20388  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20389  test $ac_status = 0; }; }; then
20390    cross_compiling=no
20391  else
20392    if test "$cross_compiling" = maybe; then
20393	cross_compiling=yes
20394    else
20395	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20396$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20397as_fn_error $? "cannot run C compiled programs.
20398If you meant to cross compile, use \`--host'.
20399See \`config.log' for more details" "$LINENO" 5; }
20400    fi
20401  fi
20402fi
20403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20404$as_echo "$cross_compiling" >&6; }
20405
20406rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20407ac_clean_files=$ac_clean_files_save
20408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20409$as_echo_n "checking for suffix of object files... " >&6; }
20410if ${ac_cv_objext+:} false; then :
20411  $as_echo_n "(cached) " >&6
20412else
20413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20414/* end confdefs.h.  */
20415
20416int
20417main ()
20418{
20419
20420  ;
20421  return 0;
20422}
20423_ACEOF
20424rm -f conftest.o conftest.obj
20425if { { ac_try="$ac_compile"
20426case "(($ac_try" in
20427  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20428  *) ac_try_echo=$ac_try;;
20429esac
20430eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20431$as_echo "$ac_try_echo"; } >&5
20432  (eval "$ac_compile") 2>&5
20433  ac_status=$?
20434  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20435  test $ac_status = 0; }; then :
20436  for ac_file in conftest.o conftest.obj conftest.*; do
20437  test -f "$ac_file" || continue;
20438  case $ac_file in
20439    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20440    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20441       break;;
20442  esac
20443done
20444else
20445  $as_echo "$as_me: failed program was:" >&5
20446sed 's/^/| /' conftest.$ac_ext >&5
20447
20448{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20449$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20450as_fn_error $? "cannot compute suffix of object files: cannot compile
20451See \`config.log' for more details" "$LINENO" 5; }
20452fi
20453rm -f conftest.$ac_cv_objext conftest.$ac_ext
20454fi
20455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20456$as_echo "$ac_cv_objext" >&6; }
20457OBJEXT=$ac_cv_objext
20458ac_objext=$OBJEXT
20459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20460$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20461if ${ac_cv_c_compiler_gnu+:} false; then :
20462  $as_echo_n "(cached) " >&6
20463else
20464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20465/* end confdefs.h.  */
20466
20467int
20468main ()
20469{
20470#ifndef __GNUC__
20471       choke me
20472#endif
20473
20474  ;
20475  return 0;
20476}
20477_ACEOF
20478if ac_fn_c_try_compile "$LINENO"; then :
20479  ac_compiler_gnu=yes
20480else
20481  ac_compiler_gnu=no
20482fi
20483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20484ac_cv_c_compiler_gnu=$ac_compiler_gnu
20485
20486fi
20487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20488$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20489if test $ac_compiler_gnu = yes; then
20490  GCC=yes
20491else
20492  GCC=
20493fi
20494ac_test_CFLAGS=${CFLAGS+set}
20495ac_save_CFLAGS=$CFLAGS
20496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20497$as_echo_n "checking whether $CC accepts -g... " >&6; }
20498if ${ac_cv_prog_cc_g+:} false; then :
20499  $as_echo_n "(cached) " >&6
20500else
20501  ac_save_c_werror_flag=$ac_c_werror_flag
20502   ac_c_werror_flag=yes
20503   ac_cv_prog_cc_g=no
20504   CFLAGS="-g"
20505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20506/* end confdefs.h.  */
20507
20508int
20509main ()
20510{
20511
20512  ;
20513  return 0;
20514}
20515_ACEOF
20516if ac_fn_c_try_compile "$LINENO"; then :
20517  ac_cv_prog_cc_g=yes
20518else
20519  CFLAGS=""
20520      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20521/* end confdefs.h.  */
20522
20523int
20524main ()
20525{
20526
20527  ;
20528  return 0;
20529}
20530_ACEOF
20531if ac_fn_c_try_compile "$LINENO"; then :
20532
20533else
20534  ac_c_werror_flag=$ac_save_c_werror_flag
20535	 CFLAGS="-g"
20536	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20537/* end confdefs.h.  */
20538
20539int
20540main ()
20541{
20542
20543  ;
20544  return 0;
20545}
20546_ACEOF
20547if ac_fn_c_try_compile "$LINENO"; then :
20548  ac_cv_prog_cc_g=yes
20549fi
20550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20551fi
20552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20553fi
20554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20555   ac_c_werror_flag=$ac_save_c_werror_flag
20556fi
20557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20558$as_echo "$ac_cv_prog_cc_g" >&6; }
20559if test "$ac_test_CFLAGS" = set; then
20560  CFLAGS=$ac_save_CFLAGS
20561elif test $ac_cv_prog_cc_g = yes; then
20562  if test "$GCC" = yes; then
20563    CFLAGS="-g -O2"
20564  else
20565    CFLAGS="-g"
20566  fi
20567else
20568  if test "$GCC" = yes; then
20569    CFLAGS="-O2"
20570  else
20571    CFLAGS=
20572  fi
20573fi
20574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20575$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20576if ${ac_cv_prog_cc_c89+:} false; then :
20577  $as_echo_n "(cached) " >&6
20578else
20579  ac_cv_prog_cc_c89=no
20580ac_save_CC=$CC
20581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20582/* end confdefs.h.  */
20583#include <stdarg.h>
20584#include <stdio.h>
20585#include <sys/types.h>
20586#include <sys/stat.h>
20587/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20588struct buf { int x; };
20589FILE * (*rcsopen) (struct buf *, struct stat *, int);
20590static char *e (p, i)
20591     char **p;
20592     int i;
20593{
20594  return p[i];
20595}
20596static char *f (char * (*g) (char **, int), char **p, ...)
20597{
20598  char *s;
20599  va_list v;
20600  va_start (v,p);
20601  s = g (p, va_arg (v,int));
20602  va_end (v);
20603  return s;
20604}
20605
20606/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20607   function prototypes and stuff, but not '\xHH' hex character constants.
20608   These don't provoke an error unfortunately, instead are silently treated
20609   as 'x'.  The following induces an error, until -std is added to get
20610   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20611   array size at least.  It's necessary to write '\x00'==0 to get something
20612   that's true only with -std.  */
20613int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20614
20615/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20616   inside strings and character constants.  */
20617#define FOO(x) 'x'
20618int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20619
20620int test (int i, double x);
20621struct s1 {int (*f) (int a);};
20622struct s2 {int (*f) (double a);};
20623int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20624int argc;
20625char **argv;
20626int
20627main ()
20628{
20629return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20630  ;
20631  return 0;
20632}
20633_ACEOF
20634for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20635	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20636do
20637  CC="$ac_save_CC $ac_arg"
20638  if ac_fn_c_try_compile "$LINENO"; then :
20639  ac_cv_prog_cc_c89=$ac_arg
20640fi
20641rm -f core conftest.err conftest.$ac_objext
20642  test "x$ac_cv_prog_cc_c89" != "xno" && break
20643done
20644rm -f conftest.$ac_ext
20645CC=$ac_save_CC
20646
20647fi
20648# AC_CACHE_VAL
20649case "x$ac_cv_prog_cc_c89" in
20650  x)
20651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20652$as_echo "none needed" >&6; } ;;
20653  xno)
20654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20655$as_echo "unsupported" >&6; } ;;
20656  *)
20657    CC="$CC $ac_cv_prog_cc_c89"
20658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20659$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20660esac
20661if test "x$ac_cv_prog_cc_c89" != xno; then :
20662
20663fi
20664
20665ac_ext=cpp
20666ac_cpp='$CXXCPP $CPPFLAGS'
20667ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20668ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20669ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20670
20671
20672### Locate C++ compiler (CXX)
20673
20674if test "x$CXX" != x; then
20675  COMPILER_CHECK_LIST="$CXX"
20676elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20677  COMPILER_CHECK_LIST="cl"
20678elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20679  COMPILER_CHECK_LIST="CC g++"
20680else
20681  COMPILER_CHECK_LIST="g++ CC"
20682fi
20683
20684
20685  COMPILER_NAME=C++
20686
20687  CXX=
20688  # If TOOLS_DIR is set, check for all compiler names in there first
20689  # before checking the rest of the PATH.
20690  if test -n "$TOOLS_DIR"; then
20691    PATH_save="$PATH"
20692    PATH="$TOOLS_DIR"
20693    for ac_prog in $COMPILER_CHECK_LIST
20694do
20695  # Extract the first word of "$ac_prog", so it can be a program name with args.
20696set dummy $ac_prog; ac_word=$2
20697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20698$as_echo_n "checking for $ac_word... " >&6; }
20699if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20700  $as_echo_n "(cached) " >&6
20701else
20702  case $TOOLS_DIR_CXX in
20703  [\\/]* | ?:[\\/]*)
20704  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20705  ;;
20706  *)
20707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20708for as_dir in $PATH
20709do
20710  IFS=$as_save_IFS
20711  test -z "$as_dir" && as_dir=.
20712    for ac_exec_ext in '' $ac_executable_extensions; do
20713  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20714    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20716    break 2
20717  fi
20718done
20719  done
20720IFS=$as_save_IFS
20721
20722  ;;
20723esac
20724fi
20725TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20726if test -n "$TOOLS_DIR_CXX"; then
20727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20728$as_echo "$TOOLS_DIR_CXX" >&6; }
20729else
20730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20731$as_echo "no" >&6; }
20732fi
20733
20734
20735  test -n "$TOOLS_DIR_CXX" && break
20736done
20737
20738    CXX=$TOOLS_DIR_CXX
20739    PATH="$PATH_save"
20740  fi
20741
20742  # AC_PATH_PROGS can't be run multiple times with the same variable,
20743  # so create a new name for this run.
20744  if test "x$CXX" = x; then
20745    for ac_prog in $COMPILER_CHECK_LIST
20746do
20747  # Extract the first word of "$ac_prog", so it can be a program name with args.
20748set dummy $ac_prog; ac_word=$2
20749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20750$as_echo_n "checking for $ac_word... " >&6; }
20751if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20752  $as_echo_n "(cached) " >&6
20753else
20754  case $POTENTIAL_CXX in
20755  [\\/]* | ?:[\\/]*)
20756  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20757  ;;
20758  *)
20759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20760for as_dir in $PATH
20761do
20762  IFS=$as_save_IFS
20763  test -z "$as_dir" && as_dir=.
20764    for ac_exec_ext in '' $ac_executable_extensions; do
20765  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20766    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20768    break 2
20769  fi
20770done
20771  done
20772IFS=$as_save_IFS
20773
20774  ;;
20775esac
20776fi
20777POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20778if test -n "$POTENTIAL_CXX"; then
20779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20780$as_echo "$POTENTIAL_CXX" >&6; }
20781else
20782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20783$as_echo "no" >&6; }
20784fi
20785
20786
20787  test -n "$POTENTIAL_CXX" && break
20788done
20789
20790    CXX=$POTENTIAL_CXX
20791  fi
20792
20793  if test "x$CXX" = x; then
20794
20795    # Print a helpful message on how to acquire the necessary build dependency.
20796    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20797    MISSING_DEPENDENCY=devkit
20798    PKGHANDLER_COMMAND=
20799
20800    case $PKGHANDLER in
20801	apt-get)
20802                apt_help     $MISSING_DEPENDENCY ;;
20803    yum)
20804                yum_help     $MISSING_DEPENDENCY ;;
20805	port)
20806                port_help    $MISSING_DEPENDENCY ;;
20807	pkgutil)
20808                pkgutil_help $MISSING_DEPENDENCY ;;
20809	pkgadd)
20810                pkgadd_help  $MISSING_DEPENDENCY ;;
20811    * )
20812      break ;;
20813    esac
20814
20815    if test "x$PKGHANDLER_COMMAND" != x; then
20816        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20817    fi
20818
20819      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20820  fi
20821
20822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20823
20824  # First separate the path from the arguments. This will split at the first
20825  # space.
20826  complete="$CXX"
20827  path="${complete%% *}"
20828  tmp="$complete EOL"
20829  arguments="${tmp#* }"
20830
20831  # Input might be given as Windows format, start by converting to
20832  # unix format.
20833  new_path=`$CYGPATH -u "$path"`
20834
20835  # Now try to locate executable using which
20836  new_path=`$WHICH "$new_path" 2> /dev/null`
20837  # bat and cmd files are not always considered executable in cygwin causing which
20838  # to not find them
20839  if test "x$new_path" = x \
20840           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20841           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20842    new_path=`$CYGPATH -u "$path"`
20843  fi
20844  if test "x$new_path" = x; then
20845    # Oops. Which didn't find the executable.
20846    # The splitting of arguments from the executable at a space might have been incorrect,
20847    # since paths with space are more likely in Windows. Give it another try with the whole
20848    # argument.
20849    path="$complete"
20850    arguments="EOL"
20851    new_path=`$CYGPATH -u "$path"`
20852    new_path=`$WHICH "$new_path" 2> /dev/null`
20853    # bat and cmd files are not always considered executable in cygwin causing which
20854    # to not find them
20855    if test "x$new_path" = x \
20856             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20857             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20858      new_path=`$CYGPATH -u "$path"`
20859    fi
20860    if test "x$new_path" = x; then
20861      # It's still not found. Now this is an unrecoverable error.
20862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20863$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20864      has_space=`$ECHO "$complete" | $GREP " "`
20865      if test "x$has_space" != x; then
20866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20868      fi
20869      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20870    fi
20871  fi
20872
20873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20876  # "foo.exe" is OK but "foo" is an error.
20877  #
20878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20879  # It is also a way to make sure we got the proper file name for the real test later on.
20880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20881  if test "x$test_shortpath" = x; then
20882    # Short path failed, file does not exist as specified.
20883    # Try adding .exe or .cmd
20884    if test -f "${new_path}.exe"; then
20885       input_to_shortpath="${new_path}.exe"
20886    elif test -f "${new_path}.cmd"; then
20887       input_to_shortpath="${new_path}.cmd"
20888    else
20889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20890$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20891      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20892$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20893      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20894    fi
20895  else
20896    input_to_shortpath="$new_path"
20897  fi
20898
20899  # Call helper function which possibly converts this using DOS-style short mode.
20900  # If so, the updated path is stored in $new_path.
20901  new_path="$input_to_shortpath"
20902
20903  input_path="$input_to_shortpath"
20904  # Check if we need to convert this using DOS-style short mode. If the path
20905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20906  # take no chances and rewrite it.
20907  # Note: m4 eats our [], so we need to use [ and ] instead.
20908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20909  if test "x$has_forbidden_chars" != x; then
20910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20914      # Going to short mode and back again did indeed matter. Since short mode is
20915      # case insensitive, let's make it lowercase to improve readability.
20916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20917      # Now convert it back to Unix-stile (cygpath)
20918      input_path=`$CYGPATH -u "$shortmode_path"`
20919      new_path="$input_path"
20920    fi
20921  fi
20922
20923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20924  if test "x$test_cygdrive_prefix" = x; then
20925    # As a simple fix, exclude /usr/bin since it's not a real path.
20926    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20928      # a path prefixed by /cygdrive for fixpath to work.
20929      new_path="$CYGWIN_ROOT_PATH$input_path"
20930    fi
20931  fi
20932
20933  # remove trailing .exe if any
20934  new_path="${new_path/%.exe/}"
20935
20936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20937
20938  # First separate the path from the arguments. This will split at the first
20939  # space.
20940  complete="$CXX"
20941  path="${complete%% *}"
20942  tmp="$complete EOL"
20943  arguments="${tmp#* }"
20944
20945  # Input might be given as Windows format, start by converting to
20946  # unix format.
20947  new_path="$path"
20948
20949  windows_path="$new_path"
20950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20951    unix_path=`$CYGPATH -u "$windows_path"`
20952    new_path="$unix_path"
20953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20955    new_path="$unix_path"
20956  fi
20957
20958
20959  # Now try to locate executable using which
20960  new_path=`$WHICH "$new_path" 2> /dev/null`
20961
20962  if test "x$new_path" = x; then
20963    # Oops. Which didn't find the executable.
20964    # The splitting of arguments from the executable at a space might have been incorrect,
20965    # since paths with space are more likely in Windows. Give it another try with the whole
20966    # argument.
20967    path="$complete"
20968    arguments="EOL"
20969    new_path="$path"
20970
20971  windows_path="$new_path"
20972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20973    unix_path=`$CYGPATH -u "$windows_path"`
20974    new_path="$unix_path"
20975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20977    new_path="$unix_path"
20978  fi
20979
20980
20981    new_path=`$WHICH "$new_path" 2> /dev/null`
20982
20983    if test "x$new_path" = x; then
20984      # It's still not found. Now this is an unrecoverable error.
20985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20986$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20987      has_space=`$ECHO "$complete" | $GREP " "`
20988      if test "x$has_space" != x; then
20989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20991      fi
20992      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20993    fi
20994  fi
20995
20996  # Now new_path has a complete unix path to the binary
20997  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20998    # Keep paths in /bin as-is, but remove trailing .exe if any
20999    new_path="${new_path/%.exe/}"
21000    # Do not save /bin paths to all_fixpath_prefixes!
21001  else
21002    # Not in mixed or Windows style, start by that.
21003    new_path=`cmd //c echo $new_path`
21004
21005  input_path="$new_path"
21006  # Check if we need to convert this using DOS-style short mode. If the path
21007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21008  # take no chances and rewrite it.
21009  # Note: m4 eats our [], so we need to use [ and ] instead.
21010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21011  if test "x$has_forbidden_chars" != x; then
21012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21014  fi
21015
21016    # Output is in $new_path
21017
21018  windows_path="$new_path"
21019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21020    unix_path=`$CYGPATH -u "$windows_path"`
21021    new_path="$unix_path"
21022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21024    new_path="$unix_path"
21025  fi
21026
21027    # remove trailing .exe if any
21028    new_path="${new_path/%.exe/}"
21029
21030    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21031    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21032  fi
21033
21034  else
21035    # We're on a posix platform. Hooray! :)
21036    # First separate the path from the arguments. This will split at the first
21037    # space.
21038    complete="$CXX"
21039    path="${complete%% *}"
21040    tmp="$complete EOL"
21041    arguments="${tmp#* }"
21042
21043    # Cannot rely on the command "which" here since it doesn't always work.
21044    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21045    if test -z "$is_absolute_path"; then
21046      # Path to executable is not absolute. Find it.
21047      IFS_save="$IFS"
21048      IFS=:
21049      for p in $PATH; do
21050        if test -f "$p/$path" && test -x "$p/$path"; then
21051          new_path="$p/$path"
21052          break
21053        fi
21054      done
21055      IFS="$IFS_save"
21056    else
21057      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21058$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21059      new_path="$path"
21060    fi
21061
21062    if test "x$new_path" = x; then
21063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21064$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21065        has_space=`$ECHO "$complete" | $GREP " "`
21066        if test "x$has_space" != x; then
21067          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21068$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21069        fi
21070        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21071      fi
21072  fi
21073
21074      # Now join together the path and the arguments once again
21075      if test "x$arguments" != xEOL; then
21076        new_complete="$new_path ${arguments% *}"
21077      else
21078        new_complete="$new_path"
21079      fi
21080
21081  if test "x$complete" != "x$new_complete"; then
21082      CXX="$new_complete"
21083      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21084$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21085    fi
21086
21087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21088$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21089  TEST_COMPILER="$CXX"
21090
21091    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21092        # Follow a chain of symbolic links. Use readlink
21093        # where it exists, else fall back to horribly
21094        # complicated shell code.
21095        if test "x$READLINK_TESTED" != yes; then
21096            # On MacOSX there is a readlink tool with a different
21097            # purpose than the GNU readlink tool. Check the found readlink.
21098            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21099            if test "x$ISGNU" = x; then
21100                 # A readlink that we do not know how to use.
21101                 # Are there other non-GNU readlinks out there?
21102                 READLINK_TESTED=yes
21103                 READLINK=
21104            fi
21105        fi
21106
21107        if test "x$READLINK" != x; then
21108            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21109        else
21110            # Save the current directory for restoring afterwards
21111            STARTDIR=$PWD
21112            COUNTER=0
21113            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21114            sym_link_file=`$BASENAME $TEST_COMPILER`
21115            cd $sym_link_dir
21116            # Use -P flag to resolve symlinks in directories.
21117            cd `$THEPWDCMD -P`
21118            sym_link_dir=`$THEPWDCMD -P`
21119            # Resolve file symlinks
21120            while test $COUNTER -lt 20; do
21121                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21122                if test "x$ISLINK" == x; then
21123                    # This is not a symbolic link! We are done!
21124                    break
21125                fi
21126                # Again resolve directory symlinks since the target of the just found
21127                # link could be in a different directory
21128                cd `$DIRNAME $ISLINK`
21129                sym_link_dir=`$THEPWDCMD -P`
21130                sym_link_file=`$BASENAME $ISLINK`
21131                let COUNTER=COUNTER+1
21132            done
21133            cd $STARTDIR
21134            TEST_COMPILER=$sym_link_dir/$sym_link_file
21135        fi
21136    fi
21137
21138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21139$as_echo "$TEST_COMPILER" >&6; }
21140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21141$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21142
21143  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21144  if test "x$COMPILER_BASENAME" = "xccache"; then
21145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21146$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21147    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21148    # We want to control ccache invocation ourselves, so ignore this cc and try
21149    # searching again.
21150
21151    # Remove the path to the fake ccache cc from the PATH
21152    RETRY_COMPILER_SAVED_PATH="$PATH"
21153    COMPILER_DIRNAME=`$DIRNAME $CXX`
21154    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21155
21156    # Try again looking for our compiler
21157    if test -n "$ac_tool_prefix"; then
21158  for ac_prog in $COMPILER_CHECK_LIST
21159  do
21160    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21161set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21163$as_echo_n "checking for $ac_word... " >&6; }
21164if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21165  $as_echo_n "(cached) " >&6
21166else
21167  if test -n "$PROPER_COMPILER_CXX"; then
21168  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21169else
21170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21171for as_dir in $PATH
21172do
21173  IFS=$as_save_IFS
21174  test -z "$as_dir" && as_dir=.
21175    for ac_exec_ext in '' $ac_executable_extensions; do
21176  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21177    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21179    break 2
21180  fi
21181done
21182  done
21183IFS=$as_save_IFS
21184
21185fi
21186fi
21187PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21188if test -n "$PROPER_COMPILER_CXX"; then
21189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21190$as_echo "$PROPER_COMPILER_CXX" >&6; }
21191else
21192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21193$as_echo "no" >&6; }
21194fi
21195
21196
21197    test -n "$PROPER_COMPILER_CXX" && break
21198  done
21199fi
21200if test -z "$PROPER_COMPILER_CXX"; then
21201  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21202  for ac_prog in $COMPILER_CHECK_LIST
21203do
21204  # Extract the first word of "$ac_prog", so it can be a program name with args.
21205set dummy $ac_prog; ac_word=$2
21206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21207$as_echo_n "checking for $ac_word... " >&6; }
21208if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21209  $as_echo_n "(cached) " >&6
21210else
21211  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21212  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21213else
21214as_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_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
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
21229fi
21230fi
21231ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21232if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21234$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21235else
21236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21237$as_echo "no" >&6; }
21238fi
21239
21240
21241  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21242done
21243
21244  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21245    PROPER_COMPILER_CXX=""
21246  else
21247    case $cross_compiling:$ac_tool_warned in
21248yes:)
21249{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21250$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21251ac_tool_warned=yes ;;
21252esac
21253    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21254  fi
21255fi
21256
21257
21258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21259
21260  # First separate the path from the arguments. This will split at the first
21261  # space.
21262  complete="$PROPER_COMPILER_CXX"
21263  path="${complete%% *}"
21264  tmp="$complete EOL"
21265  arguments="${tmp#* }"
21266
21267  # Input might be given as Windows format, start by converting to
21268  # unix format.
21269  new_path=`$CYGPATH -u "$path"`
21270
21271  # Now try to locate executable using which
21272  new_path=`$WHICH "$new_path" 2> /dev/null`
21273  # bat and cmd files are not always considered executable in cygwin causing which
21274  # to not find them
21275  if test "x$new_path" = x \
21276           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21277           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21278    new_path=`$CYGPATH -u "$path"`
21279  fi
21280  if test "x$new_path" = x; then
21281    # Oops. Which didn't find the executable.
21282    # The splitting of arguments from the executable at a space might have been incorrect,
21283    # since paths with space are more likely in Windows. Give it another try with the whole
21284    # argument.
21285    path="$complete"
21286    arguments="EOL"
21287    new_path=`$CYGPATH -u "$path"`
21288    new_path=`$WHICH "$new_path" 2> /dev/null`
21289    # bat and cmd files are not always considered executable in cygwin causing which
21290    # to not find them
21291    if test "x$new_path" = x \
21292             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21293             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21294      new_path=`$CYGPATH -u "$path"`
21295    fi
21296    if test "x$new_path" = x; then
21297      # It's still not found. Now this is an unrecoverable error.
21298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21299$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21300      has_space=`$ECHO "$complete" | $GREP " "`
21301      if test "x$has_space" != x; then
21302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21304      fi
21305      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21306    fi
21307  fi
21308
21309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21312  # "foo.exe" is OK but "foo" is an error.
21313  #
21314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21315  # It is also a way to make sure we got the proper file name for the real test later on.
21316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21317  if test "x$test_shortpath" = x; then
21318    # Short path failed, file does not exist as specified.
21319    # Try adding .exe or .cmd
21320    if test -f "${new_path}.exe"; then
21321       input_to_shortpath="${new_path}.exe"
21322    elif test -f "${new_path}.cmd"; then
21323       input_to_shortpath="${new_path}.cmd"
21324    else
21325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21326$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21327      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21328$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21329      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21330    fi
21331  else
21332    input_to_shortpath="$new_path"
21333  fi
21334
21335  # Call helper function which possibly converts this using DOS-style short mode.
21336  # If so, the updated path is stored in $new_path.
21337  new_path="$input_to_shortpath"
21338
21339  input_path="$input_to_shortpath"
21340  # Check if we need to convert this using DOS-style short mode. If the path
21341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21342  # take no chances and rewrite it.
21343  # Note: m4 eats our [], so we need to use [ and ] instead.
21344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21345  if test "x$has_forbidden_chars" != x; then
21346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21350      # Going to short mode and back again did indeed matter. Since short mode is
21351      # case insensitive, let's make it lowercase to improve readability.
21352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21353      # Now convert it back to Unix-stile (cygpath)
21354      input_path=`$CYGPATH -u "$shortmode_path"`
21355      new_path="$input_path"
21356    fi
21357  fi
21358
21359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21360  if test "x$test_cygdrive_prefix" = x; then
21361    # As a simple fix, exclude /usr/bin since it's not a real path.
21362    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21364      # a path prefixed by /cygdrive for fixpath to work.
21365      new_path="$CYGWIN_ROOT_PATH$input_path"
21366    fi
21367  fi
21368
21369  # remove trailing .exe if any
21370  new_path="${new_path/%.exe/}"
21371
21372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21373
21374  # First separate the path from the arguments. This will split at the first
21375  # space.
21376  complete="$PROPER_COMPILER_CXX"
21377  path="${complete%% *}"
21378  tmp="$complete EOL"
21379  arguments="${tmp#* }"
21380
21381  # Input might be given as Windows format, start by converting to
21382  # unix format.
21383  new_path="$path"
21384
21385  windows_path="$new_path"
21386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21387    unix_path=`$CYGPATH -u "$windows_path"`
21388    new_path="$unix_path"
21389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21391    new_path="$unix_path"
21392  fi
21393
21394
21395  # Now try to locate executable using which
21396  new_path=`$WHICH "$new_path" 2> /dev/null`
21397
21398  if test "x$new_path" = x; then
21399    # Oops. Which didn't find the executable.
21400    # The splitting of arguments from the executable at a space might have been incorrect,
21401    # since paths with space are more likely in Windows. Give it another try with the whole
21402    # argument.
21403    path="$complete"
21404    arguments="EOL"
21405    new_path="$path"
21406
21407  windows_path="$new_path"
21408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21409    unix_path=`$CYGPATH -u "$windows_path"`
21410    new_path="$unix_path"
21411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21413    new_path="$unix_path"
21414  fi
21415
21416
21417    new_path=`$WHICH "$new_path" 2> /dev/null`
21418
21419    if test "x$new_path" = x; then
21420      # It's still not found. Now this is an unrecoverable error.
21421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21422$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21423      has_space=`$ECHO "$complete" | $GREP " "`
21424      if test "x$has_space" != x; then
21425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21427      fi
21428      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21429    fi
21430  fi
21431
21432  # Now new_path has a complete unix path to the binary
21433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21434    # Keep paths in /bin as-is, but remove trailing .exe if any
21435    new_path="${new_path/%.exe/}"
21436    # Do not save /bin paths to all_fixpath_prefixes!
21437  else
21438    # Not in mixed or Windows style, start by that.
21439    new_path=`cmd //c echo $new_path`
21440
21441  input_path="$new_path"
21442  # Check if we need to convert this using DOS-style short mode. If the path
21443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21444  # take no chances and rewrite it.
21445  # Note: m4 eats our [], so we need to use [ and ] instead.
21446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21447  if test "x$has_forbidden_chars" != x; then
21448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21450  fi
21451
21452    # Output is in $new_path
21453
21454  windows_path="$new_path"
21455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21456    unix_path=`$CYGPATH -u "$windows_path"`
21457    new_path="$unix_path"
21458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21460    new_path="$unix_path"
21461  fi
21462
21463    # remove trailing .exe if any
21464    new_path="${new_path/%.exe/}"
21465
21466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21468  fi
21469
21470  else
21471    # We're on a posix platform. Hooray! :)
21472    # First separate the path from the arguments. This will split at the first
21473    # space.
21474    complete="$PROPER_COMPILER_CXX"
21475    path="${complete%% *}"
21476    tmp="$complete EOL"
21477    arguments="${tmp#* }"
21478
21479    # Cannot rely on the command "which" here since it doesn't always work.
21480    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21481    if test -z "$is_absolute_path"; then
21482      # Path to executable is not absolute. Find it.
21483      IFS_save="$IFS"
21484      IFS=:
21485      for p in $PATH; do
21486        if test -f "$p/$path" && test -x "$p/$path"; then
21487          new_path="$p/$path"
21488          break
21489        fi
21490      done
21491      IFS="$IFS_save"
21492    else
21493      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21494$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21495      new_path="$path"
21496    fi
21497
21498    if test "x$new_path" = x; then
21499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21500$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21501        has_space=`$ECHO "$complete" | $GREP " "`
21502        if test "x$has_space" != x; then
21503          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21505        fi
21506        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21507      fi
21508  fi
21509
21510      # Now join together the path and the arguments once again
21511      if test "x$arguments" != xEOL; then
21512        new_complete="$new_path ${arguments% *}"
21513      else
21514        new_complete="$new_path"
21515      fi
21516
21517  if test "x$complete" != "x$new_complete"; then
21518      PROPER_COMPILER_CXX="$new_complete"
21519      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21520$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21521    fi
21522
21523    PATH="$RETRY_COMPILER_SAVED_PATH"
21524
21525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21526$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21527
21528    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21529        # Follow a chain of symbolic links. Use readlink
21530        # where it exists, else fall back to horribly
21531        # complicated shell code.
21532        if test "x$READLINK_TESTED" != yes; then
21533            # On MacOSX there is a readlink tool with a different
21534            # purpose than the GNU readlink tool. Check the found readlink.
21535            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21536            if test "x$ISGNU" = x; then
21537                 # A readlink that we do not know how to use.
21538                 # Are there other non-GNU readlinks out there?
21539                 READLINK_TESTED=yes
21540                 READLINK=
21541            fi
21542        fi
21543
21544        if test "x$READLINK" != x; then
21545            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21546        else
21547            # Save the current directory for restoring afterwards
21548            STARTDIR=$PWD
21549            COUNTER=0
21550            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21551            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21552            cd $sym_link_dir
21553            # Use -P flag to resolve symlinks in directories.
21554            cd `$THEPWDCMD -P`
21555            sym_link_dir=`$THEPWDCMD -P`
21556            # Resolve file symlinks
21557            while test $COUNTER -lt 20; do
21558                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21559                if test "x$ISLINK" == x; then
21560                    # This is not a symbolic link! We are done!
21561                    break
21562                fi
21563                # Again resolve directory symlinks since the target of the just found
21564                # link could be in a different directory
21565                cd `$DIRNAME $ISLINK`
21566                sym_link_dir=`$THEPWDCMD -P`
21567                sym_link_file=`$BASENAME $ISLINK`
21568                let COUNTER=COUNTER+1
21569            done
21570            cd $STARTDIR
21571            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21572        fi
21573    fi
21574
21575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21576$as_echo "$PROPER_COMPILER_CXX" >&6; }
21577    CXX="$PROPER_COMPILER_CXX"
21578  else
21579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21580$as_echo "no, keeping CXX" >&6; }
21581    CXX="$TEST_COMPILER"
21582  fi
21583
21584  COMPILER=$CXX
21585  COMPILER_NAME=$COMPILER_NAME
21586
21587  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21588    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21589    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21590    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21591    if test $? -ne 0; then
21592      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21593
21594      { $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
21595$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21596      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21597$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21598      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21599    else
21600      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21601      COMPILER_VENDOR="Sun Studio"
21602    fi
21603  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21604    # First line typically looks something like:
21605    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21606    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21607    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21608    COMPILER_VENDOR="Microsoft CL.EXE"
21609    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21610    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21611      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21612        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21613      fi
21614    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21615      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21616        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21617      fi
21618    fi
21619  else
21620    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21621    # Check that this is likely to be GCC.
21622    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21623    if test $? -ne 0; then
21624      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21625$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21626      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21627$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21628      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21629    fi
21630
21631    # First line typically looks something like:
21632    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21633    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21634    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21635  fi
21636  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21637  CXX_VERSION="$COMPILER_VERSION"
21638  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21639  CXX_VENDOR="$COMPILER_VENDOR"
21640
21641  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21642$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21643
21644
21645# Now that we have resolved CXX ourself, let autoconf have its go at it
21646ac_ext=cpp
21647ac_cpp='$CXXCPP $CPPFLAGS'
21648ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21649ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21650ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21651if test -z "$CXX"; then
21652  if test -n "$CCC"; then
21653    CXX=$CCC
21654  else
21655    if test -n "$ac_tool_prefix"; then
21656  for ac_prog in $CXX
21657  do
21658    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21659set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21661$as_echo_n "checking for $ac_word... " >&6; }
21662if ${ac_cv_prog_CXX+:} false; then :
21663  $as_echo_n "(cached) " >&6
21664else
21665  if test -n "$CXX"; then
21666  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21667else
21668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21669for as_dir in $PATH
21670do
21671  IFS=$as_save_IFS
21672  test -z "$as_dir" && as_dir=.
21673    for ac_exec_ext in '' $ac_executable_extensions; do
21674  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21675    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21677    break 2
21678  fi
21679done
21680  done
21681IFS=$as_save_IFS
21682
21683fi
21684fi
21685CXX=$ac_cv_prog_CXX
21686if test -n "$CXX"; then
21687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21688$as_echo "$CXX" >&6; }
21689else
21690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21691$as_echo "no" >&6; }
21692fi
21693
21694
21695    test -n "$CXX" && break
21696  done
21697fi
21698if test -z "$CXX"; then
21699  ac_ct_CXX=$CXX
21700  for ac_prog in $CXX
21701do
21702  # Extract the first word of "$ac_prog", so it can be a program name with args.
21703set dummy $ac_prog; ac_word=$2
21704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21705$as_echo_n "checking for $ac_word... " >&6; }
21706if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21707  $as_echo_n "(cached) " >&6
21708else
21709  if test -n "$ac_ct_CXX"; then
21710  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21711else
21712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21713for as_dir in $PATH
21714do
21715  IFS=$as_save_IFS
21716  test -z "$as_dir" && as_dir=.
21717    for ac_exec_ext in '' $ac_executable_extensions; do
21718  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21719    ac_cv_prog_ac_ct_CXX="$ac_prog"
21720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21721    break 2
21722  fi
21723done
21724  done
21725IFS=$as_save_IFS
21726
21727fi
21728fi
21729ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21730if test -n "$ac_ct_CXX"; then
21731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21732$as_echo "$ac_ct_CXX" >&6; }
21733else
21734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21735$as_echo "no" >&6; }
21736fi
21737
21738
21739  test -n "$ac_ct_CXX" && break
21740done
21741
21742  if test "x$ac_ct_CXX" = x; then
21743    CXX="g++"
21744  else
21745    case $cross_compiling:$ac_tool_warned in
21746yes:)
21747{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21748$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21749ac_tool_warned=yes ;;
21750esac
21751    CXX=$ac_ct_CXX
21752  fi
21753fi
21754
21755  fi
21756fi
21757# Provide some information about the compiler.
21758$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21759set X $ac_compile
21760ac_compiler=$2
21761for ac_option in --version -v -V -qversion; do
21762  { { ac_try="$ac_compiler $ac_option >&5"
21763case "(($ac_try" in
21764  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21765  *) ac_try_echo=$ac_try;;
21766esac
21767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21768$as_echo "$ac_try_echo"; } >&5
21769  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21770  ac_status=$?
21771  if test -s conftest.err; then
21772    sed '10a\
21773... rest of stderr output deleted ...
21774         10q' conftest.err >conftest.er1
21775    cat conftest.er1 >&5
21776  fi
21777  rm -f conftest.er1 conftest.err
21778  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21779  test $ac_status = 0; }
21780done
21781
21782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21783$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21784if ${ac_cv_cxx_compiler_gnu+:} false; then :
21785  $as_echo_n "(cached) " >&6
21786else
21787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21788/* end confdefs.h.  */
21789
21790int
21791main ()
21792{
21793#ifndef __GNUC__
21794       choke me
21795#endif
21796
21797  ;
21798  return 0;
21799}
21800_ACEOF
21801if ac_fn_cxx_try_compile "$LINENO"; then :
21802  ac_compiler_gnu=yes
21803else
21804  ac_compiler_gnu=no
21805fi
21806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21807ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21808
21809fi
21810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21811$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21812if test $ac_compiler_gnu = yes; then
21813  GXX=yes
21814else
21815  GXX=
21816fi
21817ac_test_CXXFLAGS=${CXXFLAGS+set}
21818ac_save_CXXFLAGS=$CXXFLAGS
21819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21820$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21821if ${ac_cv_prog_cxx_g+:} false; then :
21822  $as_echo_n "(cached) " >&6
21823else
21824  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21825   ac_cxx_werror_flag=yes
21826   ac_cv_prog_cxx_g=no
21827   CXXFLAGS="-g"
21828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21829/* end confdefs.h.  */
21830
21831int
21832main ()
21833{
21834
21835  ;
21836  return 0;
21837}
21838_ACEOF
21839if ac_fn_cxx_try_compile "$LINENO"; then :
21840  ac_cv_prog_cxx_g=yes
21841else
21842  CXXFLAGS=""
21843      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21844/* end confdefs.h.  */
21845
21846int
21847main ()
21848{
21849
21850  ;
21851  return 0;
21852}
21853_ACEOF
21854if ac_fn_cxx_try_compile "$LINENO"; then :
21855
21856else
21857  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21858	 CXXFLAGS="-g"
21859	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21860/* end confdefs.h.  */
21861
21862int
21863main ()
21864{
21865
21866  ;
21867  return 0;
21868}
21869_ACEOF
21870if ac_fn_cxx_try_compile "$LINENO"; then :
21871  ac_cv_prog_cxx_g=yes
21872fi
21873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21874fi
21875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21876fi
21877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21878   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21879fi
21880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21881$as_echo "$ac_cv_prog_cxx_g" >&6; }
21882if test "$ac_test_CXXFLAGS" = set; then
21883  CXXFLAGS=$ac_save_CXXFLAGS
21884elif test $ac_cv_prog_cxx_g = yes; then
21885  if test "$GXX" = yes; then
21886    CXXFLAGS="-g -O2"
21887  else
21888    CXXFLAGS="-g"
21889  fi
21890else
21891  if test "$GXX" = yes; then
21892    CXXFLAGS="-O2"
21893  else
21894    CXXFLAGS=
21895  fi
21896fi
21897ac_ext=cpp
21898ac_cpp='$CXXCPP $CPPFLAGS'
21899ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21900ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21901ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21902
21903
21904### Locate other tools
21905
21906if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21907    ac_ext=m
21908ac_cpp='$OBJCPP $CPPFLAGS'
21909ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21910ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21911ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21912if test -n "$ac_tool_prefix"; then
21913  for ac_prog in gcc objcc objc cc CC
21914  do
21915    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21916set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21918$as_echo_n "checking for $ac_word... " >&6; }
21919if ${ac_cv_prog_OBJC+:} false; then :
21920  $as_echo_n "(cached) " >&6
21921else
21922  if test -n "$OBJC"; then
21923  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21924else
21925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21926for as_dir in $PATH
21927do
21928  IFS=$as_save_IFS
21929  test -z "$as_dir" && as_dir=.
21930    for ac_exec_ext in '' $ac_executable_extensions; do
21931  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21932    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21934    break 2
21935  fi
21936done
21937  done
21938IFS=$as_save_IFS
21939
21940fi
21941fi
21942OBJC=$ac_cv_prog_OBJC
21943if test -n "$OBJC"; then
21944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21945$as_echo "$OBJC" >&6; }
21946else
21947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21948$as_echo "no" >&6; }
21949fi
21950
21951
21952    test -n "$OBJC" && break
21953  done
21954fi
21955if test -z "$OBJC"; then
21956  ac_ct_OBJC=$OBJC
21957  for ac_prog in gcc objcc objc cc CC
21958do
21959  # Extract the first word of "$ac_prog", so it can be a program name with args.
21960set dummy $ac_prog; ac_word=$2
21961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21962$as_echo_n "checking for $ac_word... " >&6; }
21963if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21964  $as_echo_n "(cached) " >&6
21965else
21966  if test -n "$ac_ct_OBJC"; then
21967  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21968else
21969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21970for as_dir in $PATH
21971do
21972  IFS=$as_save_IFS
21973  test -z "$as_dir" && as_dir=.
21974    for ac_exec_ext in '' $ac_executable_extensions; do
21975  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21976    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21978    break 2
21979  fi
21980done
21981  done
21982IFS=$as_save_IFS
21983
21984fi
21985fi
21986ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21987if test -n "$ac_ct_OBJC"; then
21988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21989$as_echo "$ac_ct_OBJC" >&6; }
21990else
21991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21992$as_echo "no" >&6; }
21993fi
21994
21995
21996  test -n "$ac_ct_OBJC" && break
21997done
21998
21999  if test "x$ac_ct_OBJC" = x; then
22000    OBJC="gcc"
22001  else
22002    case $cross_compiling:$ac_tool_warned in
22003yes:)
22004{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22005$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22006ac_tool_warned=yes ;;
22007esac
22008    OBJC=$ac_ct_OBJC
22009  fi
22010fi
22011
22012# Provide some information about the compiler.
22013$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22014set X $ac_compile
22015ac_compiler=$2
22016for ac_option in --version -v -V -qversion; do
22017  { { ac_try="$ac_compiler $ac_option >&5"
22018case "(($ac_try" in
22019  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22020  *) ac_try_echo=$ac_try;;
22021esac
22022eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22023$as_echo "$ac_try_echo"; } >&5
22024  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22025  ac_status=$?
22026  if test -s conftest.err; then
22027    sed '10a\
22028... rest of stderr output deleted ...
22029         10q' conftest.err >conftest.er1
22030    cat conftest.er1 >&5
22031  fi
22032  rm -f conftest.er1 conftest.err
22033  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22034  test $ac_status = 0; }
22035done
22036
22037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22038$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22039if ${ac_cv_objc_compiler_gnu+:} false; then :
22040  $as_echo_n "(cached) " >&6
22041else
22042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22043/* end confdefs.h.  */
22044
22045int
22046main ()
22047{
22048#ifndef __GNUC__
22049       choke me
22050#endif
22051
22052  ;
22053  return 0;
22054}
22055_ACEOF
22056if ac_fn_objc_try_compile "$LINENO"; then :
22057  ac_compiler_gnu=yes
22058else
22059  ac_compiler_gnu=no
22060fi
22061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22062ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22063
22064fi
22065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22066$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22067if test $ac_compiler_gnu = yes; then
22068  GOBJC=yes
22069else
22070  GOBJC=
22071fi
22072ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22073ac_save_OBJCFLAGS=$OBJCFLAGS
22074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22075$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22076if ${ac_cv_prog_objc_g+:} false; then :
22077  $as_echo_n "(cached) " >&6
22078else
22079  ac_save_objc_werror_flag=$ac_objc_werror_flag
22080   ac_objc_werror_flag=yes
22081   ac_cv_prog_objc_g=no
22082   OBJCFLAGS="-g"
22083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22084/* end confdefs.h.  */
22085
22086int
22087main ()
22088{
22089
22090  ;
22091  return 0;
22092}
22093_ACEOF
22094if ac_fn_objc_try_compile "$LINENO"; then :
22095  ac_cv_prog_objc_g=yes
22096else
22097  OBJCFLAGS=""
22098      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22099/* end confdefs.h.  */
22100
22101int
22102main ()
22103{
22104
22105  ;
22106  return 0;
22107}
22108_ACEOF
22109if ac_fn_objc_try_compile "$LINENO"; then :
22110
22111else
22112  ac_objc_werror_flag=$ac_save_objc_werror_flag
22113	 OBJCFLAGS="-g"
22114	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22115/* end confdefs.h.  */
22116
22117int
22118main ()
22119{
22120
22121  ;
22122  return 0;
22123}
22124_ACEOF
22125if ac_fn_objc_try_compile "$LINENO"; then :
22126  ac_cv_prog_objc_g=yes
22127fi
22128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22129fi
22130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22131fi
22132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22133   ac_objc_werror_flag=$ac_save_objc_werror_flag
22134fi
22135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22136$as_echo "$ac_cv_prog_objc_g" >&6; }
22137if test "$ac_test_OBJCFLAGS" = set; then
22138  OBJCFLAGS=$ac_save_OBJCFLAGS
22139elif test $ac_cv_prog_objc_g = yes; then
22140  if test "$GOBJC" = yes; then
22141    OBJCFLAGS="-g -O2"
22142  else
22143    OBJCFLAGS="-g"
22144  fi
22145else
22146  if test "$GOBJC" = yes; then
22147    OBJCFLAGS="-O2"
22148  else
22149    OBJCFLAGS=
22150  fi
22151fi
22152ac_ext=cpp
22153ac_cpp='$CXXCPP $CPPFLAGS'
22154ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22155ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22156ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22157
22158
22159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22160
22161  # First separate the path from the arguments. This will split at the first
22162  # space.
22163  complete="$OBJC"
22164  path="${complete%% *}"
22165  tmp="$complete EOL"
22166  arguments="${tmp#* }"
22167
22168  # Input might be given as Windows format, start by converting to
22169  # unix format.
22170  new_path=`$CYGPATH -u "$path"`
22171
22172  # Now try to locate executable using which
22173  new_path=`$WHICH "$new_path" 2> /dev/null`
22174  # bat and cmd files are not always considered executable in cygwin causing which
22175  # to not find them
22176  if test "x$new_path" = x \
22177           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22178           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22179    new_path=`$CYGPATH -u "$path"`
22180  fi
22181  if test "x$new_path" = x; then
22182    # Oops. Which didn't find the executable.
22183    # The splitting of arguments from the executable at a space might have been incorrect,
22184    # since paths with space are more likely in Windows. Give it another try with the whole
22185    # argument.
22186    path="$complete"
22187    arguments="EOL"
22188    new_path=`$CYGPATH -u "$path"`
22189    new_path=`$WHICH "$new_path" 2> /dev/null`
22190    # bat and cmd files are not always considered executable in cygwin causing which
22191    # to not find them
22192    if test "x$new_path" = x \
22193             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22194             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22195      new_path=`$CYGPATH -u "$path"`
22196    fi
22197    if test "x$new_path" = x; then
22198      # It's still not found. Now this is an unrecoverable error.
22199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22200$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22201      has_space=`$ECHO "$complete" | $GREP " "`
22202      if test "x$has_space" != x; then
22203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22205      fi
22206      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22207    fi
22208  fi
22209
22210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22213  # "foo.exe" is OK but "foo" is an error.
22214  #
22215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22216  # It is also a way to make sure we got the proper file name for the real test later on.
22217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22218  if test "x$test_shortpath" = x; then
22219    # Short path failed, file does not exist as specified.
22220    # Try adding .exe or .cmd
22221    if test -f "${new_path}.exe"; then
22222       input_to_shortpath="${new_path}.exe"
22223    elif test -f "${new_path}.cmd"; then
22224       input_to_shortpath="${new_path}.cmd"
22225    else
22226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22227$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22228      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22229$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22230      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22231    fi
22232  else
22233    input_to_shortpath="$new_path"
22234  fi
22235
22236  # Call helper function which possibly converts this using DOS-style short mode.
22237  # If so, the updated path is stored in $new_path.
22238  new_path="$input_to_shortpath"
22239
22240  input_path="$input_to_shortpath"
22241  # Check if we need to convert this using DOS-style short mode. If the path
22242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22243  # take no chances and rewrite it.
22244  # Note: m4 eats our [], so we need to use [ and ] instead.
22245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22246  if test "x$has_forbidden_chars" != x; then
22247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22251      # Going to short mode and back again did indeed matter. Since short mode is
22252      # case insensitive, let's make it lowercase to improve readability.
22253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22254      # Now convert it back to Unix-stile (cygpath)
22255      input_path=`$CYGPATH -u "$shortmode_path"`
22256      new_path="$input_path"
22257    fi
22258  fi
22259
22260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22261  if test "x$test_cygdrive_prefix" = x; then
22262    # As a simple fix, exclude /usr/bin since it's not a real path.
22263    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22265      # a path prefixed by /cygdrive for fixpath to work.
22266      new_path="$CYGWIN_ROOT_PATH$input_path"
22267    fi
22268  fi
22269
22270  # remove trailing .exe if any
22271  new_path="${new_path/%.exe/}"
22272
22273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22274
22275  # First separate the path from the arguments. This will split at the first
22276  # space.
22277  complete="$OBJC"
22278  path="${complete%% *}"
22279  tmp="$complete EOL"
22280  arguments="${tmp#* }"
22281
22282  # Input might be given as Windows format, start by converting to
22283  # unix format.
22284  new_path="$path"
22285
22286  windows_path="$new_path"
22287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22288    unix_path=`$CYGPATH -u "$windows_path"`
22289    new_path="$unix_path"
22290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22292    new_path="$unix_path"
22293  fi
22294
22295
22296  # Now try to locate executable using which
22297  new_path=`$WHICH "$new_path" 2> /dev/null`
22298
22299  if test "x$new_path" = x; then
22300    # Oops. Which didn't find the executable.
22301    # The splitting of arguments from the executable at a space might have been incorrect,
22302    # since paths with space are more likely in Windows. Give it another try with the whole
22303    # argument.
22304    path="$complete"
22305    arguments="EOL"
22306    new_path="$path"
22307
22308  windows_path="$new_path"
22309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22310    unix_path=`$CYGPATH -u "$windows_path"`
22311    new_path="$unix_path"
22312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22314    new_path="$unix_path"
22315  fi
22316
22317
22318    new_path=`$WHICH "$new_path" 2> /dev/null`
22319
22320    if test "x$new_path" = x; then
22321      # It's still not found. Now this is an unrecoverable error.
22322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22323$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22324      has_space=`$ECHO "$complete" | $GREP " "`
22325      if test "x$has_space" != x; then
22326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22328      fi
22329      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22330    fi
22331  fi
22332
22333  # Now new_path has a complete unix path to the binary
22334  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22335    # Keep paths in /bin as-is, but remove trailing .exe if any
22336    new_path="${new_path/%.exe/}"
22337    # Do not save /bin paths to all_fixpath_prefixes!
22338  else
22339    # Not in mixed or Windows style, start by that.
22340    new_path=`cmd //c echo $new_path`
22341
22342  input_path="$new_path"
22343  # Check if we need to convert this using DOS-style short mode. If the path
22344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22345  # take no chances and rewrite it.
22346  # Note: m4 eats our [], so we need to use [ and ] instead.
22347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22348  if test "x$has_forbidden_chars" != x; then
22349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22351  fi
22352
22353    # Output is in $new_path
22354
22355  windows_path="$new_path"
22356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22357    unix_path=`$CYGPATH -u "$windows_path"`
22358    new_path="$unix_path"
22359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22361    new_path="$unix_path"
22362  fi
22363
22364    # remove trailing .exe if any
22365    new_path="${new_path/%.exe/}"
22366
22367    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22368    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22369  fi
22370
22371  else
22372    # We're on a posix platform. Hooray! :)
22373    # First separate the path from the arguments. This will split at the first
22374    # space.
22375    complete="$OBJC"
22376    path="${complete%% *}"
22377    tmp="$complete EOL"
22378    arguments="${tmp#* }"
22379
22380    # Cannot rely on the command "which" here since it doesn't always work.
22381    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22382    if test -z "$is_absolute_path"; then
22383      # Path to executable is not absolute. Find it.
22384      IFS_save="$IFS"
22385      IFS=:
22386      for p in $PATH; do
22387        if test -f "$p/$path" && test -x "$p/$path"; then
22388          new_path="$p/$path"
22389          break
22390        fi
22391      done
22392      IFS="$IFS_save"
22393    else
22394      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22395$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22396      new_path="$path"
22397    fi
22398
22399    if test "x$new_path" = x; then
22400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22401$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22402        has_space=`$ECHO "$complete" | $GREP " "`
22403        if test "x$has_space" != x; then
22404          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22405$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22406        fi
22407        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22408      fi
22409  fi
22410
22411      # Now join together the path and the arguments once again
22412      if test "x$arguments" != xEOL; then
22413        new_complete="$new_path ${arguments% *}"
22414      else
22415        new_complete="$new_path"
22416      fi
22417
22418  if test "x$complete" != "x$new_complete"; then
22419      OBJC="$new_complete"
22420      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22421$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22422    fi
22423
22424else
22425    OBJC=
22426fi
22427
22428# Restore the flags to the user specified values.
22429# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22430CFLAGS="$ORG_CFLAGS"
22431CXXFLAGS="$ORG_CXXFLAGS"
22432OBJCFLAGS="$ORG_OBJCFLAGS"
22433
22434LD="$CC"
22435LDEXE="$CC"
22436LDCXX="$CXX"
22437LDEXECXX="$CXX"
22438
22439# LDEXE is the linker to use, when creating executables.
22440
22441# Linking C++ libraries.
22442
22443# Linking C++ executables.
22444
22445
22446if test "x$OPENJDK_TARGET_OS" != xwindows; then
22447    if test -n "$ac_tool_prefix"; then
22448  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22449set dummy ${ac_tool_prefix}ar; ac_word=$2
22450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22451$as_echo_n "checking for $ac_word... " >&6; }
22452if ${ac_cv_prog_AR+:} false; then :
22453  $as_echo_n "(cached) " >&6
22454else
22455  if test -n "$AR"; then
22456  ac_cv_prog_AR="$AR" # Let the user override the test.
22457else
22458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22459for as_dir in $PATH
22460do
22461  IFS=$as_save_IFS
22462  test -z "$as_dir" && as_dir=.
22463    for ac_exec_ext in '' $ac_executable_extensions; do
22464  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22465    ac_cv_prog_AR="${ac_tool_prefix}ar"
22466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22467    break 2
22468  fi
22469done
22470  done
22471IFS=$as_save_IFS
22472
22473fi
22474fi
22475AR=$ac_cv_prog_AR
22476if test -n "$AR"; then
22477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22478$as_echo "$AR" >&6; }
22479else
22480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22481$as_echo "no" >&6; }
22482fi
22483
22484
22485fi
22486if test -z "$ac_cv_prog_AR"; then
22487  ac_ct_AR=$AR
22488  # Extract the first word of "ar", so it can be a program name with args.
22489set dummy ar; ac_word=$2
22490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22491$as_echo_n "checking for $ac_word... " >&6; }
22492if ${ac_cv_prog_ac_ct_AR+:} false; then :
22493  $as_echo_n "(cached) " >&6
22494else
22495  if test -n "$ac_ct_AR"; then
22496  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22497else
22498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22499for as_dir in $PATH
22500do
22501  IFS=$as_save_IFS
22502  test -z "$as_dir" && as_dir=.
22503    for ac_exec_ext in '' $ac_executable_extensions; do
22504  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22505    ac_cv_prog_ac_ct_AR="ar"
22506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22507    break 2
22508  fi
22509done
22510  done
22511IFS=$as_save_IFS
22512
22513fi
22514fi
22515ac_ct_AR=$ac_cv_prog_ac_ct_AR
22516if test -n "$ac_ct_AR"; then
22517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22518$as_echo "$ac_ct_AR" >&6; }
22519else
22520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22521$as_echo "no" >&6; }
22522fi
22523
22524  if test "x$ac_ct_AR" = x; then
22525    AR=""
22526  else
22527    case $cross_compiling:$ac_tool_warned in
22528yes:)
22529{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22530$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22531ac_tool_warned=yes ;;
22532esac
22533    AR=$ac_ct_AR
22534  fi
22535else
22536  AR="$ac_cv_prog_AR"
22537fi
22538
22539
22540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22541
22542  # First separate the path from the arguments. This will split at the first
22543  # space.
22544  complete="$AR"
22545  path="${complete%% *}"
22546  tmp="$complete EOL"
22547  arguments="${tmp#* }"
22548
22549  # Input might be given as Windows format, start by converting to
22550  # unix format.
22551  new_path=`$CYGPATH -u "$path"`
22552
22553  # Now try to locate executable using which
22554  new_path=`$WHICH "$new_path" 2> /dev/null`
22555  # bat and cmd files are not always considered executable in cygwin causing which
22556  # to not find them
22557  if test "x$new_path" = x \
22558           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22559           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22560    new_path=`$CYGPATH -u "$path"`
22561  fi
22562  if test "x$new_path" = x; then
22563    # Oops. Which didn't find the executable.
22564    # The splitting of arguments from the executable at a space might have been incorrect,
22565    # since paths with space are more likely in Windows. Give it another try with the whole
22566    # argument.
22567    path="$complete"
22568    arguments="EOL"
22569    new_path=`$CYGPATH -u "$path"`
22570    new_path=`$WHICH "$new_path" 2> /dev/null`
22571    # bat and cmd files are not always considered executable in cygwin causing which
22572    # to not find them
22573    if test "x$new_path" = x \
22574             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22575             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22576      new_path=`$CYGPATH -u "$path"`
22577    fi
22578    if test "x$new_path" = x; then
22579      # It's still not found. Now this is an unrecoverable error.
22580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22581$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22582      has_space=`$ECHO "$complete" | $GREP " "`
22583      if test "x$has_space" != x; then
22584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22586      fi
22587      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22588    fi
22589  fi
22590
22591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22594  # "foo.exe" is OK but "foo" is an error.
22595  #
22596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22597  # It is also a way to make sure we got the proper file name for the real test later on.
22598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22599  if test "x$test_shortpath" = x; then
22600    # Short path failed, file does not exist as specified.
22601    # Try adding .exe or .cmd
22602    if test -f "${new_path}.exe"; then
22603       input_to_shortpath="${new_path}.exe"
22604    elif test -f "${new_path}.cmd"; then
22605       input_to_shortpath="${new_path}.cmd"
22606    else
22607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22608$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22609      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22610$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22611      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22612    fi
22613  else
22614    input_to_shortpath="$new_path"
22615  fi
22616
22617  # Call helper function which possibly converts this using DOS-style short mode.
22618  # If so, the updated path is stored in $new_path.
22619  new_path="$input_to_shortpath"
22620
22621  input_path="$input_to_shortpath"
22622  # Check if we need to convert this using DOS-style short mode. If the path
22623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22624  # take no chances and rewrite it.
22625  # Note: m4 eats our [], so we need to use [ and ] instead.
22626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22627  if test "x$has_forbidden_chars" != x; then
22628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22632      # Going to short mode and back again did indeed matter. Since short mode is
22633      # case insensitive, let's make it lowercase to improve readability.
22634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22635      # Now convert it back to Unix-stile (cygpath)
22636      input_path=`$CYGPATH -u "$shortmode_path"`
22637      new_path="$input_path"
22638    fi
22639  fi
22640
22641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22642  if test "x$test_cygdrive_prefix" = x; then
22643    # As a simple fix, exclude /usr/bin since it's not a real path.
22644    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22646      # a path prefixed by /cygdrive for fixpath to work.
22647      new_path="$CYGWIN_ROOT_PATH$input_path"
22648    fi
22649  fi
22650
22651  # remove trailing .exe if any
22652  new_path="${new_path/%.exe/}"
22653
22654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22655
22656  # First separate the path from the arguments. This will split at the first
22657  # space.
22658  complete="$AR"
22659  path="${complete%% *}"
22660  tmp="$complete EOL"
22661  arguments="${tmp#* }"
22662
22663  # Input might be given as Windows format, start by converting to
22664  # unix format.
22665  new_path="$path"
22666
22667  windows_path="$new_path"
22668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22669    unix_path=`$CYGPATH -u "$windows_path"`
22670    new_path="$unix_path"
22671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22673    new_path="$unix_path"
22674  fi
22675
22676
22677  # Now try to locate executable using which
22678  new_path=`$WHICH "$new_path" 2> /dev/null`
22679
22680  if test "x$new_path" = x; then
22681    # Oops. Which didn't find the executable.
22682    # The splitting of arguments from the executable at a space might have been incorrect,
22683    # since paths with space are more likely in Windows. Give it another try with the whole
22684    # argument.
22685    path="$complete"
22686    arguments="EOL"
22687    new_path="$path"
22688
22689  windows_path="$new_path"
22690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22691    unix_path=`$CYGPATH -u "$windows_path"`
22692    new_path="$unix_path"
22693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22695    new_path="$unix_path"
22696  fi
22697
22698
22699    new_path=`$WHICH "$new_path" 2> /dev/null`
22700
22701    if test "x$new_path" = x; then
22702      # It's still not found. Now this is an unrecoverable error.
22703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22704$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22705      has_space=`$ECHO "$complete" | $GREP " "`
22706      if test "x$has_space" != x; then
22707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22709      fi
22710      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22711    fi
22712  fi
22713
22714  # Now new_path has a complete unix path to the binary
22715  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22716    # Keep paths in /bin as-is, but remove trailing .exe if any
22717    new_path="${new_path/%.exe/}"
22718    # Do not save /bin paths to all_fixpath_prefixes!
22719  else
22720    # Not in mixed or Windows style, start by that.
22721    new_path=`cmd //c echo $new_path`
22722
22723  input_path="$new_path"
22724  # Check if we need to convert this using DOS-style short mode. If the path
22725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22726  # take no chances and rewrite it.
22727  # Note: m4 eats our [], so we need to use [ and ] instead.
22728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22729  if test "x$has_forbidden_chars" != x; then
22730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22732  fi
22733
22734    # Output is in $new_path
22735
22736  windows_path="$new_path"
22737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22738    unix_path=`$CYGPATH -u "$windows_path"`
22739    new_path="$unix_path"
22740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22742    new_path="$unix_path"
22743  fi
22744
22745    # remove trailing .exe if any
22746    new_path="${new_path/%.exe/}"
22747
22748    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22749    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22750  fi
22751
22752  else
22753    # We're on a posix platform. Hooray! :)
22754    # First separate the path from the arguments. This will split at the first
22755    # space.
22756    complete="$AR"
22757    path="${complete%% *}"
22758    tmp="$complete EOL"
22759    arguments="${tmp#* }"
22760
22761    # Cannot rely on the command "which" here since it doesn't always work.
22762    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22763    if test -z "$is_absolute_path"; then
22764      # Path to executable is not absolute. Find it.
22765      IFS_save="$IFS"
22766      IFS=:
22767      for p in $PATH; do
22768        if test -f "$p/$path" && test -x "$p/$path"; then
22769          new_path="$p/$path"
22770          break
22771        fi
22772      done
22773      IFS="$IFS_save"
22774    else
22775      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22776$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22777      new_path="$path"
22778    fi
22779
22780    if test "x$new_path" = x; then
22781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22782$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22783        has_space=`$ECHO "$complete" | $GREP " "`
22784        if test "x$has_space" != x; then
22785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22787        fi
22788        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22789      fi
22790  fi
22791
22792      # Now join together the path and the arguments once again
22793      if test "x$arguments" != xEOL; then
22794        new_complete="$new_path ${arguments% *}"
22795      else
22796        new_complete="$new_path"
22797      fi
22798
22799  if test "x$complete" != "x$new_complete"; then
22800      AR="$new_complete"
22801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22802$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22803    fi
22804
22805fi
22806if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22807    ARFLAGS="-r"
22808else
22809    ARFLAGS=""
22810fi
22811
22812
22813# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22814HOTSPOT_CXX="$CXX"
22815HOTSPOT_LD="$LD"
22816
22817
22818
22819COMPILER_NAME=gcc
22820COMPILER_TYPE=CC
22821if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22822
22823    # For now, assume that we are always compiling using cl.exe.
22824    CC_OUT_OPTION=-Fo
22825    EXE_OUT_OPTION=-out:
22826    LD_OUT_OPTION=-out:
22827    AR_OUT_OPTION=-out:
22828    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22829    # program for something completely different.
22830    # Extract the first word of "link", so it can be a program name with args.
22831set dummy link; ac_word=$2
22832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22833$as_echo_n "checking for $ac_word... " >&6; }
22834if ${ac_cv_prog_WINLD+:} false; then :
22835  $as_echo_n "(cached) " >&6
22836else
22837  if test -n "$WINLD"; then
22838  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22839else
22840  ac_prog_rejected=no
22841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22842for as_dir in $PATH
22843do
22844  IFS=$as_save_IFS
22845  test -z "$as_dir" && as_dir=.
22846    for ac_exec_ext in '' $ac_executable_extensions; do
22847  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22848    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22849       ac_prog_rejected=yes
22850       continue
22851     fi
22852    ac_cv_prog_WINLD="link"
22853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22854    break 2
22855  fi
22856done
22857  done
22858IFS=$as_save_IFS
22859
22860if test $ac_prog_rejected = yes; then
22861  # We found a bogon in the path, so make sure we never use it.
22862  set dummy $ac_cv_prog_WINLD
22863  shift
22864  if test $# != 0; then
22865    # We chose a different compiler from the bogus one.
22866    # However, it has the same basename, so the bogon will be chosen
22867    # first if we set WINLD to just the basename; use the full file name.
22868    shift
22869    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22870  fi
22871fi
22872fi
22873fi
22874WINLD=$ac_cv_prog_WINLD
22875if test -n "$WINLD"; then
22876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22877$as_echo "$WINLD" >&6; }
22878else
22879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22880$as_echo "no" >&6; }
22881fi
22882
22883
22884    # Since we must ignore the first found link, WINLD will contain
22885    # the full path to the link.exe program.
22886
22887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22888
22889  # First separate the path from the arguments. This will split at the first
22890  # space.
22891  complete="$WINLD"
22892  path="${complete%% *}"
22893  tmp="$complete EOL"
22894  arguments="${tmp#* }"
22895
22896  # Input might be given as Windows format, start by converting to
22897  # unix format.
22898  new_path=`$CYGPATH -u "$path"`
22899
22900  # Now try to locate executable using which
22901  new_path=`$WHICH "$new_path" 2> /dev/null`
22902  # bat and cmd files are not always considered executable in cygwin causing which
22903  # to not find them
22904  if test "x$new_path" = x \
22905           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22906           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22907    new_path=`$CYGPATH -u "$path"`
22908  fi
22909  if test "x$new_path" = x; then
22910    # Oops. Which didn't find the executable.
22911    # The splitting of arguments from the executable at a space might have been incorrect,
22912    # since paths with space are more likely in Windows. Give it another try with the whole
22913    # argument.
22914    path="$complete"
22915    arguments="EOL"
22916    new_path=`$CYGPATH -u "$path"`
22917    new_path=`$WHICH "$new_path" 2> /dev/null`
22918    # bat and cmd files are not always considered executable in cygwin causing which
22919    # to not find them
22920    if test "x$new_path" = x \
22921             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22922             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22923      new_path=`$CYGPATH -u "$path"`
22924    fi
22925    if test "x$new_path" = x; then
22926      # It's still not found. Now this is an unrecoverable error.
22927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22928$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22929      has_space=`$ECHO "$complete" | $GREP " "`
22930      if test "x$has_space" != x; then
22931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22933      fi
22934      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22935    fi
22936  fi
22937
22938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22941  # "foo.exe" is OK but "foo" is an error.
22942  #
22943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22944  # It is also a way to make sure we got the proper file name for the real test later on.
22945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22946  if test "x$test_shortpath" = x; then
22947    # Short path failed, file does not exist as specified.
22948    # Try adding .exe or .cmd
22949    if test -f "${new_path}.exe"; then
22950       input_to_shortpath="${new_path}.exe"
22951    elif test -f "${new_path}.cmd"; then
22952       input_to_shortpath="${new_path}.cmd"
22953    else
22954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22955$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22956      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22957$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22958      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22959    fi
22960  else
22961    input_to_shortpath="$new_path"
22962  fi
22963
22964  # Call helper function which possibly converts this using DOS-style short mode.
22965  # If so, the updated path is stored in $new_path.
22966  new_path="$input_to_shortpath"
22967
22968  input_path="$input_to_shortpath"
22969  # Check if we need to convert this using DOS-style short mode. If the path
22970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22971  # take no chances and rewrite it.
22972  # Note: m4 eats our [], so we need to use [ and ] instead.
22973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22974  if test "x$has_forbidden_chars" != x; then
22975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22979      # Going to short mode and back again did indeed matter. Since short mode is
22980      # case insensitive, let's make it lowercase to improve readability.
22981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22982      # Now convert it back to Unix-stile (cygpath)
22983      input_path=`$CYGPATH -u "$shortmode_path"`
22984      new_path="$input_path"
22985    fi
22986  fi
22987
22988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22989  if test "x$test_cygdrive_prefix" = x; then
22990    # As a simple fix, exclude /usr/bin since it's not a real path.
22991    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22993      # a path prefixed by /cygdrive for fixpath to work.
22994      new_path="$CYGWIN_ROOT_PATH$input_path"
22995    fi
22996  fi
22997
22998  # remove trailing .exe if any
22999  new_path="${new_path/%.exe/}"
23000
23001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23002
23003  # First separate the path from the arguments. This will split at the first
23004  # space.
23005  complete="$WINLD"
23006  path="${complete%% *}"
23007  tmp="$complete EOL"
23008  arguments="${tmp#* }"
23009
23010  # Input might be given as Windows format, start by converting to
23011  # unix format.
23012  new_path="$path"
23013
23014  windows_path="$new_path"
23015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23016    unix_path=`$CYGPATH -u "$windows_path"`
23017    new_path="$unix_path"
23018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23020    new_path="$unix_path"
23021  fi
23022
23023
23024  # Now try to locate executable using which
23025  new_path=`$WHICH "$new_path" 2> /dev/null`
23026
23027  if test "x$new_path" = x; then
23028    # Oops. Which didn't find the executable.
23029    # The splitting of arguments from the executable at a space might have been incorrect,
23030    # since paths with space are more likely in Windows. Give it another try with the whole
23031    # argument.
23032    path="$complete"
23033    arguments="EOL"
23034    new_path="$path"
23035
23036  windows_path="$new_path"
23037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23038    unix_path=`$CYGPATH -u "$windows_path"`
23039    new_path="$unix_path"
23040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23042    new_path="$unix_path"
23043  fi
23044
23045
23046    new_path=`$WHICH "$new_path" 2> /dev/null`
23047
23048    if test "x$new_path" = x; then
23049      # It's still not found. Now this is an unrecoverable error.
23050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23051$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23052      has_space=`$ECHO "$complete" | $GREP " "`
23053      if test "x$has_space" != x; then
23054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23056      fi
23057      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23058    fi
23059  fi
23060
23061  # Now new_path has a complete unix path to the binary
23062  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23063    # Keep paths in /bin as-is, but remove trailing .exe if any
23064    new_path="${new_path/%.exe/}"
23065    # Do not save /bin paths to all_fixpath_prefixes!
23066  else
23067    # Not in mixed or Windows style, start by that.
23068    new_path=`cmd //c echo $new_path`
23069
23070  input_path="$new_path"
23071  # Check if we need to convert this using DOS-style short mode. If the path
23072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23073  # take no chances and rewrite it.
23074  # Note: m4 eats our [], so we need to use [ and ] instead.
23075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23076  if test "x$has_forbidden_chars" != x; then
23077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23079  fi
23080
23081    # Output is in $new_path
23082
23083  windows_path="$new_path"
23084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23085    unix_path=`$CYGPATH -u "$windows_path"`
23086    new_path="$unix_path"
23087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23089    new_path="$unix_path"
23090  fi
23091
23092    # remove trailing .exe if any
23093    new_path="${new_path/%.exe/}"
23094
23095    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23096    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23097  fi
23098
23099  else
23100    # We're on a posix platform. Hooray! :)
23101    # First separate the path from the arguments. This will split at the first
23102    # space.
23103    complete="$WINLD"
23104    path="${complete%% *}"
23105    tmp="$complete EOL"
23106    arguments="${tmp#* }"
23107
23108    # Cannot rely on the command "which" here since it doesn't always work.
23109    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23110    if test -z "$is_absolute_path"; then
23111      # Path to executable is not absolute. Find it.
23112      IFS_save="$IFS"
23113      IFS=:
23114      for p in $PATH; do
23115        if test -f "$p/$path" && test -x "$p/$path"; then
23116          new_path="$p/$path"
23117          break
23118        fi
23119      done
23120      IFS="$IFS_save"
23121    else
23122      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23123$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23124      new_path="$path"
23125    fi
23126
23127    if test "x$new_path" = x; then
23128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23129$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23130        has_space=`$ECHO "$complete" | $GREP " "`
23131        if test "x$has_space" != x; then
23132          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23133$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23134        fi
23135        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23136      fi
23137  fi
23138
23139      # Now join together the path and the arguments once again
23140      if test "x$arguments" != xEOL; then
23141        new_complete="$new_path ${arguments% *}"
23142      else
23143        new_complete="$new_path"
23144      fi
23145
23146  if test "x$complete" != "x$new_complete"; then
23147      WINLD="$new_complete"
23148      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23149$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23150    fi
23151
23152    printf "Windows linker was found at $WINLD\n"
23153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23154$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23155    "$WINLD" --version > /dev/null
23156    if test $? -eq 0 ; then
23157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23158$as_echo "no" >&6; }
23159      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23160    else
23161      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23162$as_echo "yes" >&6; }
23163    fi
23164    LD="$WINLD"
23165    LDEXE="$WINLD"
23166    LDCXX="$WINLD"
23167    LDEXECXX="$WINLD"
23168
23169    # Extract the first word of "mt", so it can be a program name with args.
23170set dummy mt; ac_word=$2
23171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23172$as_echo_n "checking for $ac_word... " >&6; }
23173if ${ac_cv_prog_MT+:} false; then :
23174  $as_echo_n "(cached) " >&6
23175else
23176  if test -n "$MT"; then
23177  ac_cv_prog_MT="$MT" # Let the user override the test.
23178else
23179  ac_prog_rejected=no
23180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23181for as_dir in $PATH
23182do
23183  IFS=$as_save_IFS
23184  test -z "$as_dir" && as_dir=.
23185    for ac_exec_ext in '' $ac_executable_extensions; do
23186  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23187    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23188       ac_prog_rejected=yes
23189       continue
23190     fi
23191    ac_cv_prog_MT="mt"
23192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23193    break 2
23194  fi
23195done
23196  done
23197IFS=$as_save_IFS
23198
23199if test $ac_prog_rejected = yes; then
23200  # We found a bogon in the path, so make sure we never use it.
23201  set dummy $ac_cv_prog_MT
23202  shift
23203  if test $# != 0; then
23204    # We chose a different compiler from the bogus one.
23205    # However, it has the same basename, so the bogon will be chosen
23206    # first if we set MT to just the basename; use the full file name.
23207    shift
23208    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23209  fi
23210fi
23211fi
23212fi
23213MT=$ac_cv_prog_MT
23214if test -n "$MT"; then
23215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23216$as_echo "$MT" >&6; }
23217else
23218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23219$as_echo "no" >&6; }
23220fi
23221
23222
23223
23224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23225
23226  # First separate the path from the arguments. This will split at the first
23227  # space.
23228  complete="$MT"
23229  path="${complete%% *}"
23230  tmp="$complete EOL"
23231  arguments="${tmp#* }"
23232
23233  # Input might be given as Windows format, start by converting to
23234  # unix format.
23235  new_path=`$CYGPATH -u "$path"`
23236
23237  # Now try to locate executable using which
23238  new_path=`$WHICH "$new_path" 2> /dev/null`
23239  # bat and cmd files are not always considered executable in cygwin causing which
23240  # to not find them
23241  if test "x$new_path" = x \
23242           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23243           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23244    new_path=`$CYGPATH -u "$path"`
23245  fi
23246  if test "x$new_path" = x; then
23247    # Oops. Which didn't find the executable.
23248    # The splitting of arguments from the executable at a space might have been incorrect,
23249    # since paths with space are more likely in Windows. Give it another try with the whole
23250    # argument.
23251    path="$complete"
23252    arguments="EOL"
23253    new_path=`$CYGPATH -u "$path"`
23254    new_path=`$WHICH "$new_path" 2> /dev/null`
23255    # bat and cmd files are not always considered executable in cygwin causing which
23256    # to not find them
23257    if test "x$new_path" = x \
23258             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23259             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23260      new_path=`$CYGPATH -u "$path"`
23261    fi
23262    if test "x$new_path" = x; then
23263      # It's still not found. Now this is an unrecoverable error.
23264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23265$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23266      has_space=`$ECHO "$complete" | $GREP " "`
23267      if test "x$has_space" != x; then
23268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23270      fi
23271      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23272    fi
23273  fi
23274
23275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23278  # "foo.exe" is OK but "foo" is an error.
23279  #
23280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23281  # It is also a way to make sure we got the proper file name for the real test later on.
23282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23283  if test "x$test_shortpath" = x; then
23284    # Short path failed, file does not exist as specified.
23285    # Try adding .exe or .cmd
23286    if test -f "${new_path}.exe"; then
23287       input_to_shortpath="${new_path}.exe"
23288    elif test -f "${new_path}.cmd"; then
23289       input_to_shortpath="${new_path}.cmd"
23290    else
23291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23292$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23293      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23294$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23295      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23296    fi
23297  else
23298    input_to_shortpath="$new_path"
23299  fi
23300
23301  # Call helper function which possibly converts this using DOS-style short mode.
23302  # If so, the updated path is stored in $new_path.
23303  new_path="$input_to_shortpath"
23304
23305  input_path="$input_to_shortpath"
23306  # Check if we need to convert this using DOS-style short mode. If the path
23307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23308  # take no chances and rewrite it.
23309  # Note: m4 eats our [], so we need to use [ and ] instead.
23310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23311  if test "x$has_forbidden_chars" != x; then
23312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23316      # Going to short mode and back again did indeed matter. Since short mode is
23317      # case insensitive, let's make it lowercase to improve readability.
23318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23319      # Now convert it back to Unix-stile (cygpath)
23320      input_path=`$CYGPATH -u "$shortmode_path"`
23321      new_path="$input_path"
23322    fi
23323  fi
23324
23325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23326  if test "x$test_cygdrive_prefix" = x; then
23327    # As a simple fix, exclude /usr/bin since it's not a real path.
23328    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23330      # a path prefixed by /cygdrive for fixpath to work.
23331      new_path="$CYGWIN_ROOT_PATH$input_path"
23332    fi
23333  fi
23334
23335  # remove trailing .exe if any
23336  new_path="${new_path/%.exe/}"
23337
23338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23339
23340  # First separate the path from the arguments. This will split at the first
23341  # space.
23342  complete="$MT"
23343  path="${complete%% *}"
23344  tmp="$complete EOL"
23345  arguments="${tmp#* }"
23346
23347  # Input might be given as Windows format, start by converting to
23348  # unix format.
23349  new_path="$path"
23350
23351  windows_path="$new_path"
23352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23353    unix_path=`$CYGPATH -u "$windows_path"`
23354    new_path="$unix_path"
23355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23357    new_path="$unix_path"
23358  fi
23359
23360
23361  # Now try to locate executable using which
23362  new_path=`$WHICH "$new_path" 2> /dev/null`
23363
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="$path"
23372
23373  windows_path="$new_path"
23374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23375    unix_path=`$CYGPATH -u "$windows_path"`
23376    new_path="$unix_path"
23377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23379    new_path="$unix_path"
23380  fi
23381
23382
23383    new_path=`$WHICH "$new_path" 2> /dev/null`
23384
23385    if test "x$new_path" = x; then
23386      # It's still not found. Now this is an unrecoverable error.
23387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23388$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23389      has_space=`$ECHO "$complete" | $GREP " "`
23390      if test "x$has_space" != x; then
23391        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23392$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23393      fi
23394      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23395    fi
23396  fi
23397
23398  # Now new_path has a complete unix path to the binary
23399  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23400    # Keep paths in /bin as-is, but remove trailing .exe if any
23401    new_path="${new_path/%.exe/}"
23402    # Do not save /bin paths to all_fixpath_prefixes!
23403  else
23404    # Not in mixed or Windows style, start by that.
23405    new_path=`cmd //c echo $new_path`
23406
23407  input_path="$new_path"
23408  # Check if we need to convert this using DOS-style short mode. If the path
23409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23410  # take no chances and rewrite it.
23411  # Note: m4 eats our [], so we need to use [ and ] instead.
23412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23413  if test "x$has_forbidden_chars" != x; then
23414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23415    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23416  fi
23417
23418    # Output is in $new_path
23419
23420  windows_path="$new_path"
23421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23422    unix_path=`$CYGPATH -u "$windows_path"`
23423    new_path="$unix_path"
23424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23426    new_path="$unix_path"
23427  fi
23428
23429    # remove trailing .exe if any
23430    new_path="${new_path/%.exe/}"
23431
23432    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23433    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23434  fi
23435
23436  else
23437    # We're on a posix platform. Hooray! :)
23438    # First separate the path from the arguments. This will split at the first
23439    # space.
23440    complete="$MT"
23441    path="${complete%% *}"
23442    tmp="$complete EOL"
23443    arguments="${tmp#* }"
23444
23445    # Cannot rely on the command "which" here since it doesn't always work.
23446    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23447    if test -z "$is_absolute_path"; then
23448      # Path to executable is not absolute. Find it.
23449      IFS_save="$IFS"
23450      IFS=:
23451      for p in $PATH; do
23452        if test -f "$p/$path" && test -x "$p/$path"; then
23453          new_path="$p/$path"
23454          break
23455        fi
23456      done
23457      IFS="$IFS_save"
23458    else
23459      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23460$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23461      new_path="$path"
23462    fi
23463
23464    if test "x$new_path" = x; then
23465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23466$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23467        has_space=`$ECHO "$complete" | $GREP " "`
23468        if test "x$has_space" != x; then
23469          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23470$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23471        fi
23472        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23473      fi
23474  fi
23475
23476      # Now join together the path and the arguments once again
23477      if test "x$arguments" != xEOL; then
23478        new_complete="$new_path ${arguments% *}"
23479      else
23480        new_complete="$new_path"
23481      fi
23482
23483  if test "x$complete" != "x$new_complete"; then
23484      MT="$new_complete"
23485      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23486$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23487    fi
23488
23489    # The resource compiler
23490    # Extract the first word of "rc", so it can be a program name with args.
23491set dummy rc; ac_word=$2
23492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23493$as_echo_n "checking for $ac_word... " >&6; }
23494if ${ac_cv_prog_RC+:} false; then :
23495  $as_echo_n "(cached) " >&6
23496else
23497  if test -n "$RC"; then
23498  ac_cv_prog_RC="$RC" # Let the user override the test.
23499else
23500  ac_prog_rejected=no
23501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23502for as_dir in $PATH
23503do
23504  IFS=$as_save_IFS
23505  test -z "$as_dir" && as_dir=.
23506    for ac_exec_ext in '' $ac_executable_extensions; do
23507  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23508    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23509       ac_prog_rejected=yes
23510       continue
23511     fi
23512    ac_cv_prog_RC="rc"
23513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23514    break 2
23515  fi
23516done
23517  done
23518IFS=$as_save_IFS
23519
23520if test $ac_prog_rejected = yes; then
23521  # We found a bogon in the path, so make sure we never use it.
23522  set dummy $ac_cv_prog_RC
23523  shift
23524  if test $# != 0; then
23525    # We chose a different compiler from the bogus one.
23526    # However, it has the same basename, so the bogon will be chosen
23527    # first if we set RC to just the basename; use the full file name.
23528    shift
23529    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23530  fi
23531fi
23532fi
23533fi
23534RC=$ac_cv_prog_RC
23535if test -n "$RC"; then
23536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23537$as_echo "$RC" >&6; }
23538else
23539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23540$as_echo "no" >&6; }
23541fi
23542
23543
23544
23545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23546
23547  # First separate the path from the arguments. This will split at the first
23548  # space.
23549  complete="$RC"
23550  path="${complete%% *}"
23551  tmp="$complete EOL"
23552  arguments="${tmp#* }"
23553
23554  # Input might be given as Windows format, start by converting to
23555  # unix format.
23556  new_path=`$CYGPATH -u "$path"`
23557
23558  # Now try to locate executable using which
23559  new_path=`$WHICH "$new_path" 2> /dev/null`
23560  # bat and cmd files are not always considered executable in cygwin causing which
23561  # to not find them
23562  if test "x$new_path" = x \
23563           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23564           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23565    new_path=`$CYGPATH -u "$path"`
23566  fi
23567  if test "x$new_path" = x; then
23568    # Oops. Which didn't find the executable.
23569    # The splitting of arguments from the executable at a space might have been incorrect,
23570    # since paths with space are more likely in Windows. Give it another try with the whole
23571    # argument.
23572    path="$complete"
23573    arguments="EOL"
23574    new_path=`$CYGPATH -u "$path"`
23575    new_path=`$WHICH "$new_path" 2> /dev/null`
23576    # bat and cmd files are not always considered executable in cygwin causing which
23577    # to not find them
23578    if test "x$new_path" = x \
23579             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23580             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23581      new_path=`$CYGPATH -u "$path"`
23582    fi
23583    if test "x$new_path" = x; then
23584      # It's still not found. Now this is an unrecoverable error.
23585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23586$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23587      has_space=`$ECHO "$complete" | $GREP " "`
23588      if test "x$has_space" != x; then
23589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23591      fi
23592      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23593    fi
23594  fi
23595
23596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23599  # "foo.exe" is OK but "foo" is an error.
23600  #
23601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23602  # It is also a way to make sure we got the proper file name for the real test later on.
23603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23604  if test "x$test_shortpath" = x; then
23605    # Short path failed, file does not exist as specified.
23606    # Try adding .exe or .cmd
23607    if test -f "${new_path}.exe"; then
23608       input_to_shortpath="${new_path}.exe"
23609    elif test -f "${new_path}.cmd"; then
23610       input_to_shortpath="${new_path}.cmd"
23611    else
23612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23613$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23614      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23615$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23616      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23617    fi
23618  else
23619    input_to_shortpath="$new_path"
23620  fi
23621
23622  # Call helper function which possibly converts this using DOS-style short mode.
23623  # If so, the updated path is stored in $new_path.
23624  new_path="$input_to_shortpath"
23625
23626  input_path="$input_to_shortpath"
23627  # Check if we need to convert this using DOS-style short mode. If the path
23628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23629  # take no chances and rewrite it.
23630  # Note: m4 eats our [], so we need to use [ and ] instead.
23631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23632  if test "x$has_forbidden_chars" != x; then
23633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23637      # Going to short mode and back again did indeed matter. Since short mode is
23638      # case insensitive, let's make it lowercase to improve readability.
23639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23640      # Now convert it back to Unix-stile (cygpath)
23641      input_path=`$CYGPATH -u "$shortmode_path"`
23642      new_path="$input_path"
23643    fi
23644  fi
23645
23646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23647  if test "x$test_cygdrive_prefix" = x; then
23648    # As a simple fix, exclude /usr/bin since it's not a real path.
23649    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23651      # a path prefixed by /cygdrive for fixpath to work.
23652      new_path="$CYGWIN_ROOT_PATH$input_path"
23653    fi
23654  fi
23655
23656  # remove trailing .exe if any
23657  new_path="${new_path/%.exe/}"
23658
23659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23660
23661  # First separate the path from the arguments. This will split at the first
23662  # space.
23663  complete="$RC"
23664  path="${complete%% *}"
23665  tmp="$complete EOL"
23666  arguments="${tmp#* }"
23667
23668  # Input might be given as Windows format, start by converting to
23669  # unix format.
23670  new_path="$path"
23671
23672  windows_path="$new_path"
23673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23674    unix_path=`$CYGPATH -u "$windows_path"`
23675    new_path="$unix_path"
23676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23678    new_path="$unix_path"
23679  fi
23680
23681
23682  # Now try to locate executable using which
23683  new_path=`$WHICH "$new_path" 2> /dev/null`
23684
23685  if test "x$new_path" = x; then
23686    # Oops. Which didn't find the executable.
23687    # The splitting of arguments from the executable at a space might have been incorrect,
23688    # since paths with space are more likely in Windows. Give it another try with the whole
23689    # argument.
23690    path="$complete"
23691    arguments="EOL"
23692    new_path="$path"
23693
23694  windows_path="$new_path"
23695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23696    unix_path=`$CYGPATH -u "$windows_path"`
23697    new_path="$unix_path"
23698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23700    new_path="$unix_path"
23701  fi
23702
23703
23704    new_path=`$WHICH "$new_path" 2> /dev/null`
23705
23706    if test "x$new_path" = x; then
23707      # It's still not found. Now this is an unrecoverable error.
23708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23709$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23710      has_space=`$ECHO "$complete" | $GREP " "`
23711      if test "x$has_space" != x; then
23712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23714      fi
23715      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23716    fi
23717  fi
23718
23719  # Now new_path has a complete unix path to the binary
23720  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23721    # Keep paths in /bin as-is, but remove trailing .exe if any
23722    new_path="${new_path/%.exe/}"
23723    # Do not save /bin paths to all_fixpath_prefixes!
23724  else
23725    # Not in mixed or Windows style, start by that.
23726    new_path=`cmd //c echo $new_path`
23727
23728  input_path="$new_path"
23729  # Check if we need to convert this using DOS-style short mode. If the path
23730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23731  # take no chances and rewrite it.
23732  # Note: m4 eats our [], so we need to use [ and ] instead.
23733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23734  if test "x$has_forbidden_chars" != x; then
23735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23737  fi
23738
23739    # Output is in $new_path
23740
23741  windows_path="$new_path"
23742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23743    unix_path=`$CYGPATH -u "$windows_path"`
23744    new_path="$unix_path"
23745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23747    new_path="$unix_path"
23748  fi
23749
23750    # remove trailing .exe if any
23751    new_path="${new_path/%.exe/}"
23752
23753    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23754    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23755  fi
23756
23757  else
23758    # We're on a posix platform. Hooray! :)
23759    # First separate the path from the arguments. This will split at the first
23760    # space.
23761    complete="$RC"
23762    path="${complete%% *}"
23763    tmp="$complete EOL"
23764    arguments="${tmp#* }"
23765
23766    # Cannot rely on the command "which" here since it doesn't always work.
23767    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23768    if test -z "$is_absolute_path"; then
23769      # Path to executable is not absolute. Find it.
23770      IFS_save="$IFS"
23771      IFS=:
23772      for p in $PATH; do
23773        if test -f "$p/$path" && test -x "$p/$path"; then
23774          new_path="$p/$path"
23775          break
23776        fi
23777      done
23778      IFS="$IFS_save"
23779    else
23780      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23781$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23782      new_path="$path"
23783    fi
23784
23785    if test "x$new_path" = x; then
23786        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23787$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23788        has_space=`$ECHO "$complete" | $GREP " "`
23789        if test "x$has_space" != x; then
23790          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23791$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23792        fi
23793        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23794      fi
23795  fi
23796
23797      # Now join together the path and the arguments once again
23798      if test "x$arguments" != xEOL; then
23799        new_complete="$new_path ${arguments% *}"
23800      else
23801        new_complete="$new_path"
23802      fi
23803
23804  if test "x$complete" != "x$new_complete"; then
23805      RC="$new_complete"
23806      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23807$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23808    fi
23809
23810
23811    # For hotspot, we need these in Windows mixed path,
23812    # so rewrite them all. Need added .exe suffix.
23813    HOTSPOT_CXX="$CXX.exe"
23814    HOTSPOT_LD="$LD.exe"
23815    HOTSPOT_MT="$MT.exe"
23816    HOTSPOT_RC="$RC.exe"
23817
23818  unix_path="$HOTSPOT_CXX"
23819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23820    windows_path=`$CYGPATH -m "$unix_path"`
23821    HOTSPOT_CXX="$windows_path"
23822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23823    windows_path=`cmd //c echo $unix_path`
23824    HOTSPOT_CXX="$windows_path"
23825  fi
23826
23827
23828  unix_path="$HOTSPOT_LD"
23829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23830    windows_path=`$CYGPATH -m "$unix_path"`
23831    HOTSPOT_LD="$windows_path"
23832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23833    windows_path=`cmd //c echo $unix_path`
23834    HOTSPOT_LD="$windows_path"
23835  fi
23836
23837
23838  unix_path="$HOTSPOT_MT"
23839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23840    windows_path=`$CYGPATH -m "$unix_path"`
23841    HOTSPOT_MT="$windows_path"
23842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23843    windows_path=`cmd //c echo $unix_path`
23844    HOTSPOT_MT="$windows_path"
23845  fi
23846
23847
23848  unix_path="$HOTSPOT_RC"
23849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23850    windows_path=`$CYGPATH -m "$unix_path"`
23851    HOTSPOT_RC="$windows_path"
23852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23853    windows_path=`cmd //c echo $unix_path`
23854    HOTSPOT_RC="$windows_path"
23855  fi
23856
23857
23858
23859
23860    RC_FLAGS="-nologo -l 0x409 -r"
23861    if test "x$VARIANT" = xOPT; then :
23862
23863        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23864
23865fi
23866
23867    # The version variables used to create RC_FLAGS may be overridden
23868    # in a custom configure script, or possibly the command line.
23869    # Let those variables be expanded at make time in spec.gmk.
23870    # The \$ are escaped to the shell, and the $(...) variables
23871    # are evaluated by make.
23872    RC_FLAGS="$RC_FLAGS \
23873        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23874        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23875        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23876        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23877        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23878        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23879        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23880
23881    # lib.exe is used to create static libraries.
23882    # Extract the first word of "lib", so it can be a program name with args.
23883set dummy lib; ac_word=$2
23884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23885$as_echo_n "checking for $ac_word... " >&6; }
23886if ${ac_cv_prog_WINAR+:} false; then :
23887  $as_echo_n "(cached) " >&6
23888else
23889  if test -n "$WINAR"; then
23890  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23891else
23892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23893for as_dir in $PATH
23894do
23895  IFS=$as_save_IFS
23896  test -z "$as_dir" && as_dir=.
23897    for ac_exec_ext in '' $ac_executable_extensions; do
23898  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23899    ac_cv_prog_WINAR="lib"
23900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23901    break 2
23902  fi
23903done
23904  done
23905IFS=$as_save_IFS
23906
23907fi
23908fi
23909WINAR=$ac_cv_prog_WINAR
23910if test -n "$WINAR"; then
23911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23912$as_echo "$WINAR" >&6; }
23913else
23914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23915$as_echo "no" >&6; }
23916fi
23917
23918
23919
23920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23921
23922  # First separate the path from the arguments. This will split at the first
23923  # space.
23924  complete="$WINAR"
23925  path="${complete%% *}"
23926  tmp="$complete EOL"
23927  arguments="${tmp#* }"
23928
23929  # Input might be given as Windows format, start by converting to
23930  # unix format.
23931  new_path=`$CYGPATH -u "$path"`
23932
23933  # Now try to locate executable using which
23934  new_path=`$WHICH "$new_path" 2> /dev/null`
23935  # bat and cmd files are not always considered executable in cygwin causing which
23936  # to not find them
23937  if test "x$new_path" = x \
23938           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23939           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23940    new_path=`$CYGPATH -u "$path"`
23941  fi
23942  if test "x$new_path" = x; then
23943    # Oops. Which didn't find the executable.
23944    # The splitting of arguments from the executable at a space might have been incorrect,
23945    # since paths with space are more likely in Windows. Give it another try with the whole
23946    # argument.
23947    path="$complete"
23948    arguments="EOL"
23949    new_path=`$CYGPATH -u "$path"`
23950    new_path=`$WHICH "$new_path" 2> /dev/null`
23951    # bat and cmd files are not always considered executable in cygwin causing which
23952    # to not find them
23953    if test "x$new_path" = x \
23954             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23955             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23956      new_path=`$CYGPATH -u "$path"`
23957    fi
23958    if test "x$new_path" = x; then
23959      # It's still not found. Now this is an unrecoverable error.
23960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23961$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23962      has_space=`$ECHO "$complete" | $GREP " "`
23963      if test "x$has_space" != x; then
23964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23966      fi
23967      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23968    fi
23969  fi
23970
23971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23974  # "foo.exe" is OK but "foo" is an error.
23975  #
23976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23977  # It is also a way to make sure we got the proper file name for the real test later on.
23978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23979  if test "x$test_shortpath" = x; then
23980    # Short path failed, file does not exist as specified.
23981    # Try adding .exe or .cmd
23982    if test -f "${new_path}.exe"; then
23983       input_to_shortpath="${new_path}.exe"
23984    elif test -f "${new_path}.cmd"; then
23985       input_to_shortpath="${new_path}.cmd"
23986    else
23987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23988$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23989      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23990$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23991      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23992    fi
23993  else
23994    input_to_shortpath="$new_path"
23995  fi
23996
23997  # Call helper function which possibly converts this using DOS-style short mode.
23998  # If so, the updated path is stored in $new_path.
23999  new_path="$input_to_shortpath"
24000
24001  input_path="$input_to_shortpath"
24002  # Check if we need to convert this using DOS-style short mode. If the path
24003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24004  # take no chances and rewrite it.
24005  # Note: m4 eats our [], so we need to use [ and ] instead.
24006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24007  if test "x$has_forbidden_chars" != x; then
24008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24012      # Going to short mode and back again did indeed matter. Since short mode is
24013      # case insensitive, let's make it lowercase to improve readability.
24014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24015      # Now convert it back to Unix-stile (cygpath)
24016      input_path=`$CYGPATH -u "$shortmode_path"`
24017      new_path="$input_path"
24018    fi
24019  fi
24020
24021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24022  if test "x$test_cygdrive_prefix" = x; then
24023    # As a simple fix, exclude /usr/bin since it's not a real path.
24024    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24026      # a path prefixed by /cygdrive for fixpath to work.
24027      new_path="$CYGWIN_ROOT_PATH$input_path"
24028    fi
24029  fi
24030
24031  # remove trailing .exe if any
24032  new_path="${new_path/%.exe/}"
24033
24034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24035
24036  # First separate the path from the arguments. This will split at the first
24037  # space.
24038  complete="$WINAR"
24039  path="${complete%% *}"
24040  tmp="$complete EOL"
24041  arguments="${tmp#* }"
24042
24043  # Input might be given as Windows format, start by converting to
24044  # unix format.
24045  new_path="$path"
24046
24047  windows_path="$new_path"
24048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24049    unix_path=`$CYGPATH -u "$windows_path"`
24050    new_path="$unix_path"
24051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24053    new_path="$unix_path"
24054  fi
24055
24056
24057  # Now try to locate executable using which
24058  new_path=`$WHICH "$new_path" 2> /dev/null`
24059
24060  if test "x$new_path" = x; then
24061    # Oops. Which didn't find the executable.
24062    # The splitting of arguments from the executable at a space might have been incorrect,
24063    # since paths with space are more likely in Windows. Give it another try with the whole
24064    # argument.
24065    path="$complete"
24066    arguments="EOL"
24067    new_path="$path"
24068
24069  windows_path="$new_path"
24070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24071    unix_path=`$CYGPATH -u "$windows_path"`
24072    new_path="$unix_path"
24073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24075    new_path="$unix_path"
24076  fi
24077
24078
24079    new_path=`$WHICH "$new_path" 2> /dev/null`
24080
24081    if test "x$new_path" = x; then
24082      # It's still not found. Now this is an unrecoverable error.
24083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24084$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24085      has_space=`$ECHO "$complete" | $GREP " "`
24086      if test "x$has_space" != x; then
24087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24089      fi
24090      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24091    fi
24092  fi
24093
24094  # Now new_path has a complete unix path to the binary
24095  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24096    # Keep paths in /bin as-is, but remove trailing .exe if any
24097    new_path="${new_path/%.exe/}"
24098    # Do not save /bin paths to all_fixpath_prefixes!
24099  else
24100    # Not in mixed or Windows style, start by that.
24101    new_path=`cmd //c echo $new_path`
24102
24103  input_path="$new_path"
24104  # Check if we need to convert this using DOS-style short mode. If the path
24105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24106  # take no chances and rewrite it.
24107  # Note: m4 eats our [], so we need to use [ and ] instead.
24108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24109  if test "x$has_forbidden_chars" != x; then
24110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24112  fi
24113
24114    # Output is in $new_path
24115
24116  windows_path="$new_path"
24117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24118    unix_path=`$CYGPATH -u "$windows_path"`
24119    new_path="$unix_path"
24120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24122    new_path="$unix_path"
24123  fi
24124
24125    # remove trailing .exe if any
24126    new_path="${new_path/%.exe/}"
24127
24128    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24129    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24130  fi
24131
24132  else
24133    # We're on a posix platform. Hooray! :)
24134    # First separate the path from the arguments. This will split at the first
24135    # space.
24136    complete="$WINAR"
24137    path="${complete%% *}"
24138    tmp="$complete EOL"
24139    arguments="${tmp#* }"
24140
24141    # Cannot rely on the command "which" here since it doesn't always work.
24142    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24143    if test -z "$is_absolute_path"; then
24144      # Path to executable is not absolute. Find it.
24145      IFS_save="$IFS"
24146      IFS=:
24147      for p in $PATH; do
24148        if test -f "$p/$path" && test -x "$p/$path"; then
24149          new_path="$p/$path"
24150          break
24151        fi
24152      done
24153      IFS="$IFS_save"
24154    else
24155      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24156$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24157      new_path="$path"
24158    fi
24159
24160    if test "x$new_path" = x; then
24161        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24162$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24163        has_space=`$ECHO "$complete" | $GREP " "`
24164        if test "x$has_space" != x; then
24165          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24166$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24167        fi
24168        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24169      fi
24170  fi
24171
24172      # Now join together the path and the arguments once again
24173      if test "x$arguments" != xEOL; then
24174        new_complete="$new_path ${arguments% *}"
24175      else
24176        new_complete="$new_path"
24177      fi
24178
24179  if test "x$complete" != "x$new_complete"; then
24180      WINAR="$new_complete"
24181      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24182$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24183    fi
24184
24185    AR="$WINAR"
24186    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24187
24188    # Extract the first word of "dumpbin", so it can be a program name with args.
24189set dummy dumpbin; ac_word=$2
24190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24191$as_echo_n "checking for $ac_word... " >&6; }
24192if ${ac_cv_prog_DUMPBIN+:} false; then :
24193  $as_echo_n "(cached) " >&6
24194else
24195  if test -n "$DUMPBIN"; then
24196  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24197else
24198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24199for as_dir in $PATH
24200do
24201  IFS=$as_save_IFS
24202  test -z "$as_dir" && as_dir=.
24203    for ac_exec_ext in '' $ac_executable_extensions; do
24204  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24205    ac_cv_prog_DUMPBIN="dumpbin"
24206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24207    break 2
24208  fi
24209done
24210  done
24211IFS=$as_save_IFS
24212
24213fi
24214fi
24215DUMPBIN=$ac_cv_prog_DUMPBIN
24216if test -n "$DUMPBIN"; then
24217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24218$as_echo "$DUMPBIN" >&6; }
24219else
24220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24221$as_echo "no" >&6; }
24222fi
24223
24224
24225
24226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24227
24228  # First separate the path from the arguments. This will split at the first
24229  # space.
24230  complete="$DUMPBIN"
24231  path="${complete%% *}"
24232  tmp="$complete EOL"
24233  arguments="${tmp#* }"
24234
24235  # Input might be given as Windows format, start by converting to
24236  # unix format.
24237  new_path=`$CYGPATH -u "$path"`
24238
24239  # Now try to locate executable using which
24240  new_path=`$WHICH "$new_path" 2> /dev/null`
24241  # bat and cmd files are not always considered executable in cygwin causing which
24242  # to not find them
24243  if test "x$new_path" = x \
24244           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24245           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24246    new_path=`$CYGPATH -u "$path"`
24247  fi
24248  if test "x$new_path" = x; then
24249    # Oops. Which didn't find the executable.
24250    # The splitting of arguments from the executable at a space might have been incorrect,
24251    # since paths with space are more likely in Windows. Give it another try with the whole
24252    # argument.
24253    path="$complete"
24254    arguments="EOL"
24255    new_path=`$CYGPATH -u "$path"`
24256    new_path=`$WHICH "$new_path" 2> /dev/null`
24257    # bat and cmd files are not always considered executable in cygwin causing which
24258    # to not find them
24259    if test "x$new_path" = x \
24260             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24261             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24262      new_path=`$CYGPATH -u "$path"`
24263    fi
24264    if test "x$new_path" = x; then
24265      # It's still not found. Now this is an unrecoverable error.
24266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24267$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24268      has_space=`$ECHO "$complete" | $GREP " "`
24269      if test "x$has_space" != x; then
24270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24272      fi
24273      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24274    fi
24275  fi
24276
24277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24280  # "foo.exe" is OK but "foo" is an error.
24281  #
24282  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24283  # It is also a way to make sure we got the proper file name for the real test later on.
24284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24285  if test "x$test_shortpath" = x; then
24286    # Short path failed, file does not exist as specified.
24287    # Try adding .exe or .cmd
24288    if test -f "${new_path}.exe"; then
24289       input_to_shortpath="${new_path}.exe"
24290    elif test -f "${new_path}.cmd"; then
24291       input_to_shortpath="${new_path}.cmd"
24292    else
24293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24294$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24295      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24296$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24297      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24298    fi
24299  else
24300    input_to_shortpath="$new_path"
24301  fi
24302
24303  # Call helper function which possibly converts this using DOS-style short mode.
24304  # If so, the updated path is stored in $new_path.
24305  new_path="$input_to_shortpath"
24306
24307  input_path="$input_to_shortpath"
24308  # Check if we need to convert this using DOS-style short mode. If the path
24309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24310  # take no chances and rewrite it.
24311  # Note: m4 eats our [], so we need to use [ and ] instead.
24312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24313  if test "x$has_forbidden_chars" != x; then
24314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24318      # Going to short mode and back again did indeed matter. Since short mode is
24319      # case insensitive, let's make it lowercase to improve readability.
24320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24321      # Now convert it back to Unix-stile (cygpath)
24322      input_path=`$CYGPATH -u "$shortmode_path"`
24323      new_path="$input_path"
24324    fi
24325  fi
24326
24327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24328  if test "x$test_cygdrive_prefix" = x; then
24329    # As a simple fix, exclude /usr/bin since it's not a real path.
24330    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24332      # a path prefixed by /cygdrive for fixpath to work.
24333      new_path="$CYGWIN_ROOT_PATH$input_path"
24334    fi
24335  fi
24336
24337  # remove trailing .exe if any
24338  new_path="${new_path/%.exe/}"
24339
24340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24341
24342  # First separate the path from the arguments. This will split at the first
24343  # space.
24344  complete="$DUMPBIN"
24345  path="${complete%% *}"
24346  tmp="$complete EOL"
24347  arguments="${tmp#* }"
24348
24349  # Input might be given as Windows format, start by converting to
24350  # unix format.
24351  new_path="$path"
24352
24353  windows_path="$new_path"
24354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24355    unix_path=`$CYGPATH -u "$windows_path"`
24356    new_path="$unix_path"
24357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24359    new_path="$unix_path"
24360  fi
24361
24362
24363  # Now try to locate executable using which
24364  new_path=`$WHICH "$new_path" 2> /dev/null`
24365
24366  if test "x$new_path" = x; then
24367    # Oops. Which didn't find the executable.
24368    # The splitting of arguments from the executable at a space might have been incorrect,
24369    # since paths with space are more likely in Windows. Give it another try with the whole
24370    # argument.
24371    path="$complete"
24372    arguments="EOL"
24373    new_path="$path"
24374
24375  windows_path="$new_path"
24376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24377    unix_path=`$CYGPATH -u "$windows_path"`
24378    new_path="$unix_path"
24379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24381    new_path="$unix_path"
24382  fi
24383
24384
24385    new_path=`$WHICH "$new_path" 2> /dev/null`
24386
24387    if test "x$new_path" = x; then
24388      # It's still not found. Now this is an unrecoverable error.
24389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24390$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24391      has_space=`$ECHO "$complete" | $GREP " "`
24392      if test "x$has_space" != x; then
24393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24395      fi
24396      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24397    fi
24398  fi
24399
24400  # Now new_path has a complete unix path to the binary
24401  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24402    # Keep paths in /bin as-is, but remove trailing .exe if any
24403    new_path="${new_path/%.exe/}"
24404    # Do not save /bin paths to all_fixpath_prefixes!
24405  else
24406    # Not in mixed or Windows style, start by that.
24407    new_path=`cmd //c echo $new_path`
24408
24409  input_path="$new_path"
24410  # Check if we need to convert this using DOS-style short mode. If the path
24411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24412  # take no chances and rewrite it.
24413  # Note: m4 eats our [], so we need to use [ and ] instead.
24414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24415  if test "x$has_forbidden_chars" != x; then
24416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24418  fi
24419
24420    # Output is in $new_path
24421
24422  windows_path="$new_path"
24423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24424    unix_path=`$CYGPATH -u "$windows_path"`
24425    new_path="$unix_path"
24426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24428    new_path="$unix_path"
24429  fi
24430
24431    # remove trailing .exe if any
24432    new_path="${new_path/%.exe/}"
24433
24434    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24435    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24436  fi
24437
24438  else
24439    # We're on a posix platform. Hooray! :)
24440    # First separate the path from the arguments. This will split at the first
24441    # space.
24442    complete="$DUMPBIN"
24443    path="${complete%% *}"
24444    tmp="$complete EOL"
24445    arguments="${tmp#* }"
24446
24447    # Cannot rely on the command "which" here since it doesn't always work.
24448    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24449    if test -z "$is_absolute_path"; then
24450      # Path to executable is not absolute. Find it.
24451      IFS_save="$IFS"
24452      IFS=:
24453      for p in $PATH; do
24454        if test -f "$p/$path" && test -x "$p/$path"; then
24455          new_path="$p/$path"
24456          break
24457        fi
24458      done
24459      IFS="$IFS_save"
24460    else
24461      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24462$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24463      new_path="$path"
24464    fi
24465
24466    if test "x$new_path" = x; then
24467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24468$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24469        has_space=`$ECHO "$complete" | $GREP " "`
24470        if test "x$has_space" != x; then
24471          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24472$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24473        fi
24474        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24475      fi
24476  fi
24477
24478      # Now join together the path and the arguments once again
24479      if test "x$arguments" != xEOL; then
24480        new_complete="$new_path ${arguments% *}"
24481      else
24482        new_complete="$new_path"
24483      fi
24484
24485  if test "x$complete" != "x$new_complete"; then
24486      DUMPBIN="$new_complete"
24487      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24488$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24489    fi
24490
24491
24492    COMPILER_TYPE=CL
24493    CCXXFLAGS="$CCXXFLAGS -nologo"
24494
24495fi
24496
24497
24498
24499ac_ext=c
24500ac_cpp='$CPP $CPPFLAGS'
24501ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24502ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24503ac_compiler_gnu=$ac_cv_c_compiler_gnu
24504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24505$as_echo_n "checking how to run the C preprocessor... " >&6; }
24506# On Suns, sometimes $CPP names a directory.
24507if test -n "$CPP" && test -d "$CPP"; then
24508  CPP=
24509fi
24510if test -z "$CPP"; then
24511  if ${ac_cv_prog_CPP+:} false; then :
24512  $as_echo_n "(cached) " >&6
24513else
24514      # Double quotes because CPP needs to be expanded
24515    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24516    do
24517      ac_preproc_ok=false
24518for ac_c_preproc_warn_flag in '' yes
24519do
24520  # Use a header file that comes with gcc, so configuring glibc
24521  # with a fresh cross-compiler works.
24522  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24523  # <limits.h> exists even on freestanding compilers.
24524  # On the NeXT, cc -E runs the code through the compiler's parser,
24525  # not just through cpp. "Syntax error" is here to catch this case.
24526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24527/* end confdefs.h.  */
24528#ifdef __STDC__
24529# include <limits.h>
24530#else
24531# include <assert.h>
24532#endif
24533		     Syntax error
24534_ACEOF
24535if ac_fn_c_try_cpp "$LINENO"; then :
24536
24537else
24538  # Broken: fails on valid input.
24539continue
24540fi
24541rm -f conftest.err conftest.i conftest.$ac_ext
24542
24543  # OK, works on sane cases.  Now check whether nonexistent headers
24544  # can be detected and how.
24545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24546/* end confdefs.h.  */
24547#include <ac_nonexistent.h>
24548_ACEOF
24549if ac_fn_c_try_cpp "$LINENO"; then :
24550  # Broken: success on invalid input.
24551continue
24552else
24553  # Passes both tests.
24554ac_preproc_ok=:
24555break
24556fi
24557rm -f conftest.err conftest.i conftest.$ac_ext
24558
24559done
24560# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24561rm -f conftest.i conftest.err conftest.$ac_ext
24562if $ac_preproc_ok; then :
24563  break
24564fi
24565
24566    done
24567    ac_cv_prog_CPP=$CPP
24568
24569fi
24570  CPP=$ac_cv_prog_CPP
24571else
24572  ac_cv_prog_CPP=$CPP
24573fi
24574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24575$as_echo "$CPP" >&6; }
24576ac_preproc_ok=false
24577for ac_c_preproc_warn_flag in '' yes
24578do
24579  # Use a header file that comes with gcc, so configuring glibc
24580  # with a fresh cross-compiler works.
24581  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24582  # <limits.h> exists even on freestanding compilers.
24583  # On the NeXT, cc -E runs the code through the compiler's parser,
24584  # not just through cpp. "Syntax error" is here to catch this case.
24585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24586/* end confdefs.h.  */
24587#ifdef __STDC__
24588# include <limits.h>
24589#else
24590# include <assert.h>
24591#endif
24592		     Syntax error
24593_ACEOF
24594if ac_fn_c_try_cpp "$LINENO"; then :
24595
24596else
24597  # Broken: fails on valid input.
24598continue
24599fi
24600rm -f conftest.err conftest.i conftest.$ac_ext
24601
24602  # OK, works on sane cases.  Now check whether nonexistent headers
24603  # can be detected and how.
24604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24605/* end confdefs.h.  */
24606#include <ac_nonexistent.h>
24607_ACEOF
24608if ac_fn_c_try_cpp "$LINENO"; then :
24609  # Broken: success on invalid input.
24610continue
24611else
24612  # Passes both tests.
24613ac_preproc_ok=:
24614break
24615fi
24616rm -f conftest.err conftest.i conftest.$ac_ext
24617
24618done
24619# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24620rm -f conftest.i conftest.err conftest.$ac_ext
24621if $ac_preproc_ok; then :
24622
24623else
24624  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24626as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24627See \`config.log' for more details" "$LINENO" 5; }
24628fi
24629
24630ac_ext=cpp
24631ac_cpp='$CXXCPP $CPPFLAGS'
24632ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24633ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24634ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24635
24636
24637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24638
24639  # First separate the path from the arguments. This will split at the first
24640  # space.
24641  complete="$CPP"
24642  path="${complete%% *}"
24643  tmp="$complete EOL"
24644  arguments="${tmp#* }"
24645
24646  # Input might be given as Windows format, start by converting to
24647  # unix format.
24648  new_path=`$CYGPATH -u "$path"`
24649
24650  # Now try to locate executable using which
24651  new_path=`$WHICH "$new_path" 2> /dev/null`
24652  # bat and cmd files are not always considered executable in cygwin causing which
24653  # to not find them
24654  if test "x$new_path" = x \
24655           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24656           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24657    new_path=`$CYGPATH -u "$path"`
24658  fi
24659  if test "x$new_path" = x; then
24660    # Oops. Which didn't find the executable.
24661    # The splitting of arguments from the executable at a space might have been incorrect,
24662    # since paths with space are more likely in Windows. Give it another try with the whole
24663    # argument.
24664    path="$complete"
24665    arguments="EOL"
24666    new_path=`$CYGPATH -u "$path"`
24667    new_path=`$WHICH "$new_path" 2> /dev/null`
24668    # bat and cmd files are not always considered executable in cygwin causing which
24669    # to not find them
24670    if test "x$new_path" = x \
24671             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24672             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24673      new_path=`$CYGPATH -u "$path"`
24674    fi
24675    if test "x$new_path" = x; then
24676      # It's still not found. Now this is an unrecoverable error.
24677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24678$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24679      has_space=`$ECHO "$complete" | $GREP " "`
24680      if test "x$has_space" != x; then
24681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24683      fi
24684      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24685    fi
24686  fi
24687
24688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24691  # "foo.exe" is OK but "foo" is an error.
24692  #
24693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24694  # It is also a way to make sure we got the proper file name for the real test later on.
24695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24696  if test "x$test_shortpath" = x; then
24697    # Short path failed, file does not exist as specified.
24698    # Try adding .exe or .cmd
24699    if test -f "${new_path}.exe"; then
24700       input_to_shortpath="${new_path}.exe"
24701    elif test -f "${new_path}.cmd"; then
24702       input_to_shortpath="${new_path}.cmd"
24703    else
24704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24705$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24706      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24707$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24708      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24709    fi
24710  else
24711    input_to_shortpath="$new_path"
24712  fi
24713
24714  # Call helper function which possibly converts this using DOS-style short mode.
24715  # If so, the updated path is stored in $new_path.
24716  new_path="$input_to_shortpath"
24717
24718  input_path="$input_to_shortpath"
24719  # Check if we need to convert this using DOS-style short mode. If the path
24720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24721  # take no chances and rewrite it.
24722  # Note: m4 eats our [], so we need to use [ and ] instead.
24723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24724  if test "x$has_forbidden_chars" != x; then
24725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24729      # Going to short mode and back again did indeed matter. Since short mode is
24730      # case insensitive, let's make it lowercase to improve readability.
24731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24732      # Now convert it back to Unix-stile (cygpath)
24733      input_path=`$CYGPATH -u "$shortmode_path"`
24734      new_path="$input_path"
24735    fi
24736  fi
24737
24738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24739  if test "x$test_cygdrive_prefix" = x; then
24740    # As a simple fix, exclude /usr/bin since it's not a real path.
24741    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24743      # a path prefixed by /cygdrive for fixpath to work.
24744      new_path="$CYGWIN_ROOT_PATH$input_path"
24745    fi
24746  fi
24747
24748  # remove trailing .exe if any
24749  new_path="${new_path/%.exe/}"
24750
24751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24752
24753  # First separate the path from the arguments. This will split at the first
24754  # space.
24755  complete="$CPP"
24756  path="${complete%% *}"
24757  tmp="$complete EOL"
24758  arguments="${tmp#* }"
24759
24760  # Input might be given as Windows format, start by converting to
24761  # unix format.
24762  new_path="$path"
24763
24764  windows_path="$new_path"
24765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24766    unix_path=`$CYGPATH -u "$windows_path"`
24767    new_path="$unix_path"
24768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24770    new_path="$unix_path"
24771  fi
24772
24773
24774  # Now try to locate executable using which
24775  new_path=`$WHICH "$new_path" 2> /dev/null`
24776
24777  if test "x$new_path" = x; then
24778    # Oops. Which didn't find the executable.
24779    # The splitting of arguments from the executable at a space might have been incorrect,
24780    # since paths with space are more likely in Windows. Give it another try with the whole
24781    # argument.
24782    path="$complete"
24783    arguments="EOL"
24784    new_path="$path"
24785
24786  windows_path="$new_path"
24787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24788    unix_path=`$CYGPATH -u "$windows_path"`
24789    new_path="$unix_path"
24790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24792    new_path="$unix_path"
24793  fi
24794
24795
24796    new_path=`$WHICH "$new_path" 2> /dev/null`
24797
24798    if test "x$new_path" = x; then
24799      # It's still not found. Now this is an unrecoverable error.
24800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24801$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24802      has_space=`$ECHO "$complete" | $GREP " "`
24803      if test "x$has_space" != x; then
24804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24806      fi
24807      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24808    fi
24809  fi
24810
24811  # Now new_path has a complete unix path to the binary
24812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24813    # Keep paths in /bin as-is, but remove trailing .exe if any
24814    new_path="${new_path/%.exe/}"
24815    # Do not save /bin paths to all_fixpath_prefixes!
24816  else
24817    # Not in mixed or Windows style, start by that.
24818    new_path=`cmd //c echo $new_path`
24819
24820  input_path="$new_path"
24821  # Check if we need to convert this using DOS-style short mode. If the path
24822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24823  # take no chances and rewrite it.
24824  # Note: m4 eats our [], so we need to use [ and ] instead.
24825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24826  if test "x$has_forbidden_chars" != x; then
24827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24829  fi
24830
24831    # Output is in $new_path
24832
24833  windows_path="$new_path"
24834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24835    unix_path=`$CYGPATH -u "$windows_path"`
24836    new_path="$unix_path"
24837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24839    new_path="$unix_path"
24840  fi
24841
24842    # remove trailing .exe if any
24843    new_path="${new_path/%.exe/}"
24844
24845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24847  fi
24848
24849  else
24850    # We're on a posix platform. Hooray! :)
24851    # First separate the path from the arguments. This will split at the first
24852    # space.
24853    complete="$CPP"
24854    path="${complete%% *}"
24855    tmp="$complete EOL"
24856    arguments="${tmp#* }"
24857
24858    # Cannot rely on the command "which" here since it doesn't always work.
24859    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24860    if test -z "$is_absolute_path"; then
24861      # Path to executable is not absolute. Find it.
24862      IFS_save="$IFS"
24863      IFS=:
24864      for p in $PATH; do
24865        if test -f "$p/$path" && test -x "$p/$path"; then
24866          new_path="$p/$path"
24867          break
24868        fi
24869      done
24870      IFS="$IFS_save"
24871    else
24872      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24873$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24874      new_path="$path"
24875    fi
24876
24877    if test "x$new_path" = x; then
24878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24879$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24880        has_space=`$ECHO "$complete" | $GREP " "`
24881        if test "x$has_space" != x; then
24882          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24884        fi
24885        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24886      fi
24887  fi
24888
24889      # Now join together the path and the arguments once again
24890      if test "x$arguments" != xEOL; then
24891        new_complete="$new_path ${arguments% *}"
24892      else
24893        new_complete="$new_path"
24894      fi
24895
24896  if test "x$complete" != "x$new_complete"; then
24897      CPP="$new_complete"
24898      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24899$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24900    fi
24901
24902
24903ac_ext=cpp
24904ac_cpp='$CXXCPP $CPPFLAGS'
24905ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24906ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24907ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24909$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24910if test -z "$CXXCPP"; then
24911  if ${ac_cv_prog_CXXCPP+:} false; then :
24912  $as_echo_n "(cached) " >&6
24913else
24914      # Double quotes because CXXCPP needs to be expanded
24915    for CXXCPP in "$CXX -E" "/lib/cpp"
24916    do
24917      ac_preproc_ok=false
24918for ac_cxx_preproc_warn_flag in '' yes
24919do
24920  # Use a header file that comes with gcc, so configuring glibc
24921  # with a fresh cross-compiler works.
24922  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24923  # <limits.h> exists even on freestanding compilers.
24924  # On the NeXT, cc -E runs the code through the compiler's parser,
24925  # not just through cpp. "Syntax error" is here to catch this case.
24926  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24927/* end confdefs.h.  */
24928#ifdef __STDC__
24929# include <limits.h>
24930#else
24931# include <assert.h>
24932#endif
24933		     Syntax error
24934_ACEOF
24935if ac_fn_cxx_try_cpp "$LINENO"; then :
24936
24937else
24938  # Broken: fails on valid input.
24939continue
24940fi
24941rm -f conftest.err conftest.i conftest.$ac_ext
24942
24943  # OK, works on sane cases.  Now check whether nonexistent headers
24944  # can be detected and how.
24945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24946/* end confdefs.h.  */
24947#include <ac_nonexistent.h>
24948_ACEOF
24949if ac_fn_cxx_try_cpp "$LINENO"; then :
24950  # Broken: success on invalid input.
24951continue
24952else
24953  # Passes both tests.
24954ac_preproc_ok=:
24955break
24956fi
24957rm -f conftest.err conftest.i conftest.$ac_ext
24958
24959done
24960# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24961rm -f conftest.i conftest.err conftest.$ac_ext
24962if $ac_preproc_ok; then :
24963  break
24964fi
24965
24966    done
24967    ac_cv_prog_CXXCPP=$CXXCPP
24968
24969fi
24970  CXXCPP=$ac_cv_prog_CXXCPP
24971else
24972  ac_cv_prog_CXXCPP=$CXXCPP
24973fi
24974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24975$as_echo "$CXXCPP" >&6; }
24976ac_preproc_ok=false
24977for ac_cxx_preproc_warn_flag in '' yes
24978do
24979  # Use a header file that comes with gcc, so configuring glibc
24980  # with a fresh cross-compiler works.
24981  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24982  # <limits.h> exists even on freestanding compilers.
24983  # On the NeXT, cc -E runs the code through the compiler's parser,
24984  # not just through cpp. "Syntax error" is here to catch this case.
24985  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24986/* end confdefs.h.  */
24987#ifdef __STDC__
24988# include <limits.h>
24989#else
24990# include <assert.h>
24991#endif
24992		     Syntax error
24993_ACEOF
24994if ac_fn_cxx_try_cpp "$LINENO"; then :
24995
24996else
24997  # Broken: fails on valid input.
24998continue
24999fi
25000rm -f conftest.err conftest.i conftest.$ac_ext
25001
25002  # OK, works on sane cases.  Now check whether nonexistent headers
25003  # can be detected and how.
25004  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25005/* end confdefs.h.  */
25006#include <ac_nonexistent.h>
25007_ACEOF
25008if ac_fn_cxx_try_cpp "$LINENO"; then :
25009  # Broken: success on invalid input.
25010continue
25011else
25012  # Passes both tests.
25013ac_preproc_ok=:
25014break
25015fi
25016rm -f conftest.err conftest.i conftest.$ac_ext
25017
25018done
25019# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25020rm -f conftest.i conftest.err conftest.$ac_ext
25021if $ac_preproc_ok; then :
25022
25023else
25024  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25026as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25027See \`config.log' for more details" "$LINENO" 5; }
25028fi
25029
25030ac_ext=cpp
25031ac_cpp='$CXXCPP $CPPFLAGS'
25032ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25033ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25034ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25035
25036
25037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25038
25039  # First separate the path from the arguments. This will split at the first
25040  # space.
25041  complete="$CXXCPP"
25042  path="${complete%% *}"
25043  tmp="$complete EOL"
25044  arguments="${tmp#* }"
25045
25046  # Input might be given as Windows format, start by converting to
25047  # unix format.
25048  new_path=`$CYGPATH -u "$path"`
25049
25050  # Now try to locate executable using which
25051  new_path=`$WHICH "$new_path" 2> /dev/null`
25052  # bat and cmd files are not always considered executable in cygwin causing which
25053  # to not find them
25054  if test "x$new_path" = x \
25055           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25056           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25057    new_path=`$CYGPATH -u "$path"`
25058  fi
25059  if test "x$new_path" = x; then
25060    # Oops. Which didn't find the executable.
25061    # The splitting of arguments from the executable at a space might have been incorrect,
25062    # since paths with space are more likely in Windows. Give it another try with the whole
25063    # argument.
25064    path="$complete"
25065    arguments="EOL"
25066    new_path=`$CYGPATH -u "$path"`
25067    new_path=`$WHICH "$new_path" 2> /dev/null`
25068    # bat and cmd files are not always considered executable in cygwin causing which
25069    # to not find them
25070    if test "x$new_path" = x \
25071             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25072             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25073      new_path=`$CYGPATH -u "$path"`
25074    fi
25075    if test "x$new_path" = x; then
25076      # It's still not found. Now this is an unrecoverable error.
25077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25078$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25079      has_space=`$ECHO "$complete" | $GREP " "`
25080      if test "x$has_space" != x; then
25081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25083      fi
25084      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25085    fi
25086  fi
25087
25088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25091  # "foo.exe" is OK but "foo" is an error.
25092  #
25093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25094  # It is also a way to make sure we got the proper file name for the real test later on.
25095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25096  if test "x$test_shortpath" = x; then
25097    # Short path failed, file does not exist as specified.
25098    # Try adding .exe or .cmd
25099    if test -f "${new_path}.exe"; then
25100       input_to_shortpath="${new_path}.exe"
25101    elif test -f "${new_path}.cmd"; then
25102       input_to_shortpath="${new_path}.cmd"
25103    else
25104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25105$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25106      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25107$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25108      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25109    fi
25110  else
25111    input_to_shortpath="$new_path"
25112  fi
25113
25114  # Call helper function which possibly converts this using DOS-style short mode.
25115  # If so, the updated path is stored in $new_path.
25116  new_path="$input_to_shortpath"
25117
25118  input_path="$input_to_shortpath"
25119  # Check if we need to convert this using DOS-style short mode. If the path
25120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25121  # take no chances and rewrite it.
25122  # Note: m4 eats our [], so we need to use [ and ] instead.
25123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25124  if test "x$has_forbidden_chars" != x; then
25125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25129      # Going to short mode and back again did indeed matter. Since short mode is
25130      # case insensitive, let's make it lowercase to improve readability.
25131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25132      # Now convert it back to Unix-stile (cygpath)
25133      input_path=`$CYGPATH -u "$shortmode_path"`
25134      new_path="$input_path"
25135    fi
25136  fi
25137
25138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25139  if test "x$test_cygdrive_prefix" = x; then
25140    # As a simple fix, exclude /usr/bin since it's not a real path.
25141    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25143      # a path prefixed by /cygdrive for fixpath to work.
25144      new_path="$CYGWIN_ROOT_PATH$input_path"
25145    fi
25146  fi
25147
25148  # remove trailing .exe if any
25149  new_path="${new_path/%.exe/}"
25150
25151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25152
25153  # First separate the path from the arguments. This will split at the first
25154  # space.
25155  complete="$CXXCPP"
25156  path="${complete%% *}"
25157  tmp="$complete EOL"
25158  arguments="${tmp#* }"
25159
25160  # Input might be given as Windows format, start by converting to
25161  # unix format.
25162  new_path="$path"
25163
25164  windows_path="$new_path"
25165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25166    unix_path=`$CYGPATH -u "$windows_path"`
25167    new_path="$unix_path"
25168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25170    new_path="$unix_path"
25171  fi
25172
25173
25174  # Now try to locate executable using which
25175  new_path=`$WHICH "$new_path" 2> /dev/null`
25176
25177  if test "x$new_path" = x; then
25178    # Oops. Which didn't find the executable.
25179    # The splitting of arguments from the executable at a space might have been incorrect,
25180    # since paths with space are more likely in Windows. Give it another try with the whole
25181    # argument.
25182    path="$complete"
25183    arguments="EOL"
25184    new_path="$path"
25185
25186  windows_path="$new_path"
25187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25188    unix_path=`$CYGPATH -u "$windows_path"`
25189    new_path="$unix_path"
25190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25192    new_path="$unix_path"
25193  fi
25194
25195
25196    new_path=`$WHICH "$new_path" 2> /dev/null`
25197
25198    if test "x$new_path" = x; then
25199      # It's still not found. Now this is an unrecoverable error.
25200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25201$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25202      has_space=`$ECHO "$complete" | $GREP " "`
25203      if test "x$has_space" != x; then
25204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25206      fi
25207      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25208    fi
25209  fi
25210
25211  # Now new_path has a complete unix path to the binary
25212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25213    # Keep paths in /bin as-is, but remove trailing .exe if any
25214    new_path="${new_path/%.exe/}"
25215    # Do not save /bin paths to all_fixpath_prefixes!
25216  else
25217    # Not in mixed or Windows style, start by that.
25218    new_path=`cmd //c echo $new_path`
25219
25220  input_path="$new_path"
25221  # Check if we need to convert this using DOS-style short mode. If the path
25222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25223  # take no chances and rewrite it.
25224  # Note: m4 eats our [], so we need to use [ and ] instead.
25225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25226  if test "x$has_forbidden_chars" != x; then
25227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25229  fi
25230
25231    # Output is in $new_path
25232
25233  windows_path="$new_path"
25234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25235    unix_path=`$CYGPATH -u "$windows_path"`
25236    new_path="$unix_path"
25237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25239    new_path="$unix_path"
25240  fi
25241
25242    # remove trailing .exe if any
25243    new_path="${new_path/%.exe/}"
25244
25245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25247  fi
25248
25249  else
25250    # We're on a posix platform. Hooray! :)
25251    # First separate the path from the arguments. This will split at the first
25252    # space.
25253    complete="$CXXCPP"
25254    path="${complete%% *}"
25255    tmp="$complete EOL"
25256    arguments="${tmp#* }"
25257
25258    # Cannot rely on the command "which" here since it doesn't always work.
25259    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25260    if test -z "$is_absolute_path"; then
25261      # Path to executable is not absolute. Find it.
25262      IFS_save="$IFS"
25263      IFS=:
25264      for p in $PATH; do
25265        if test -f "$p/$path" && test -x "$p/$path"; then
25266          new_path="$p/$path"
25267          break
25268        fi
25269      done
25270      IFS="$IFS_save"
25271    else
25272      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25273$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25274      new_path="$path"
25275    fi
25276
25277    if test "x$new_path" = x; then
25278        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25279$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25280        has_space=`$ECHO "$complete" | $GREP " "`
25281        if test "x$has_space" != x; then
25282          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25283$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25284        fi
25285        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25286      fi
25287  fi
25288
25289      # Now join together the path and the arguments once again
25290      if test "x$arguments" != xEOL; then
25291        new_complete="$new_path ${arguments% *}"
25292      else
25293        new_complete="$new_path"
25294      fi
25295
25296  if test "x$complete" != "x$new_complete"; then
25297      CXXCPP="$new_complete"
25298      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25299$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25300    fi
25301
25302
25303if test "x$COMPILE_TYPE" != "xcross"; then
25304    # If we are not cross compiling, use the same compilers for
25305    # building the build platform executables. The cross-compilation
25306    # case needed to be done earlier, but this can only be done after
25307    # the native tools have been localized.
25308    BUILD_CC="$CC"
25309    BUILD_CXX="$CXX"
25310    BUILD_LD="$LD"
25311fi
25312
25313# for solaris we really need solaris tools, and not gnu equivalent
25314#   these seems to normally reside in /usr/ccs/bin so add that to path before
25315#   starting to probe
25316#
25317#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25318#         so that it can be overriden --with-tools-dir
25319if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25320    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25321fi
25322
25323# Find the right assembler.
25324if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25325    # Extract the first word of "as", so it can be a program name with args.
25326set dummy as; ac_word=$2
25327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25328$as_echo_n "checking for $ac_word... " >&6; }
25329if ${ac_cv_path_AS+:} false; then :
25330  $as_echo_n "(cached) " >&6
25331else
25332  case $AS in
25333  [\\/]* | ?:[\\/]*)
25334  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25335  ;;
25336  *)
25337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25338for as_dir in $PATH
25339do
25340  IFS=$as_save_IFS
25341  test -z "$as_dir" && as_dir=.
25342    for ac_exec_ext in '' $ac_executable_extensions; do
25343  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25344    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25346    break 2
25347  fi
25348done
25349  done
25350IFS=$as_save_IFS
25351
25352  ;;
25353esac
25354fi
25355AS=$ac_cv_path_AS
25356if test -n "$AS"; then
25357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25358$as_echo "$AS" >&6; }
25359else
25360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25361$as_echo "no" >&6; }
25362fi
25363
25364
25365
25366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25367
25368  # First separate the path from the arguments. This will split at the first
25369  # space.
25370  complete="$AS"
25371  path="${complete%% *}"
25372  tmp="$complete EOL"
25373  arguments="${tmp#* }"
25374
25375  # Input might be given as Windows format, start by converting to
25376  # unix format.
25377  new_path=`$CYGPATH -u "$path"`
25378
25379  # Now try to locate executable using which
25380  new_path=`$WHICH "$new_path" 2> /dev/null`
25381  # bat and cmd files are not always considered executable in cygwin causing which
25382  # to not find them
25383  if test "x$new_path" = x \
25384           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25385           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25386    new_path=`$CYGPATH -u "$path"`
25387  fi
25388  if test "x$new_path" = x; then
25389    # Oops. Which didn't find the executable.
25390    # The splitting of arguments from the executable at a space might have been incorrect,
25391    # since paths with space are more likely in Windows. Give it another try with the whole
25392    # argument.
25393    path="$complete"
25394    arguments="EOL"
25395    new_path=`$CYGPATH -u "$path"`
25396    new_path=`$WHICH "$new_path" 2> /dev/null`
25397    # bat and cmd files are not always considered executable in cygwin causing which
25398    # to not find them
25399    if test "x$new_path" = x \
25400             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25401             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25402      new_path=`$CYGPATH -u "$path"`
25403    fi
25404    if test "x$new_path" = x; then
25405      # It's still not found. Now this is an unrecoverable error.
25406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25407$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25408      has_space=`$ECHO "$complete" | $GREP " "`
25409      if test "x$has_space" != x; then
25410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25412      fi
25413      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25414    fi
25415  fi
25416
25417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25420  # "foo.exe" is OK but "foo" is an error.
25421  #
25422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25423  # It is also a way to make sure we got the proper file name for the real test later on.
25424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25425  if test "x$test_shortpath" = x; then
25426    # Short path failed, file does not exist as specified.
25427    # Try adding .exe or .cmd
25428    if test -f "${new_path}.exe"; then
25429       input_to_shortpath="${new_path}.exe"
25430    elif test -f "${new_path}.cmd"; then
25431       input_to_shortpath="${new_path}.cmd"
25432    else
25433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25434$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25435      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25436$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25437      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25438    fi
25439  else
25440    input_to_shortpath="$new_path"
25441  fi
25442
25443  # Call helper function which possibly converts this using DOS-style short mode.
25444  # If so, the updated path is stored in $new_path.
25445  new_path="$input_to_shortpath"
25446
25447  input_path="$input_to_shortpath"
25448  # Check if we need to convert this using DOS-style short mode. If the path
25449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25450  # take no chances and rewrite it.
25451  # Note: m4 eats our [], so we need to use [ and ] instead.
25452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25453  if test "x$has_forbidden_chars" != x; then
25454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25458      # Going to short mode and back again did indeed matter. Since short mode is
25459      # case insensitive, let's make it lowercase to improve readability.
25460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25461      # Now convert it back to Unix-stile (cygpath)
25462      input_path=`$CYGPATH -u "$shortmode_path"`
25463      new_path="$input_path"
25464    fi
25465  fi
25466
25467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25468  if test "x$test_cygdrive_prefix" = x; then
25469    # As a simple fix, exclude /usr/bin since it's not a real path.
25470    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25472      # a path prefixed by /cygdrive for fixpath to work.
25473      new_path="$CYGWIN_ROOT_PATH$input_path"
25474    fi
25475  fi
25476
25477  # remove trailing .exe if any
25478  new_path="${new_path/%.exe/}"
25479
25480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25481
25482  # First separate the path from the arguments. This will split at the first
25483  # space.
25484  complete="$AS"
25485  path="${complete%% *}"
25486  tmp="$complete EOL"
25487  arguments="${tmp#* }"
25488
25489  # Input might be given as Windows format, start by converting to
25490  # unix format.
25491  new_path="$path"
25492
25493  windows_path="$new_path"
25494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25495    unix_path=`$CYGPATH -u "$windows_path"`
25496    new_path="$unix_path"
25497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25499    new_path="$unix_path"
25500  fi
25501
25502
25503  # Now try to locate executable using which
25504  new_path=`$WHICH "$new_path" 2> /dev/null`
25505
25506  if test "x$new_path" = x; then
25507    # Oops. Which didn't find the executable.
25508    # The splitting of arguments from the executable at a space might have been incorrect,
25509    # since paths with space are more likely in Windows. Give it another try with the whole
25510    # argument.
25511    path="$complete"
25512    arguments="EOL"
25513    new_path="$path"
25514
25515  windows_path="$new_path"
25516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25517    unix_path=`$CYGPATH -u "$windows_path"`
25518    new_path="$unix_path"
25519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25521    new_path="$unix_path"
25522  fi
25523
25524
25525    new_path=`$WHICH "$new_path" 2> /dev/null`
25526
25527    if test "x$new_path" = x; then
25528      # It's still not found. Now this is an unrecoverable error.
25529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25530$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25531      has_space=`$ECHO "$complete" | $GREP " "`
25532      if test "x$has_space" != x; then
25533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25535      fi
25536      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25537    fi
25538  fi
25539
25540  # Now new_path has a complete unix path to the binary
25541  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25542    # Keep paths in /bin as-is, but remove trailing .exe if any
25543    new_path="${new_path/%.exe/}"
25544    # Do not save /bin paths to all_fixpath_prefixes!
25545  else
25546    # Not in mixed or Windows style, start by that.
25547    new_path=`cmd //c echo $new_path`
25548
25549  input_path="$new_path"
25550  # Check if we need to convert this using DOS-style short mode. If the path
25551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25552  # take no chances and rewrite it.
25553  # Note: m4 eats our [], so we need to use [ and ] instead.
25554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25555  if test "x$has_forbidden_chars" != x; then
25556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25558  fi
25559
25560    # Output is in $new_path
25561
25562  windows_path="$new_path"
25563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25564    unix_path=`$CYGPATH -u "$windows_path"`
25565    new_path="$unix_path"
25566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25568    new_path="$unix_path"
25569  fi
25570
25571    # remove trailing .exe if any
25572    new_path="${new_path/%.exe/}"
25573
25574    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25575    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25576  fi
25577
25578  else
25579    # We're on a posix platform. Hooray! :)
25580    # First separate the path from the arguments. This will split at the first
25581    # space.
25582    complete="$AS"
25583    path="${complete%% *}"
25584    tmp="$complete EOL"
25585    arguments="${tmp#* }"
25586
25587    # Cannot rely on the command "which" here since it doesn't always work.
25588    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25589    if test -z "$is_absolute_path"; then
25590      # Path to executable is not absolute. Find it.
25591      IFS_save="$IFS"
25592      IFS=:
25593      for p in $PATH; do
25594        if test -f "$p/$path" && test -x "$p/$path"; then
25595          new_path="$p/$path"
25596          break
25597        fi
25598      done
25599      IFS="$IFS_save"
25600    else
25601      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25602$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25603      new_path="$path"
25604    fi
25605
25606    if test "x$new_path" = x; then
25607        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25608$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25609        has_space=`$ECHO "$complete" | $GREP " "`
25610        if test "x$has_space" != x; then
25611          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25612$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25613        fi
25614        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25615      fi
25616  fi
25617
25618      # Now join together the path and the arguments once again
25619      if test "x$arguments" != xEOL; then
25620        new_complete="$new_path ${arguments% *}"
25621      else
25622        new_complete="$new_path"
25623      fi
25624
25625  if test "x$complete" != "x$new_complete"; then
25626      AS="$new_complete"
25627      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25628$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25629    fi
25630
25631else
25632    AS="$CC -c"
25633fi
25634
25635
25636if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25637    # Extract the first word of "nm", so it can be a program name with args.
25638set dummy nm; ac_word=$2
25639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25640$as_echo_n "checking for $ac_word... " >&6; }
25641if ${ac_cv_path_NM+:} false; then :
25642  $as_echo_n "(cached) " >&6
25643else
25644  case $NM in
25645  [\\/]* | ?:[\\/]*)
25646  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25647  ;;
25648  *)
25649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25650for as_dir in $PATH
25651do
25652  IFS=$as_save_IFS
25653  test -z "$as_dir" && as_dir=.
25654    for ac_exec_ext in '' $ac_executable_extensions; do
25655  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25656    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25658    break 2
25659  fi
25660done
25661  done
25662IFS=$as_save_IFS
25663
25664  ;;
25665esac
25666fi
25667NM=$ac_cv_path_NM
25668if test -n "$NM"; then
25669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25670$as_echo "$NM" >&6; }
25671else
25672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25673$as_echo "no" >&6; }
25674fi
25675
25676
25677
25678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25679
25680  # First separate the path from the arguments. This will split at the first
25681  # space.
25682  complete="$NM"
25683  path="${complete%% *}"
25684  tmp="$complete EOL"
25685  arguments="${tmp#* }"
25686
25687  # Input might be given as Windows format, start by converting to
25688  # unix format.
25689  new_path=`$CYGPATH -u "$path"`
25690
25691  # Now try to locate executable using which
25692  new_path=`$WHICH "$new_path" 2> /dev/null`
25693  # bat and cmd files are not always considered executable in cygwin causing which
25694  # to not find them
25695  if test "x$new_path" = x \
25696           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25697           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25698    new_path=`$CYGPATH -u "$path"`
25699  fi
25700  if test "x$new_path" = x; then
25701    # Oops. Which didn't find the executable.
25702    # The splitting of arguments from the executable at a space might have been incorrect,
25703    # since paths with space are more likely in Windows. Give it another try with the whole
25704    # argument.
25705    path="$complete"
25706    arguments="EOL"
25707    new_path=`$CYGPATH -u "$path"`
25708    new_path=`$WHICH "$new_path" 2> /dev/null`
25709    # bat and cmd files are not always considered executable in cygwin causing which
25710    # to not find them
25711    if test "x$new_path" = x \
25712             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25713             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25714      new_path=`$CYGPATH -u "$path"`
25715    fi
25716    if test "x$new_path" = x; then
25717      # It's still not found. Now this is an unrecoverable error.
25718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25719$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25720      has_space=`$ECHO "$complete" | $GREP " "`
25721      if test "x$has_space" != x; then
25722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25724      fi
25725      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25726    fi
25727  fi
25728
25729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25732  # "foo.exe" is OK but "foo" is an error.
25733  #
25734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25735  # It is also a way to make sure we got the proper file name for the real test later on.
25736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25737  if test "x$test_shortpath" = x; then
25738    # Short path failed, file does not exist as specified.
25739    # Try adding .exe or .cmd
25740    if test -f "${new_path}.exe"; then
25741       input_to_shortpath="${new_path}.exe"
25742    elif test -f "${new_path}.cmd"; then
25743       input_to_shortpath="${new_path}.cmd"
25744    else
25745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25746$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25747      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25748$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25749      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25750    fi
25751  else
25752    input_to_shortpath="$new_path"
25753  fi
25754
25755  # Call helper function which possibly converts this using DOS-style short mode.
25756  # If so, the updated path is stored in $new_path.
25757  new_path="$input_to_shortpath"
25758
25759  input_path="$input_to_shortpath"
25760  # Check if we need to convert this using DOS-style short mode. If the path
25761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25762  # take no chances and rewrite it.
25763  # Note: m4 eats our [], so we need to use [ and ] instead.
25764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25765  if test "x$has_forbidden_chars" != x; then
25766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25770      # Going to short mode and back again did indeed matter. Since short mode is
25771      # case insensitive, let's make it lowercase to improve readability.
25772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25773      # Now convert it back to Unix-stile (cygpath)
25774      input_path=`$CYGPATH -u "$shortmode_path"`
25775      new_path="$input_path"
25776    fi
25777  fi
25778
25779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25780  if test "x$test_cygdrive_prefix" = x; then
25781    # As a simple fix, exclude /usr/bin since it's not a real path.
25782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25784      # a path prefixed by /cygdrive for fixpath to work.
25785      new_path="$CYGWIN_ROOT_PATH$input_path"
25786    fi
25787  fi
25788
25789  # remove trailing .exe if any
25790  new_path="${new_path/%.exe/}"
25791
25792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25793
25794  # First separate the path from the arguments. This will split at the first
25795  # space.
25796  complete="$NM"
25797  path="${complete%% *}"
25798  tmp="$complete EOL"
25799  arguments="${tmp#* }"
25800
25801  # Input might be given as Windows format, start by converting to
25802  # unix format.
25803  new_path="$path"
25804
25805  windows_path="$new_path"
25806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25807    unix_path=`$CYGPATH -u "$windows_path"`
25808    new_path="$unix_path"
25809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25811    new_path="$unix_path"
25812  fi
25813
25814
25815  # Now try to locate executable using which
25816  new_path=`$WHICH "$new_path" 2> /dev/null`
25817
25818  if test "x$new_path" = x; then
25819    # Oops. Which didn't find the executable.
25820    # The splitting of arguments from the executable at a space might have been incorrect,
25821    # since paths with space are more likely in Windows. Give it another try with the whole
25822    # argument.
25823    path="$complete"
25824    arguments="EOL"
25825    new_path="$path"
25826
25827  windows_path="$new_path"
25828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25829    unix_path=`$CYGPATH -u "$windows_path"`
25830    new_path="$unix_path"
25831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25833    new_path="$unix_path"
25834  fi
25835
25836
25837    new_path=`$WHICH "$new_path" 2> /dev/null`
25838
25839    if test "x$new_path" = x; then
25840      # It's still not found. Now this is an unrecoverable error.
25841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25842$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25843      has_space=`$ECHO "$complete" | $GREP " "`
25844      if test "x$has_space" != x; then
25845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25847      fi
25848      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25849    fi
25850  fi
25851
25852  # Now new_path has a complete unix path to the binary
25853  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25854    # Keep paths in /bin as-is, but remove trailing .exe if any
25855    new_path="${new_path/%.exe/}"
25856    # Do not save /bin paths to all_fixpath_prefixes!
25857  else
25858    # Not in mixed or Windows style, start by that.
25859    new_path=`cmd //c echo $new_path`
25860
25861  input_path="$new_path"
25862  # Check if we need to convert this using DOS-style short mode. If the path
25863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25864  # take no chances and rewrite it.
25865  # Note: m4 eats our [], so we need to use [ and ] instead.
25866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25867  if test "x$has_forbidden_chars" != x; then
25868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25870  fi
25871
25872    # Output is in $new_path
25873
25874  windows_path="$new_path"
25875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25876    unix_path=`$CYGPATH -u "$windows_path"`
25877    new_path="$unix_path"
25878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25880    new_path="$unix_path"
25881  fi
25882
25883    # remove trailing .exe if any
25884    new_path="${new_path/%.exe/}"
25885
25886    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25887    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25888  fi
25889
25890  else
25891    # We're on a posix platform. Hooray! :)
25892    # First separate the path from the arguments. This will split at the first
25893    # space.
25894    complete="$NM"
25895    path="${complete%% *}"
25896    tmp="$complete EOL"
25897    arguments="${tmp#* }"
25898
25899    # Cannot rely on the command "which" here since it doesn't always work.
25900    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25901    if test -z "$is_absolute_path"; then
25902      # Path to executable is not absolute. Find it.
25903      IFS_save="$IFS"
25904      IFS=:
25905      for p in $PATH; do
25906        if test -f "$p/$path" && test -x "$p/$path"; then
25907          new_path="$p/$path"
25908          break
25909        fi
25910      done
25911      IFS="$IFS_save"
25912    else
25913      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25914$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25915      new_path="$path"
25916    fi
25917
25918    if test "x$new_path" = x; then
25919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25920$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25921        has_space=`$ECHO "$complete" | $GREP " "`
25922        if test "x$has_space" != x; then
25923          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25924$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25925        fi
25926        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25927      fi
25928  fi
25929
25930      # Now join together the path and the arguments once again
25931      if test "x$arguments" != xEOL; then
25932        new_complete="$new_path ${arguments% *}"
25933      else
25934        new_complete="$new_path"
25935      fi
25936
25937  if test "x$complete" != "x$new_complete"; then
25938      NM="$new_complete"
25939      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25940$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25941    fi
25942
25943    # Extract the first word of "gnm", so it can be a program name with args.
25944set dummy gnm; ac_word=$2
25945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25946$as_echo_n "checking for $ac_word... " >&6; }
25947if ${ac_cv_path_GNM+:} false; then :
25948  $as_echo_n "(cached) " >&6
25949else
25950  case $GNM in
25951  [\\/]* | ?:[\\/]*)
25952  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25953  ;;
25954  *)
25955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25956for as_dir in $PATH
25957do
25958  IFS=$as_save_IFS
25959  test -z "$as_dir" && as_dir=.
25960    for ac_exec_ext in '' $ac_executable_extensions; do
25961  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25962    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25964    break 2
25965  fi
25966done
25967  done
25968IFS=$as_save_IFS
25969
25970  ;;
25971esac
25972fi
25973GNM=$ac_cv_path_GNM
25974if test -n "$GNM"; then
25975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25976$as_echo "$GNM" >&6; }
25977else
25978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25979$as_echo "no" >&6; }
25980fi
25981
25982
25983
25984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25985
25986  # First separate the path from the arguments. This will split at the first
25987  # space.
25988  complete="$GNM"
25989  path="${complete%% *}"
25990  tmp="$complete EOL"
25991  arguments="${tmp#* }"
25992
25993  # Input might be given as Windows format, start by converting to
25994  # unix format.
25995  new_path=`$CYGPATH -u "$path"`
25996
25997  # Now try to locate executable using which
25998  new_path=`$WHICH "$new_path" 2> /dev/null`
25999  # bat and cmd files are not always considered executable in cygwin causing which
26000  # to not find them
26001  if test "x$new_path" = x \
26002           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26003           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26004    new_path=`$CYGPATH -u "$path"`
26005  fi
26006  if test "x$new_path" = x; then
26007    # Oops. Which didn't find the executable.
26008    # The splitting of arguments from the executable at a space might have been incorrect,
26009    # since paths with space are more likely in Windows. Give it another try with the whole
26010    # argument.
26011    path="$complete"
26012    arguments="EOL"
26013    new_path=`$CYGPATH -u "$path"`
26014    new_path=`$WHICH "$new_path" 2> /dev/null`
26015    # bat and cmd files are not always considered executable in cygwin causing which
26016    # to not find them
26017    if test "x$new_path" = x \
26018             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26019             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26020      new_path=`$CYGPATH -u "$path"`
26021    fi
26022    if test "x$new_path" = x; then
26023      # It's still not found. Now this is an unrecoverable error.
26024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26025$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26026      has_space=`$ECHO "$complete" | $GREP " "`
26027      if test "x$has_space" != x; then
26028        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26029$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26030      fi
26031      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26032    fi
26033  fi
26034
26035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26038  # "foo.exe" is OK but "foo" is an error.
26039  #
26040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26041  # It is also a way to make sure we got the proper file name for the real test later on.
26042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26043  if test "x$test_shortpath" = x; then
26044    # Short path failed, file does not exist as specified.
26045    # Try adding .exe or .cmd
26046    if test -f "${new_path}.exe"; then
26047       input_to_shortpath="${new_path}.exe"
26048    elif test -f "${new_path}.cmd"; then
26049       input_to_shortpath="${new_path}.cmd"
26050    else
26051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26052$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26053      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26054$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26055      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26056    fi
26057  else
26058    input_to_shortpath="$new_path"
26059  fi
26060
26061  # Call helper function which possibly converts this using DOS-style short mode.
26062  # If so, the updated path is stored in $new_path.
26063  new_path="$input_to_shortpath"
26064
26065  input_path="$input_to_shortpath"
26066  # Check if we need to convert this using DOS-style short mode. If the path
26067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26068  # take no chances and rewrite it.
26069  # Note: m4 eats our [], so we need to use [ and ] instead.
26070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26071  if test "x$has_forbidden_chars" != x; then
26072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26076      # Going to short mode and back again did indeed matter. Since short mode is
26077      # case insensitive, let's make it lowercase to improve readability.
26078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26079      # Now convert it back to Unix-stile (cygpath)
26080      input_path=`$CYGPATH -u "$shortmode_path"`
26081      new_path="$input_path"
26082    fi
26083  fi
26084
26085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26086  if test "x$test_cygdrive_prefix" = x; then
26087    # As a simple fix, exclude /usr/bin since it's not a real path.
26088    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26090      # a path prefixed by /cygdrive for fixpath to work.
26091      new_path="$CYGWIN_ROOT_PATH$input_path"
26092    fi
26093  fi
26094
26095  # remove trailing .exe if any
26096  new_path="${new_path/%.exe/}"
26097
26098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26099
26100  # First separate the path from the arguments. This will split at the first
26101  # space.
26102  complete="$GNM"
26103  path="${complete%% *}"
26104  tmp="$complete EOL"
26105  arguments="${tmp#* }"
26106
26107  # Input might be given as Windows format, start by converting to
26108  # unix format.
26109  new_path="$path"
26110
26111  windows_path="$new_path"
26112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26113    unix_path=`$CYGPATH -u "$windows_path"`
26114    new_path="$unix_path"
26115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26117    new_path="$unix_path"
26118  fi
26119
26120
26121  # Now try to locate executable using which
26122  new_path=`$WHICH "$new_path" 2> /dev/null`
26123
26124  if test "x$new_path" = x; then
26125    # Oops. Which didn't find the executable.
26126    # The splitting of arguments from the executable at a space might have been incorrect,
26127    # since paths with space are more likely in Windows. Give it another try with the whole
26128    # argument.
26129    path="$complete"
26130    arguments="EOL"
26131    new_path="$path"
26132
26133  windows_path="$new_path"
26134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26135    unix_path=`$CYGPATH -u "$windows_path"`
26136    new_path="$unix_path"
26137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26139    new_path="$unix_path"
26140  fi
26141
26142
26143    new_path=`$WHICH "$new_path" 2> /dev/null`
26144
26145    if test "x$new_path" = x; then
26146      # It's still not found. Now this is an unrecoverable error.
26147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26148$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26149      has_space=`$ECHO "$complete" | $GREP " "`
26150      if test "x$has_space" != x; then
26151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26153      fi
26154      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26155    fi
26156  fi
26157
26158  # Now new_path has a complete unix path to the binary
26159  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26160    # Keep paths in /bin as-is, but remove trailing .exe if any
26161    new_path="${new_path/%.exe/}"
26162    # Do not save /bin paths to all_fixpath_prefixes!
26163  else
26164    # Not in mixed or Windows style, start by that.
26165    new_path=`cmd //c echo $new_path`
26166
26167  input_path="$new_path"
26168  # Check if we need to convert this using DOS-style short mode. If the path
26169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26170  # take no chances and rewrite it.
26171  # Note: m4 eats our [], so we need to use [ and ] instead.
26172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26173  if test "x$has_forbidden_chars" != x; then
26174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26176  fi
26177
26178    # Output is in $new_path
26179
26180  windows_path="$new_path"
26181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26182    unix_path=`$CYGPATH -u "$windows_path"`
26183    new_path="$unix_path"
26184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26186    new_path="$unix_path"
26187  fi
26188
26189    # remove trailing .exe if any
26190    new_path="${new_path/%.exe/}"
26191
26192    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26193    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26194  fi
26195
26196  else
26197    # We're on a posix platform. Hooray! :)
26198    # First separate the path from the arguments. This will split at the first
26199    # space.
26200    complete="$GNM"
26201    path="${complete%% *}"
26202    tmp="$complete EOL"
26203    arguments="${tmp#* }"
26204
26205    # Cannot rely on the command "which" here since it doesn't always work.
26206    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26207    if test -z "$is_absolute_path"; then
26208      # Path to executable is not absolute. Find it.
26209      IFS_save="$IFS"
26210      IFS=:
26211      for p in $PATH; do
26212        if test -f "$p/$path" && test -x "$p/$path"; then
26213          new_path="$p/$path"
26214          break
26215        fi
26216      done
26217      IFS="$IFS_save"
26218    else
26219      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26220$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26221      new_path="$path"
26222    fi
26223
26224    if test "x$new_path" = x; then
26225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26226$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26227        has_space=`$ECHO "$complete" | $GREP " "`
26228        if test "x$has_space" != x; then
26229          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26230$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26231        fi
26232        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26233      fi
26234  fi
26235
26236      # Now join together the path and the arguments once again
26237      if test "x$arguments" != xEOL; then
26238        new_complete="$new_path ${arguments% *}"
26239      else
26240        new_complete="$new_path"
26241      fi
26242
26243  if test "x$complete" != "x$new_complete"; then
26244      GNM="$new_complete"
26245      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26246$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26247    fi
26248
26249    # Extract the first word of "strip", so it can be a program name with args.
26250set dummy strip; ac_word=$2
26251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26252$as_echo_n "checking for $ac_word... " >&6; }
26253if ${ac_cv_path_STRIP+:} false; then :
26254  $as_echo_n "(cached) " >&6
26255else
26256  case $STRIP in
26257  [\\/]* | ?:[\\/]*)
26258  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26259  ;;
26260  *)
26261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26262for as_dir in $PATH
26263do
26264  IFS=$as_save_IFS
26265  test -z "$as_dir" && as_dir=.
26266    for ac_exec_ext in '' $ac_executable_extensions; do
26267  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26268    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26270    break 2
26271  fi
26272done
26273  done
26274IFS=$as_save_IFS
26275
26276  ;;
26277esac
26278fi
26279STRIP=$ac_cv_path_STRIP
26280if test -n "$STRIP"; then
26281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26282$as_echo "$STRIP" >&6; }
26283else
26284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26285$as_echo "no" >&6; }
26286fi
26287
26288
26289
26290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26291
26292  # First separate the path from the arguments. This will split at the first
26293  # space.
26294  complete="$STRIP"
26295  path="${complete%% *}"
26296  tmp="$complete EOL"
26297  arguments="${tmp#* }"
26298
26299  # Input might be given as Windows format, start by converting to
26300  # unix format.
26301  new_path=`$CYGPATH -u "$path"`
26302
26303  # Now try to locate executable using which
26304  new_path=`$WHICH "$new_path" 2> /dev/null`
26305  # bat and cmd files are not always considered executable in cygwin causing which
26306  # to not find them
26307  if test "x$new_path" = x \
26308           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26309           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26310    new_path=`$CYGPATH -u "$path"`
26311  fi
26312  if test "x$new_path" = x; then
26313    # Oops. Which didn't find the executable.
26314    # The splitting of arguments from the executable at a space might have been incorrect,
26315    # since paths with space are more likely in Windows. Give it another try with the whole
26316    # argument.
26317    path="$complete"
26318    arguments="EOL"
26319    new_path=`$CYGPATH -u "$path"`
26320    new_path=`$WHICH "$new_path" 2> /dev/null`
26321    # bat and cmd files are not always considered executable in cygwin causing which
26322    # to not find them
26323    if test "x$new_path" = x \
26324             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26325             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26326      new_path=`$CYGPATH -u "$path"`
26327    fi
26328    if test "x$new_path" = x; then
26329      # It's still not found. Now this is an unrecoverable error.
26330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26331$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26332      has_space=`$ECHO "$complete" | $GREP " "`
26333      if test "x$has_space" != x; then
26334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26336      fi
26337      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26338    fi
26339  fi
26340
26341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26344  # "foo.exe" is OK but "foo" is an error.
26345  #
26346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26347  # It is also a way to make sure we got the proper file name for the real test later on.
26348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26349  if test "x$test_shortpath" = x; then
26350    # Short path failed, file does not exist as specified.
26351    # Try adding .exe or .cmd
26352    if test -f "${new_path}.exe"; then
26353       input_to_shortpath="${new_path}.exe"
26354    elif test -f "${new_path}.cmd"; then
26355       input_to_shortpath="${new_path}.cmd"
26356    else
26357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26358$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26359      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26360$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26361      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26362    fi
26363  else
26364    input_to_shortpath="$new_path"
26365  fi
26366
26367  # Call helper function which possibly converts this using DOS-style short mode.
26368  # If so, the updated path is stored in $new_path.
26369  new_path="$input_to_shortpath"
26370
26371  input_path="$input_to_shortpath"
26372  # Check if we need to convert this using DOS-style short mode. If the path
26373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26374  # take no chances and rewrite it.
26375  # Note: m4 eats our [], so we need to use [ and ] instead.
26376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26377  if test "x$has_forbidden_chars" != x; then
26378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26382      # Going to short mode and back again did indeed matter. Since short mode is
26383      # case insensitive, let's make it lowercase to improve readability.
26384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26385      # Now convert it back to Unix-stile (cygpath)
26386      input_path=`$CYGPATH -u "$shortmode_path"`
26387      new_path="$input_path"
26388    fi
26389  fi
26390
26391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26392  if test "x$test_cygdrive_prefix" = x; then
26393    # As a simple fix, exclude /usr/bin since it's not a real path.
26394    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26396      # a path prefixed by /cygdrive for fixpath to work.
26397      new_path="$CYGWIN_ROOT_PATH$input_path"
26398    fi
26399  fi
26400
26401  # remove trailing .exe if any
26402  new_path="${new_path/%.exe/}"
26403
26404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26405
26406  # First separate the path from the arguments. This will split at the first
26407  # space.
26408  complete="$STRIP"
26409  path="${complete%% *}"
26410  tmp="$complete EOL"
26411  arguments="${tmp#* }"
26412
26413  # Input might be given as Windows format, start by converting to
26414  # unix format.
26415  new_path="$path"
26416
26417  windows_path="$new_path"
26418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26419    unix_path=`$CYGPATH -u "$windows_path"`
26420    new_path="$unix_path"
26421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26423    new_path="$unix_path"
26424  fi
26425
26426
26427  # Now try to locate executable using which
26428  new_path=`$WHICH "$new_path" 2> /dev/null`
26429
26430  if test "x$new_path" = x; then
26431    # Oops. Which didn't find the executable.
26432    # The splitting of arguments from the executable at a space might have been incorrect,
26433    # since paths with space are more likely in Windows. Give it another try with the whole
26434    # argument.
26435    path="$complete"
26436    arguments="EOL"
26437    new_path="$path"
26438
26439  windows_path="$new_path"
26440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26441    unix_path=`$CYGPATH -u "$windows_path"`
26442    new_path="$unix_path"
26443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26445    new_path="$unix_path"
26446  fi
26447
26448
26449    new_path=`$WHICH "$new_path" 2> /dev/null`
26450
26451    if test "x$new_path" = x; then
26452      # It's still not found. Now this is an unrecoverable error.
26453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26454$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26455      has_space=`$ECHO "$complete" | $GREP " "`
26456      if test "x$has_space" != x; then
26457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26459      fi
26460      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26461    fi
26462  fi
26463
26464  # Now new_path has a complete unix path to the binary
26465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26466    # Keep paths in /bin as-is, but remove trailing .exe if any
26467    new_path="${new_path/%.exe/}"
26468    # Do not save /bin paths to all_fixpath_prefixes!
26469  else
26470    # Not in mixed or Windows style, start by that.
26471    new_path=`cmd //c echo $new_path`
26472
26473  input_path="$new_path"
26474  # Check if we need to convert this using DOS-style short mode. If the path
26475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26476  # take no chances and rewrite it.
26477  # Note: m4 eats our [], so we need to use [ and ] instead.
26478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26479  if test "x$has_forbidden_chars" != x; then
26480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26482  fi
26483
26484    # Output is in $new_path
26485
26486  windows_path="$new_path"
26487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26488    unix_path=`$CYGPATH -u "$windows_path"`
26489    new_path="$unix_path"
26490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26492    new_path="$unix_path"
26493  fi
26494
26495    # remove trailing .exe if any
26496    new_path="${new_path/%.exe/}"
26497
26498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26500  fi
26501
26502  else
26503    # We're on a posix platform. Hooray! :)
26504    # First separate the path from the arguments. This will split at the first
26505    # space.
26506    complete="$STRIP"
26507    path="${complete%% *}"
26508    tmp="$complete EOL"
26509    arguments="${tmp#* }"
26510
26511    # Cannot rely on the command "which" here since it doesn't always work.
26512    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26513    if test -z "$is_absolute_path"; then
26514      # Path to executable is not absolute. Find it.
26515      IFS_save="$IFS"
26516      IFS=:
26517      for p in $PATH; do
26518        if test -f "$p/$path" && test -x "$p/$path"; then
26519          new_path="$p/$path"
26520          break
26521        fi
26522      done
26523      IFS="$IFS_save"
26524    else
26525      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26526$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26527      new_path="$path"
26528    fi
26529
26530    if test "x$new_path" = x; then
26531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26532$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26533        has_space=`$ECHO "$complete" | $GREP " "`
26534        if test "x$has_space" != x; then
26535          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26536$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26537        fi
26538        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26539      fi
26540  fi
26541
26542      # Now join together the path and the arguments once again
26543      if test "x$arguments" != xEOL; then
26544        new_complete="$new_path ${arguments% *}"
26545      else
26546        new_complete="$new_path"
26547      fi
26548
26549  if test "x$complete" != "x$new_complete"; then
26550      STRIP="$new_complete"
26551      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26552$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26553    fi
26554
26555    # Extract the first word of "mcs", so it can be a program name with args.
26556set dummy mcs; ac_word=$2
26557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26558$as_echo_n "checking for $ac_word... " >&6; }
26559if ${ac_cv_path_MCS+:} false; then :
26560  $as_echo_n "(cached) " >&6
26561else
26562  case $MCS in
26563  [\\/]* | ?:[\\/]*)
26564  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26565  ;;
26566  *)
26567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26568for as_dir in $PATH
26569do
26570  IFS=$as_save_IFS
26571  test -z "$as_dir" && as_dir=.
26572    for ac_exec_ext in '' $ac_executable_extensions; do
26573  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26574    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26576    break 2
26577  fi
26578done
26579  done
26580IFS=$as_save_IFS
26581
26582  ;;
26583esac
26584fi
26585MCS=$ac_cv_path_MCS
26586if test -n "$MCS"; then
26587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26588$as_echo "$MCS" >&6; }
26589else
26590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26591$as_echo "no" >&6; }
26592fi
26593
26594
26595
26596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26597
26598  # First separate the path from the arguments. This will split at the first
26599  # space.
26600  complete="$MCS"
26601  path="${complete%% *}"
26602  tmp="$complete EOL"
26603  arguments="${tmp#* }"
26604
26605  # Input might be given as Windows format, start by converting to
26606  # unix format.
26607  new_path=`$CYGPATH -u "$path"`
26608
26609  # Now try to locate executable using which
26610  new_path=`$WHICH "$new_path" 2> /dev/null`
26611  # bat and cmd files are not always considered executable in cygwin causing which
26612  # to not find them
26613  if test "x$new_path" = x \
26614           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26615           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26616    new_path=`$CYGPATH -u "$path"`
26617  fi
26618  if test "x$new_path" = x; then
26619    # Oops. Which didn't find the executable.
26620    # The splitting of arguments from the executable at a space might have been incorrect,
26621    # since paths with space are more likely in Windows. Give it another try with the whole
26622    # argument.
26623    path="$complete"
26624    arguments="EOL"
26625    new_path=`$CYGPATH -u "$path"`
26626    new_path=`$WHICH "$new_path" 2> /dev/null`
26627    # bat and cmd files are not always considered executable in cygwin causing which
26628    # to not find them
26629    if test "x$new_path" = x \
26630             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26631             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26632      new_path=`$CYGPATH -u "$path"`
26633    fi
26634    if test "x$new_path" = x; then
26635      # It's still not found. Now this is an unrecoverable error.
26636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26637$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26638      has_space=`$ECHO "$complete" | $GREP " "`
26639      if test "x$has_space" != x; then
26640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26642      fi
26643      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26644    fi
26645  fi
26646
26647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26650  # "foo.exe" is OK but "foo" is an error.
26651  #
26652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26653  # It is also a way to make sure we got the proper file name for the real test later on.
26654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26655  if test "x$test_shortpath" = x; then
26656    # Short path failed, file does not exist as specified.
26657    # Try adding .exe or .cmd
26658    if test -f "${new_path}.exe"; then
26659       input_to_shortpath="${new_path}.exe"
26660    elif test -f "${new_path}.cmd"; then
26661       input_to_shortpath="${new_path}.cmd"
26662    else
26663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26664$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26665      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26666$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26667      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26668    fi
26669  else
26670    input_to_shortpath="$new_path"
26671  fi
26672
26673  # Call helper function which possibly converts this using DOS-style short mode.
26674  # If so, the updated path is stored in $new_path.
26675  new_path="$input_to_shortpath"
26676
26677  input_path="$input_to_shortpath"
26678  # Check if we need to convert this using DOS-style short mode. If the path
26679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26680  # take no chances and rewrite it.
26681  # Note: m4 eats our [], so we need to use [ and ] instead.
26682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26683  if test "x$has_forbidden_chars" != x; then
26684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26688      # Going to short mode and back again did indeed matter. Since short mode is
26689      # case insensitive, let's make it lowercase to improve readability.
26690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26691      # Now convert it back to Unix-stile (cygpath)
26692      input_path=`$CYGPATH -u "$shortmode_path"`
26693      new_path="$input_path"
26694    fi
26695  fi
26696
26697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26698  if test "x$test_cygdrive_prefix" = x; then
26699    # As a simple fix, exclude /usr/bin since it's not a real path.
26700    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26702      # a path prefixed by /cygdrive for fixpath to work.
26703      new_path="$CYGWIN_ROOT_PATH$input_path"
26704    fi
26705  fi
26706
26707  # remove trailing .exe if any
26708  new_path="${new_path/%.exe/}"
26709
26710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26711
26712  # First separate the path from the arguments. This will split at the first
26713  # space.
26714  complete="$MCS"
26715  path="${complete%% *}"
26716  tmp="$complete EOL"
26717  arguments="${tmp#* }"
26718
26719  # Input might be given as Windows format, start by converting to
26720  # unix format.
26721  new_path="$path"
26722
26723  windows_path="$new_path"
26724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26725    unix_path=`$CYGPATH -u "$windows_path"`
26726    new_path="$unix_path"
26727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26729    new_path="$unix_path"
26730  fi
26731
26732
26733  # Now try to locate executable using which
26734  new_path=`$WHICH "$new_path" 2> /dev/null`
26735
26736  if test "x$new_path" = x; then
26737    # Oops. Which didn't find the executable.
26738    # The splitting of arguments from the executable at a space might have been incorrect,
26739    # since paths with space are more likely in Windows. Give it another try with the whole
26740    # argument.
26741    path="$complete"
26742    arguments="EOL"
26743    new_path="$path"
26744
26745  windows_path="$new_path"
26746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26747    unix_path=`$CYGPATH -u "$windows_path"`
26748    new_path="$unix_path"
26749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26751    new_path="$unix_path"
26752  fi
26753
26754
26755    new_path=`$WHICH "$new_path" 2> /dev/null`
26756
26757    if test "x$new_path" = x; then
26758      # It's still not found. Now this is an unrecoverable error.
26759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26760$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26761      has_space=`$ECHO "$complete" | $GREP " "`
26762      if test "x$has_space" != x; then
26763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26765      fi
26766      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26767    fi
26768  fi
26769
26770  # Now new_path has a complete unix path to the binary
26771  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26772    # Keep paths in /bin as-is, but remove trailing .exe if any
26773    new_path="${new_path/%.exe/}"
26774    # Do not save /bin paths to all_fixpath_prefixes!
26775  else
26776    # Not in mixed or Windows style, start by that.
26777    new_path=`cmd //c echo $new_path`
26778
26779  input_path="$new_path"
26780  # Check if we need to convert this using DOS-style short mode. If the path
26781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26782  # take no chances and rewrite it.
26783  # Note: m4 eats our [], so we need to use [ and ] instead.
26784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26785  if test "x$has_forbidden_chars" != x; then
26786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26788  fi
26789
26790    # Output is in $new_path
26791
26792  windows_path="$new_path"
26793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26794    unix_path=`$CYGPATH -u "$windows_path"`
26795    new_path="$unix_path"
26796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26798    new_path="$unix_path"
26799  fi
26800
26801    # remove trailing .exe if any
26802    new_path="${new_path/%.exe/}"
26803
26804    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26805    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26806  fi
26807
26808  else
26809    # We're on a posix platform. Hooray! :)
26810    # First separate the path from the arguments. This will split at the first
26811    # space.
26812    complete="$MCS"
26813    path="${complete%% *}"
26814    tmp="$complete EOL"
26815    arguments="${tmp#* }"
26816
26817    # Cannot rely on the command "which" here since it doesn't always work.
26818    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26819    if test -z "$is_absolute_path"; then
26820      # Path to executable is not absolute. Find it.
26821      IFS_save="$IFS"
26822      IFS=:
26823      for p in $PATH; do
26824        if test -f "$p/$path" && test -x "$p/$path"; then
26825          new_path="$p/$path"
26826          break
26827        fi
26828      done
26829      IFS="$IFS_save"
26830    else
26831      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26832$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26833      new_path="$path"
26834    fi
26835
26836    if test "x$new_path" = x; then
26837        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26838$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26839        has_space=`$ECHO "$complete" | $GREP " "`
26840        if test "x$has_space" != x; then
26841          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26842$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26843        fi
26844        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26845      fi
26846  fi
26847
26848      # Now join together the path and the arguments once again
26849      if test "x$arguments" != xEOL; then
26850        new_complete="$new_path ${arguments% *}"
26851      else
26852        new_complete="$new_path"
26853      fi
26854
26855  if test "x$complete" != "x$new_complete"; then
26856      MCS="$new_complete"
26857      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26858$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26859    fi
26860
26861elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26862    if test -n "$ac_tool_prefix"; then
26863  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26864set dummy ${ac_tool_prefix}nm; ac_word=$2
26865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26866$as_echo_n "checking for $ac_word... " >&6; }
26867if ${ac_cv_prog_NM+:} false; then :
26868  $as_echo_n "(cached) " >&6
26869else
26870  if test -n "$NM"; then
26871  ac_cv_prog_NM="$NM" # Let the user override the test.
26872else
26873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26874for as_dir in $PATH
26875do
26876  IFS=$as_save_IFS
26877  test -z "$as_dir" && as_dir=.
26878    for ac_exec_ext in '' $ac_executable_extensions; do
26879  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26880    ac_cv_prog_NM="${ac_tool_prefix}nm"
26881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26882    break 2
26883  fi
26884done
26885  done
26886IFS=$as_save_IFS
26887
26888fi
26889fi
26890NM=$ac_cv_prog_NM
26891if test -n "$NM"; then
26892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26893$as_echo "$NM" >&6; }
26894else
26895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26896$as_echo "no" >&6; }
26897fi
26898
26899
26900fi
26901if test -z "$ac_cv_prog_NM"; then
26902  ac_ct_NM=$NM
26903  # Extract the first word of "nm", so it can be a program name with args.
26904set dummy nm; ac_word=$2
26905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26906$as_echo_n "checking for $ac_word... " >&6; }
26907if ${ac_cv_prog_ac_ct_NM+:} false; then :
26908  $as_echo_n "(cached) " >&6
26909else
26910  if test -n "$ac_ct_NM"; then
26911  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26912else
26913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26914for as_dir in $PATH
26915do
26916  IFS=$as_save_IFS
26917  test -z "$as_dir" && as_dir=.
26918    for ac_exec_ext in '' $ac_executable_extensions; do
26919  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26920    ac_cv_prog_ac_ct_NM="nm"
26921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26922    break 2
26923  fi
26924done
26925  done
26926IFS=$as_save_IFS
26927
26928fi
26929fi
26930ac_ct_NM=$ac_cv_prog_ac_ct_NM
26931if test -n "$ac_ct_NM"; then
26932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26933$as_echo "$ac_ct_NM" >&6; }
26934else
26935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26936$as_echo "no" >&6; }
26937fi
26938
26939  if test "x$ac_ct_NM" = x; then
26940    NM=""
26941  else
26942    case $cross_compiling:$ac_tool_warned in
26943yes:)
26944{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26945$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26946ac_tool_warned=yes ;;
26947esac
26948    NM=$ac_ct_NM
26949  fi
26950else
26951  NM="$ac_cv_prog_NM"
26952fi
26953
26954
26955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26956
26957  # First separate the path from the arguments. This will split at the first
26958  # space.
26959  complete="$NM"
26960  path="${complete%% *}"
26961  tmp="$complete EOL"
26962  arguments="${tmp#* }"
26963
26964  # Input might be given as Windows format, start by converting to
26965  # unix format.
26966  new_path=`$CYGPATH -u "$path"`
26967
26968  # Now try to locate executable using which
26969  new_path=`$WHICH "$new_path" 2> /dev/null`
26970  # bat and cmd files are not always considered executable in cygwin causing which
26971  # to not find them
26972  if test "x$new_path" = x \
26973           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26974           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26975    new_path=`$CYGPATH -u "$path"`
26976  fi
26977  if test "x$new_path" = x; then
26978    # Oops. Which didn't find the executable.
26979    # The splitting of arguments from the executable at a space might have been incorrect,
26980    # since paths with space are more likely in Windows. Give it another try with the whole
26981    # argument.
26982    path="$complete"
26983    arguments="EOL"
26984    new_path=`$CYGPATH -u "$path"`
26985    new_path=`$WHICH "$new_path" 2> /dev/null`
26986    # bat and cmd files are not always considered executable in cygwin causing which
26987    # to not find them
26988    if test "x$new_path" = x \
26989             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26990             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26991      new_path=`$CYGPATH -u "$path"`
26992    fi
26993    if test "x$new_path" = x; then
26994      # It's still not found. Now this is an unrecoverable error.
26995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26996$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26997      has_space=`$ECHO "$complete" | $GREP " "`
26998      if test "x$has_space" != x; then
26999        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27000$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27001      fi
27002      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27003    fi
27004  fi
27005
27006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27009  # "foo.exe" is OK but "foo" is an error.
27010  #
27011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27012  # It is also a way to make sure we got the proper file name for the real test later on.
27013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27014  if test "x$test_shortpath" = x; then
27015    # Short path failed, file does not exist as specified.
27016    # Try adding .exe or .cmd
27017    if test -f "${new_path}.exe"; then
27018       input_to_shortpath="${new_path}.exe"
27019    elif test -f "${new_path}.cmd"; then
27020       input_to_shortpath="${new_path}.cmd"
27021    else
27022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27023$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27024      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27025$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27026      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27027    fi
27028  else
27029    input_to_shortpath="$new_path"
27030  fi
27031
27032  # Call helper function which possibly converts this using DOS-style short mode.
27033  # If so, the updated path is stored in $new_path.
27034  new_path="$input_to_shortpath"
27035
27036  input_path="$input_to_shortpath"
27037  # Check if we need to convert this using DOS-style short mode. If the path
27038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27039  # take no chances and rewrite it.
27040  # Note: m4 eats our [], so we need to use [ and ] instead.
27041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27042  if test "x$has_forbidden_chars" != x; then
27043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27047      # Going to short mode and back again did indeed matter. Since short mode is
27048      # case insensitive, let's make it lowercase to improve readability.
27049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27050      # Now convert it back to Unix-stile (cygpath)
27051      input_path=`$CYGPATH -u "$shortmode_path"`
27052      new_path="$input_path"
27053    fi
27054  fi
27055
27056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27057  if test "x$test_cygdrive_prefix" = x; then
27058    # As a simple fix, exclude /usr/bin since it's not a real path.
27059    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27061      # a path prefixed by /cygdrive for fixpath to work.
27062      new_path="$CYGWIN_ROOT_PATH$input_path"
27063    fi
27064  fi
27065
27066  # remove trailing .exe if any
27067  new_path="${new_path/%.exe/}"
27068
27069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27070
27071  # First separate the path from the arguments. This will split at the first
27072  # space.
27073  complete="$NM"
27074  path="${complete%% *}"
27075  tmp="$complete EOL"
27076  arguments="${tmp#* }"
27077
27078  # Input might be given as Windows format, start by converting to
27079  # unix format.
27080  new_path="$path"
27081
27082  windows_path="$new_path"
27083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27084    unix_path=`$CYGPATH -u "$windows_path"`
27085    new_path="$unix_path"
27086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27088    new_path="$unix_path"
27089  fi
27090
27091
27092  # Now try to locate executable using which
27093  new_path=`$WHICH "$new_path" 2> /dev/null`
27094
27095  if test "x$new_path" = x; then
27096    # Oops. Which didn't find the executable.
27097    # The splitting of arguments from the executable at a space might have been incorrect,
27098    # since paths with space are more likely in Windows. Give it another try with the whole
27099    # argument.
27100    path="$complete"
27101    arguments="EOL"
27102    new_path="$path"
27103
27104  windows_path="$new_path"
27105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27106    unix_path=`$CYGPATH -u "$windows_path"`
27107    new_path="$unix_path"
27108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27110    new_path="$unix_path"
27111  fi
27112
27113
27114    new_path=`$WHICH "$new_path" 2> /dev/null`
27115
27116    if test "x$new_path" = x; then
27117      # It's still not found. Now this is an unrecoverable error.
27118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27119$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27120      has_space=`$ECHO "$complete" | $GREP " "`
27121      if test "x$has_space" != x; then
27122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27124      fi
27125      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27126    fi
27127  fi
27128
27129  # Now new_path has a complete unix path to the binary
27130  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27131    # Keep paths in /bin as-is, but remove trailing .exe if any
27132    new_path="${new_path/%.exe/}"
27133    # Do not save /bin paths to all_fixpath_prefixes!
27134  else
27135    # Not in mixed or Windows style, start by that.
27136    new_path=`cmd //c echo $new_path`
27137
27138  input_path="$new_path"
27139  # Check if we need to convert this using DOS-style short mode. If the path
27140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27141  # take no chances and rewrite it.
27142  # Note: m4 eats our [], so we need to use [ and ] instead.
27143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27144  if test "x$has_forbidden_chars" != x; then
27145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27147  fi
27148
27149    # Output is in $new_path
27150
27151  windows_path="$new_path"
27152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27153    unix_path=`$CYGPATH -u "$windows_path"`
27154    new_path="$unix_path"
27155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27157    new_path="$unix_path"
27158  fi
27159
27160    # remove trailing .exe if any
27161    new_path="${new_path/%.exe/}"
27162
27163    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27164    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27165  fi
27166
27167  else
27168    # We're on a posix platform. Hooray! :)
27169    # First separate the path from the arguments. This will split at the first
27170    # space.
27171    complete="$NM"
27172    path="${complete%% *}"
27173    tmp="$complete EOL"
27174    arguments="${tmp#* }"
27175
27176    # Cannot rely on the command "which" here since it doesn't always work.
27177    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27178    if test -z "$is_absolute_path"; then
27179      # Path to executable is not absolute. Find it.
27180      IFS_save="$IFS"
27181      IFS=:
27182      for p in $PATH; do
27183        if test -f "$p/$path" && test -x "$p/$path"; then
27184          new_path="$p/$path"
27185          break
27186        fi
27187      done
27188      IFS="$IFS_save"
27189    else
27190      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27191$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27192      new_path="$path"
27193    fi
27194
27195    if test "x$new_path" = x; then
27196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27197$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27198        has_space=`$ECHO "$complete" | $GREP " "`
27199        if test "x$has_space" != x; then
27200          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27201$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27202        fi
27203        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27204      fi
27205  fi
27206
27207      # Now join together the path and the arguments once again
27208      if test "x$arguments" != xEOL; then
27209        new_complete="$new_path ${arguments% *}"
27210      else
27211        new_complete="$new_path"
27212      fi
27213
27214  if test "x$complete" != "x$new_complete"; then
27215      NM="$new_complete"
27216      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27217$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27218    fi
27219
27220    GNM="$NM"
27221
27222    if test -n "$ac_tool_prefix"; then
27223  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27224set dummy ${ac_tool_prefix}strip; ac_word=$2
27225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27226$as_echo_n "checking for $ac_word... " >&6; }
27227if ${ac_cv_prog_STRIP+:} false; then :
27228  $as_echo_n "(cached) " >&6
27229else
27230  if test -n "$STRIP"; then
27231  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27232else
27233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27234for as_dir in $PATH
27235do
27236  IFS=$as_save_IFS
27237  test -z "$as_dir" && as_dir=.
27238    for ac_exec_ext in '' $ac_executable_extensions; do
27239  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27240    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27242    break 2
27243  fi
27244done
27245  done
27246IFS=$as_save_IFS
27247
27248fi
27249fi
27250STRIP=$ac_cv_prog_STRIP
27251if test -n "$STRIP"; then
27252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27253$as_echo "$STRIP" >&6; }
27254else
27255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27256$as_echo "no" >&6; }
27257fi
27258
27259
27260fi
27261if test -z "$ac_cv_prog_STRIP"; then
27262  ac_ct_STRIP=$STRIP
27263  # Extract the first word of "strip", so it can be a program name with args.
27264set dummy strip; ac_word=$2
27265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27266$as_echo_n "checking for $ac_word... " >&6; }
27267if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27268  $as_echo_n "(cached) " >&6
27269else
27270  if test -n "$ac_ct_STRIP"; then
27271  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27272else
27273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27274for as_dir in $PATH
27275do
27276  IFS=$as_save_IFS
27277  test -z "$as_dir" && as_dir=.
27278    for ac_exec_ext in '' $ac_executable_extensions; do
27279  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27280    ac_cv_prog_ac_ct_STRIP="strip"
27281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27282    break 2
27283  fi
27284done
27285  done
27286IFS=$as_save_IFS
27287
27288fi
27289fi
27290ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27291if test -n "$ac_ct_STRIP"; then
27292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27293$as_echo "$ac_ct_STRIP" >&6; }
27294else
27295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27296$as_echo "no" >&6; }
27297fi
27298
27299  if test "x$ac_ct_STRIP" = x; then
27300    STRIP=""
27301  else
27302    case $cross_compiling:$ac_tool_warned in
27303yes:)
27304{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27305$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27306ac_tool_warned=yes ;;
27307esac
27308    STRIP=$ac_ct_STRIP
27309  fi
27310else
27311  STRIP="$ac_cv_prog_STRIP"
27312fi
27313
27314
27315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27316
27317  # First separate the path from the arguments. This will split at the first
27318  # space.
27319  complete="$STRIP"
27320  path="${complete%% *}"
27321  tmp="$complete EOL"
27322  arguments="${tmp#* }"
27323
27324  # Input might be given as Windows format, start by converting to
27325  # unix format.
27326  new_path=`$CYGPATH -u "$path"`
27327
27328  # Now try to locate executable using which
27329  new_path=`$WHICH "$new_path" 2> /dev/null`
27330  # bat and cmd files are not always considered executable in cygwin causing which
27331  # to not find them
27332  if test "x$new_path" = x \
27333           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27334           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27335    new_path=`$CYGPATH -u "$path"`
27336  fi
27337  if test "x$new_path" = x; then
27338    # Oops. Which didn't find the executable.
27339    # The splitting of arguments from the executable at a space might have been incorrect,
27340    # since paths with space are more likely in Windows. Give it another try with the whole
27341    # argument.
27342    path="$complete"
27343    arguments="EOL"
27344    new_path=`$CYGPATH -u "$path"`
27345    new_path=`$WHICH "$new_path" 2> /dev/null`
27346    # bat and cmd files are not always considered executable in cygwin causing which
27347    # to not find them
27348    if test "x$new_path" = x \
27349             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27350             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27351      new_path=`$CYGPATH -u "$path"`
27352    fi
27353    if test "x$new_path" = x; then
27354      # It's still not found. Now this is an unrecoverable error.
27355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27356$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27357      has_space=`$ECHO "$complete" | $GREP " "`
27358      if test "x$has_space" != x; then
27359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27361      fi
27362      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27363    fi
27364  fi
27365
27366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27369  # "foo.exe" is OK but "foo" is an error.
27370  #
27371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27372  # It is also a way to make sure we got the proper file name for the real test later on.
27373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27374  if test "x$test_shortpath" = x; then
27375    # Short path failed, file does not exist as specified.
27376    # Try adding .exe or .cmd
27377    if test -f "${new_path}.exe"; then
27378       input_to_shortpath="${new_path}.exe"
27379    elif test -f "${new_path}.cmd"; then
27380       input_to_shortpath="${new_path}.cmd"
27381    else
27382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27383$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27384      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27385$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27386      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27387    fi
27388  else
27389    input_to_shortpath="$new_path"
27390  fi
27391
27392  # Call helper function which possibly converts this using DOS-style short mode.
27393  # If so, the updated path is stored in $new_path.
27394  new_path="$input_to_shortpath"
27395
27396  input_path="$input_to_shortpath"
27397  # Check if we need to convert this using DOS-style short mode. If the path
27398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27399  # take no chances and rewrite it.
27400  # Note: m4 eats our [], so we need to use [ and ] instead.
27401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27402  if test "x$has_forbidden_chars" != x; then
27403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27407      # Going to short mode and back again did indeed matter. Since short mode is
27408      # case insensitive, let's make it lowercase to improve readability.
27409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27410      # Now convert it back to Unix-stile (cygpath)
27411      input_path=`$CYGPATH -u "$shortmode_path"`
27412      new_path="$input_path"
27413    fi
27414  fi
27415
27416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27417  if test "x$test_cygdrive_prefix" = x; then
27418    # As a simple fix, exclude /usr/bin since it's not a real path.
27419    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27421      # a path prefixed by /cygdrive for fixpath to work.
27422      new_path="$CYGWIN_ROOT_PATH$input_path"
27423    fi
27424  fi
27425
27426  # remove trailing .exe if any
27427  new_path="${new_path/%.exe/}"
27428
27429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27430
27431  # First separate the path from the arguments. This will split at the first
27432  # space.
27433  complete="$STRIP"
27434  path="${complete%% *}"
27435  tmp="$complete EOL"
27436  arguments="${tmp#* }"
27437
27438  # Input might be given as Windows format, start by converting to
27439  # unix format.
27440  new_path="$path"
27441
27442  windows_path="$new_path"
27443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27444    unix_path=`$CYGPATH -u "$windows_path"`
27445    new_path="$unix_path"
27446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27448    new_path="$unix_path"
27449  fi
27450
27451
27452  # Now try to locate executable using which
27453  new_path=`$WHICH "$new_path" 2> /dev/null`
27454
27455  if test "x$new_path" = x; then
27456    # Oops. Which didn't find the executable.
27457    # The splitting of arguments from the executable at a space might have been incorrect,
27458    # since paths with space are more likely in Windows. Give it another try with the whole
27459    # argument.
27460    path="$complete"
27461    arguments="EOL"
27462    new_path="$path"
27463
27464  windows_path="$new_path"
27465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27466    unix_path=`$CYGPATH -u "$windows_path"`
27467    new_path="$unix_path"
27468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27470    new_path="$unix_path"
27471  fi
27472
27473
27474    new_path=`$WHICH "$new_path" 2> /dev/null`
27475
27476    if test "x$new_path" = x; then
27477      # It's still not found. Now this is an unrecoverable error.
27478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27479$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27480      has_space=`$ECHO "$complete" | $GREP " "`
27481      if test "x$has_space" != x; then
27482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27484      fi
27485      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27486    fi
27487  fi
27488
27489  # Now new_path has a complete unix path to the binary
27490  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27491    # Keep paths in /bin as-is, but remove trailing .exe if any
27492    new_path="${new_path/%.exe/}"
27493    # Do not save /bin paths to all_fixpath_prefixes!
27494  else
27495    # Not in mixed or Windows style, start by that.
27496    new_path=`cmd //c echo $new_path`
27497
27498  input_path="$new_path"
27499  # Check if we need to convert this using DOS-style short mode. If the path
27500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27501  # take no chances and rewrite it.
27502  # Note: m4 eats our [], so we need to use [ and ] instead.
27503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27504  if test "x$has_forbidden_chars" != x; then
27505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27507  fi
27508
27509    # Output is in $new_path
27510
27511  windows_path="$new_path"
27512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27513    unix_path=`$CYGPATH -u "$windows_path"`
27514    new_path="$unix_path"
27515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27517    new_path="$unix_path"
27518  fi
27519
27520    # remove trailing .exe if any
27521    new_path="${new_path/%.exe/}"
27522
27523    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27524    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27525  fi
27526
27527  else
27528    # We're on a posix platform. Hooray! :)
27529    # First separate the path from the arguments. This will split at the first
27530    # space.
27531    complete="$STRIP"
27532    path="${complete%% *}"
27533    tmp="$complete EOL"
27534    arguments="${tmp#* }"
27535
27536    # Cannot rely on the command "which" here since it doesn't always work.
27537    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27538    if test -z "$is_absolute_path"; then
27539      # Path to executable is not absolute. Find it.
27540      IFS_save="$IFS"
27541      IFS=:
27542      for p in $PATH; do
27543        if test -f "$p/$path" && test -x "$p/$path"; then
27544          new_path="$p/$path"
27545          break
27546        fi
27547      done
27548      IFS="$IFS_save"
27549    else
27550      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27551$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27552      new_path="$path"
27553    fi
27554
27555    if test "x$new_path" = x; then
27556        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27557$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27558        has_space=`$ECHO "$complete" | $GREP " "`
27559        if test "x$has_space" != x; then
27560          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27561$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27562        fi
27563        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27564      fi
27565  fi
27566
27567      # Now join together the path and the arguments once again
27568      if test "x$arguments" != xEOL; then
27569        new_complete="$new_path ${arguments% *}"
27570      else
27571        new_complete="$new_path"
27572      fi
27573
27574  if test "x$complete" != "x$new_complete"; then
27575      STRIP="$new_complete"
27576      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27577$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27578    fi
27579
27580fi
27581
27582# objcopy is used for moving debug symbols to separate files when
27583# full debug symbols are enabled.
27584if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27585    if test -n "$ac_tool_prefix"; then
27586  for ac_prog in gobjcopy objcopy
27587  do
27588    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27589set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27591$as_echo_n "checking for $ac_word... " >&6; }
27592if ${ac_cv_prog_OBJCOPY+:} false; then :
27593  $as_echo_n "(cached) " >&6
27594else
27595  if test -n "$OBJCOPY"; then
27596  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27597else
27598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27599for as_dir in $PATH
27600do
27601  IFS=$as_save_IFS
27602  test -z "$as_dir" && as_dir=.
27603    for ac_exec_ext in '' $ac_executable_extensions; do
27604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27605    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27607    break 2
27608  fi
27609done
27610  done
27611IFS=$as_save_IFS
27612
27613fi
27614fi
27615OBJCOPY=$ac_cv_prog_OBJCOPY
27616if test -n "$OBJCOPY"; then
27617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27618$as_echo "$OBJCOPY" >&6; }
27619else
27620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27621$as_echo "no" >&6; }
27622fi
27623
27624
27625    test -n "$OBJCOPY" && break
27626  done
27627fi
27628if test -z "$OBJCOPY"; then
27629  ac_ct_OBJCOPY=$OBJCOPY
27630  for ac_prog in gobjcopy objcopy
27631do
27632  # Extract the first word of "$ac_prog", so it can be a program name with args.
27633set dummy $ac_prog; ac_word=$2
27634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27635$as_echo_n "checking for $ac_word... " >&6; }
27636if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27637  $as_echo_n "(cached) " >&6
27638else
27639  if test -n "$ac_ct_OBJCOPY"; then
27640  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27641else
27642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27643for as_dir in $PATH
27644do
27645  IFS=$as_save_IFS
27646  test -z "$as_dir" && as_dir=.
27647    for ac_exec_ext in '' $ac_executable_extensions; do
27648  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27649    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27651    break 2
27652  fi
27653done
27654  done
27655IFS=$as_save_IFS
27656
27657fi
27658fi
27659ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27660if test -n "$ac_ct_OBJCOPY"; then
27661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27662$as_echo "$ac_ct_OBJCOPY" >&6; }
27663else
27664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27665$as_echo "no" >&6; }
27666fi
27667
27668
27669  test -n "$ac_ct_OBJCOPY" && break
27670done
27671
27672  if test "x$ac_ct_OBJCOPY" = x; then
27673    OBJCOPY=""
27674  else
27675    case $cross_compiling:$ac_tool_warned in
27676yes:)
27677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27679ac_tool_warned=yes ;;
27680esac
27681    OBJCOPY=$ac_ct_OBJCOPY
27682  fi
27683fi
27684
27685    # Only call fixup if objcopy was found.
27686    if test -n "$OBJCOPY"; then
27687
27688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27689
27690  # First separate the path from the arguments. This will split at the first
27691  # space.
27692  complete="$OBJCOPY"
27693  path="${complete%% *}"
27694  tmp="$complete EOL"
27695  arguments="${tmp#* }"
27696
27697  # Input might be given as Windows format, start by converting to
27698  # unix format.
27699  new_path=`$CYGPATH -u "$path"`
27700
27701  # Now try to locate executable using which
27702  new_path=`$WHICH "$new_path" 2> /dev/null`
27703  # bat and cmd files are not always considered executable in cygwin causing which
27704  # to not find them
27705  if test "x$new_path" = x \
27706           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27707           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27708    new_path=`$CYGPATH -u "$path"`
27709  fi
27710  if test "x$new_path" = x; then
27711    # Oops. Which didn't find the executable.
27712    # The splitting of arguments from the executable at a space might have been incorrect,
27713    # since paths with space are more likely in Windows. Give it another try with the whole
27714    # argument.
27715    path="$complete"
27716    arguments="EOL"
27717    new_path=`$CYGPATH -u "$path"`
27718    new_path=`$WHICH "$new_path" 2> /dev/null`
27719    # bat and cmd files are not always considered executable in cygwin causing which
27720    # to not find them
27721    if test "x$new_path" = x \
27722             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27723             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27724      new_path=`$CYGPATH -u "$path"`
27725    fi
27726    if test "x$new_path" = x; then
27727      # It's still not found. Now this is an unrecoverable error.
27728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27729$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27730      has_space=`$ECHO "$complete" | $GREP " "`
27731      if test "x$has_space" != x; then
27732        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27733$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27734      fi
27735      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27736    fi
27737  fi
27738
27739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27742  # "foo.exe" is OK but "foo" is an error.
27743  #
27744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27745  # It is also a way to make sure we got the proper file name for the real test later on.
27746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27747  if test "x$test_shortpath" = x; then
27748    # Short path failed, file does not exist as specified.
27749    # Try adding .exe or .cmd
27750    if test -f "${new_path}.exe"; then
27751       input_to_shortpath="${new_path}.exe"
27752    elif test -f "${new_path}.cmd"; then
27753       input_to_shortpath="${new_path}.cmd"
27754    else
27755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27756$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27757      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27758$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27759      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27760    fi
27761  else
27762    input_to_shortpath="$new_path"
27763  fi
27764
27765  # Call helper function which possibly converts this using DOS-style short mode.
27766  # If so, the updated path is stored in $new_path.
27767  new_path="$input_to_shortpath"
27768
27769  input_path="$input_to_shortpath"
27770  # Check if we need to convert this using DOS-style short mode. If the path
27771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27772  # take no chances and rewrite it.
27773  # Note: m4 eats our [], so we need to use [ and ] instead.
27774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27775  if test "x$has_forbidden_chars" != x; then
27776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27780      # Going to short mode and back again did indeed matter. Since short mode is
27781      # case insensitive, let's make it lowercase to improve readability.
27782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27783      # Now convert it back to Unix-stile (cygpath)
27784      input_path=`$CYGPATH -u "$shortmode_path"`
27785      new_path="$input_path"
27786    fi
27787  fi
27788
27789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27790  if test "x$test_cygdrive_prefix" = x; then
27791    # As a simple fix, exclude /usr/bin since it's not a real path.
27792    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27794      # a path prefixed by /cygdrive for fixpath to work.
27795      new_path="$CYGWIN_ROOT_PATH$input_path"
27796    fi
27797  fi
27798
27799  # remove trailing .exe if any
27800  new_path="${new_path/%.exe/}"
27801
27802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27803
27804  # First separate the path from the arguments. This will split at the first
27805  # space.
27806  complete="$OBJCOPY"
27807  path="${complete%% *}"
27808  tmp="$complete EOL"
27809  arguments="${tmp#* }"
27810
27811  # Input might be given as Windows format, start by converting to
27812  # unix format.
27813  new_path="$path"
27814
27815  windows_path="$new_path"
27816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27817    unix_path=`$CYGPATH -u "$windows_path"`
27818    new_path="$unix_path"
27819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27821    new_path="$unix_path"
27822  fi
27823
27824
27825  # Now try to locate executable using which
27826  new_path=`$WHICH "$new_path" 2> /dev/null`
27827
27828  if test "x$new_path" = x; then
27829    # Oops. Which didn't find the executable.
27830    # The splitting of arguments from the executable at a space might have been incorrect,
27831    # since paths with space are more likely in Windows. Give it another try with the whole
27832    # argument.
27833    path="$complete"
27834    arguments="EOL"
27835    new_path="$path"
27836
27837  windows_path="$new_path"
27838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27839    unix_path=`$CYGPATH -u "$windows_path"`
27840    new_path="$unix_path"
27841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27843    new_path="$unix_path"
27844  fi
27845
27846
27847    new_path=`$WHICH "$new_path" 2> /dev/null`
27848
27849    if test "x$new_path" = x; then
27850      # It's still not found. Now this is an unrecoverable error.
27851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27852$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27853      has_space=`$ECHO "$complete" | $GREP " "`
27854      if test "x$has_space" != x; then
27855        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27856$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27857      fi
27858      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27859    fi
27860  fi
27861
27862  # Now new_path has a complete unix path to the binary
27863  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27864    # Keep paths in /bin as-is, but remove trailing .exe if any
27865    new_path="${new_path/%.exe/}"
27866    # Do not save /bin paths to all_fixpath_prefixes!
27867  else
27868    # Not in mixed or Windows style, start by that.
27869    new_path=`cmd //c echo $new_path`
27870
27871  input_path="$new_path"
27872  # Check if we need to convert this using DOS-style short mode. If the path
27873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27874  # take no chances and rewrite it.
27875  # Note: m4 eats our [], so we need to use [ and ] instead.
27876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27877  if test "x$has_forbidden_chars" != x; then
27878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27880  fi
27881
27882    # Output is in $new_path
27883
27884  windows_path="$new_path"
27885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27886    unix_path=`$CYGPATH -u "$windows_path"`
27887    new_path="$unix_path"
27888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27890    new_path="$unix_path"
27891  fi
27892
27893    # remove trailing .exe if any
27894    new_path="${new_path/%.exe/}"
27895
27896    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27897    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27898  fi
27899
27900  else
27901    # We're on a posix platform. Hooray! :)
27902    # First separate the path from the arguments. This will split at the first
27903    # space.
27904    complete="$OBJCOPY"
27905    path="${complete%% *}"
27906    tmp="$complete EOL"
27907    arguments="${tmp#* }"
27908
27909    # Cannot rely on the command "which" here since it doesn't always work.
27910    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27911    if test -z "$is_absolute_path"; then
27912      # Path to executable is not absolute. Find it.
27913      IFS_save="$IFS"
27914      IFS=:
27915      for p in $PATH; do
27916        if test -f "$p/$path" && test -x "$p/$path"; then
27917          new_path="$p/$path"
27918          break
27919        fi
27920      done
27921      IFS="$IFS_save"
27922    else
27923      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27924$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27925      new_path="$path"
27926    fi
27927
27928    if test "x$new_path" = x; then
27929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27930$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27931        has_space=`$ECHO "$complete" | $GREP " "`
27932        if test "x$has_space" != x; then
27933          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27934$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27935        fi
27936        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27937      fi
27938  fi
27939
27940      # Now join together the path and the arguments once again
27941      if test "x$arguments" != xEOL; then
27942        new_complete="$new_path ${arguments% *}"
27943      else
27944        new_complete="$new_path"
27945      fi
27946
27947  if test "x$complete" != "x$new_complete"; then
27948      OBJCOPY="$new_complete"
27949      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27950$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27951    fi
27952
27953    fi
27954fi
27955
27956if test -n "$ac_tool_prefix"; then
27957  for ac_prog in gobjdump objdump
27958  do
27959    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27960set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27962$as_echo_n "checking for $ac_word... " >&6; }
27963if ${ac_cv_prog_OBJDUMP+:} false; then :
27964  $as_echo_n "(cached) " >&6
27965else
27966  if test -n "$OBJDUMP"; then
27967  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27968else
27969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27970for as_dir in $PATH
27971do
27972  IFS=$as_save_IFS
27973  test -z "$as_dir" && as_dir=.
27974    for ac_exec_ext in '' $ac_executable_extensions; do
27975  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27976    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27978    break 2
27979  fi
27980done
27981  done
27982IFS=$as_save_IFS
27983
27984fi
27985fi
27986OBJDUMP=$ac_cv_prog_OBJDUMP
27987if test -n "$OBJDUMP"; then
27988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27989$as_echo "$OBJDUMP" >&6; }
27990else
27991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27992$as_echo "no" >&6; }
27993fi
27994
27995
27996    test -n "$OBJDUMP" && break
27997  done
27998fi
27999if test -z "$OBJDUMP"; then
28000  ac_ct_OBJDUMP=$OBJDUMP
28001  for ac_prog in gobjdump objdump
28002do
28003  # Extract the first word of "$ac_prog", so it can be a program name with args.
28004set dummy $ac_prog; ac_word=$2
28005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28006$as_echo_n "checking for $ac_word... " >&6; }
28007if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28008  $as_echo_n "(cached) " >&6
28009else
28010  if test -n "$ac_ct_OBJDUMP"; then
28011  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28012else
28013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28014for as_dir in $PATH
28015do
28016  IFS=$as_save_IFS
28017  test -z "$as_dir" && as_dir=.
28018    for ac_exec_ext in '' $ac_executable_extensions; do
28019  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28020    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28022    break 2
28023  fi
28024done
28025  done
28026IFS=$as_save_IFS
28027
28028fi
28029fi
28030ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28031if test -n "$ac_ct_OBJDUMP"; then
28032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28033$as_echo "$ac_ct_OBJDUMP" >&6; }
28034else
28035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28036$as_echo "no" >&6; }
28037fi
28038
28039
28040  test -n "$ac_ct_OBJDUMP" && break
28041done
28042
28043  if test "x$ac_ct_OBJDUMP" = x; then
28044    OBJDUMP=""
28045  else
28046    case $cross_compiling:$ac_tool_warned in
28047yes:)
28048{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28049$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28050ac_tool_warned=yes ;;
28051esac
28052    OBJDUMP=$ac_ct_OBJDUMP
28053  fi
28054fi
28055
28056if test "x$OBJDUMP" != x; then
28057  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28058
28059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28060
28061  # First separate the path from the arguments. This will split at the first
28062  # space.
28063  complete="$OBJDUMP"
28064  path="${complete%% *}"
28065  tmp="$complete EOL"
28066  arguments="${tmp#* }"
28067
28068  # Input might be given as Windows format, start by converting to
28069  # unix format.
28070  new_path=`$CYGPATH -u "$path"`
28071
28072  # Now try to locate executable using which
28073  new_path=`$WHICH "$new_path" 2> /dev/null`
28074  # bat and cmd files are not always considered executable in cygwin causing which
28075  # to not find them
28076  if test "x$new_path" = x \
28077           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28078           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28079    new_path=`$CYGPATH -u "$path"`
28080  fi
28081  if test "x$new_path" = x; then
28082    # Oops. Which didn't find the executable.
28083    # The splitting of arguments from the executable at a space might have been incorrect,
28084    # since paths with space are more likely in Windows. Give it another try with the whole
28085    # argument.
28086    path="$complete"
28087    arguments="EOL"
28088    new_path=`$CYGPATH -u "$path"`
28089    new_path=`$WHICH "$new_path" 2> /dev/null`
28090    # bat and cmd files are not always considered executable in cygwin causing which
28091    # to not find them
28092    if test "x$new_path" = x \
28093             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28094             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28095      new_path=`$CYGPATH -u "$path"`
28096    fi
28097    if test "x$new_path" = x; then
28098      # It's still not found. Now this is an unrecoverable error.
28099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28100$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28101      has_space=`$ECHO "$complete" | $GREP " "`
28102      if test "x$has_space" != x; then
28103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28105      fi
28106      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28107    fi
28108  fi
28109
28110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28113  # "foo.exe" is OK but "foo" is an error.
28114  #
28115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28116  # It is also a way to make sure we got the proper file name for the real test later on.
28117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28118  if test "x$test_shortpath" = x; then
28119    # Short path failed, file does not exist as specified.
28120    # Try adding .exe or .cmd
28121    if test -f "${new_path}.exe"; then
28122       input_to_shortpath="${new_path}.exe"
28123    elif test -f "${new_path}.cmd"; then
28124       input_to_shortpath="${new_path}.cmd"
28125    else
28126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28127$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28128      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28129$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28130      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28131    fi
28132  else
28133    input_to_shortpath="$new_path"
28134  fi
28135
28136  # Call helper function which possibly converts this using DOS-style short mode.
28137  # If so, the updated path is stored in $new_path.
28138  new_path="$input_to_shortpath"
28139
28140  input_path="$input_to_shortpath"
28141  # Check if we need to convert this using DOS-style short mode. If the path
28142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28143  # take no chances and rewrite it.
28144  # Note: m4 eats our [], so we need to use [ and ] instead.
28145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28146  if test "x$has_forbidden_chars" != x; then
28147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28151      # Going to short mode and back again did indeed matter. Since short mode is
28152      # case insensitive, let's make it lowercase to improve readability.
28153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28154      # Now convert it back to Unix-stile (cygpath)
28155      input_path=`$CYGPATH -u "$shortmode_path"`
28156      new_path="$input_path"
28157    fi
28158  fi
28159
28160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28161  if test "x$test_cygdrive_prefix" = x; then
28162    # As a simple fix, exclude /usr/bin since it's not a real path.
28163    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28165      # a path prefixed by /cygdrive for fixpath to work.
28166      new_path="$CYGWIN_ROOT_PATH$input_path"
28167    fi
28168  fi
28169
28170  # remove trailing .exe if any
28171  new_path="${new_path/%.exe/}"
28172
28173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28174
28175  # First separate the path from the arguments. This will split at the first
28176  # space.
28177  complete="$OBJDUMP"
28178  path="${complete%% *}"
28179  tmp="$complete EOL"
28180  arguments="${tmp#* }"
28181
28182  # Input might be given as Windows format, start by converting to
28183  # unix format.
28184  new_path="$path"
28185
28186  windows_path="$new_path"
28187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28188    unix_path=`$CYGPATH -u "$windows_path"`
28189    new_path="$unix_path"
28190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28192    new_path="$unix_path"
28193  fi
28194
28195
28196  # Now try to locate executable using which
28197  new_path=`$WHICH "$new_path" 2> /dev/null`
28198
28199  if test "x$new_path" = x; then
28200    # Oops. Which didn't find the executable.
28201    # The splitting of arguments from the executable at a space might have been incorrect,
28202    # since paths with space are more likely in Windows. Give it another try with the whole
28203    # argument.
28204    path="$complete"
28205    arguments="EOL"
28206    new_path="$path"
28207
28208  windows_path="$new_path"
28209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28210    unix_path=`$CYGPATH -u "$windows_path"`
28211    new_path="$unix_path"
28212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28214    new_path="$unix_path"
28215  fi
28216
28217
28218    new_path=`$WHICH "$new_path" 2> /dev/null`
28219
28220    if test "x$new_path" = x; then
28221      # It's still not found. Now this is an unrecoverable error.
28222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28223$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28224      has_space=`$ECHO "$complete" | $GREP " "`
28225      if test "x$has_space" != x; then
28226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28228      fi
28229      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28230    fi
28231  fi
28232
28233  # Now new_path has a complete unix path to the binary
28234  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28235    # Keep paths in /bin as-is, but remove trailing .exe if any
28236    new_path="${new_path/%.exe/}"
28237    # Do not save /bin paths to all_fixpath_prefixes!
28238  else
28239    # Not in mixed or Windows style, start by that.
28240    new_path=`cmd //c echo $new_path`
28241
28242  input_path="$new_path"
28243  # Check if we need to convert this using DOS-style short mode. If the path
28244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28245  # take no chances and rewrite it.
28246  # Note: m4 eats our [], so we need to use [ and ] instead.
28247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28248  if test "x$has_forbidden_chars" != x; then
28249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28251  fi
28252
28253    # Output is in $new_path
28254
28255  windows_path="$new_path"
28256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28257    unix_path=`$CYGPATH -u "$windows_path"`
28258    new_path="$unix_path"
28259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28261    new_path="$unix_path"
28262  fi
28263
28264    # remove trailing .exe if any
28265    new_path="${new_path/%.exe/}"
28266
28267    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28268    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28269  fi
28270
28271  else
28272    # We're on a posix platform. Hooray! :)
28273    # First separate the path from the arguments. This will split at the first
28274    # space.
28275    complete="$OBJDUMP"
28276    path="${complete%% *}"
28277    tmp="$complete EOL"
28278    arguments="${tmp#* }"
28279
28280    # Cannot rely on the command "which" here since it doesn't always work.
28281    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28282    if test -z "$is_absolute_path"; then
28283      # Path to executable is not absolute. Find it.
28284      IFS_save="$IFS"
28285      IFS=:
28286      for p in $PATH; do
28287        if test -f "$p/$path" && test -x "$p/$path"; then
28288          new_path="$p/$path"
28289          break
28290        fi
28291      done
28292      IFS="$IFS_save"
28293    else
28294      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28295$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28296      new_path="$path"
28297    fi
28298
28299    if test "x$new_path" = x; then
28300        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28301$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28302        has_space=`$ECHO "$complete" | $GREP " "`
28303        if test "x$has_space" != x; then
28304          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28305$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28306        fi
28307        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28308      fi
28309  fi
28310
28311      # Now join together the path and the arguments once again
28312      if test "x$arguments" != xEOL; then
28313        new_complete="$new_path ${arguments% *}"
28314      else
28315        new_complete="$new_path"
28316      fi
28317
28318  if test "x$complete" != "x$new_complete"; then
28319      OBJDUMP="$new_complete"
28320      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28321$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28322    fi
28323
28324fi
28325
28326if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28327   # Extract the first word of "lipo", so it can be a program name with args.
28328set dummy lipo; ac_word=$2
28329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28330$as_echo_n "checking for $ac_word... " >&6; }
28331if ${ac_cv_path_LIPO+:} false; then :
28332  $as_echo_n "(cached) " >&6
28333else
28334  case $LIPO in
28335  [\\/]* | ?:[\\/]*)
28336  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28337  ;;
28338  *)
28339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28340for as_dir in $PATH
28341do
28342  IFS=$as_save_IFS
28343  test -z "$as_dir" && as_dir=.
28344    for ac_exec_ext in '' $ac_executable_extensions; do
28345  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28346    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28348    break 2
28349  fi
28350done
28351  done
28352IFS=$as_save_IFS
28353
28354  ;;
28355esac
28356fi
28357LIPO=$ac_cv_path_LIPO
28358if test -n "$LIPO"; then
28359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28360$as_echo "$LIPO" >&6; }
28361else
28362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28363$as_echo "no" >&6; }
28364fi
28365
28366
28367
28368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28369
28370  # First separate the path from the arguments. This will split at the first
28371  # space.
28372  complete="$LIPO"
28373  path="${complete%% *}"
28374  tmp="$complete EOL"
28375  arguments="${tmp#* }"
28376
28377  # Input might be given as Windows format, start by converting to
28378  # unix format.
28379  new_path=`$CYGPATH -u "$path"`
28380
28381  # Now try to locate executable using which
28382  new_path=`$WHICH "$new_path" 2> /dev/null`
28383  # bat and cmd files are not always considered executable in cygwin causing which
28384  # to not find them
28385  if test "x$new_path" = x \
28386           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28387           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28388    new_path=`$CYGPATH -u "$path"`
28389  fi
28390  if test "x$new_path" = x; then
28391    # Oops. Which didn't find the executable.
28392    # The splitting of arguments from the executable at a space might have been incorrect,
28393    # since paths with space are more likely in Windows. Give it another try with the whole
28394    # argument.
28395    path="$complete"
28396    arguments="EOL"
28397    new_path=`$CYGPATH -u "$path"`
28398    new_path=`$WHICH "$new_path" 2> /dev/null`
28399    # bat and cmd files are not always considered executable in cygwin causing which
28400    # to not find them
28401    if test "x$new_path" = x \
28402             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28403             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28404      new_path=`$CYGPATH -u "$path"`
28405    fi
28406    if test "x$new_path" = x; then
28407      # It's still not found. Now this is an unrecoverable error.
28408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28409$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28410      has_space=`$ECHO "$complete" | $GREP " "`
28411      if test "x$has_space" != x; then
28412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28414      fi
28415      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28416    fi
28417  fi
28418
28419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28422  # "foo.exe" is OK but "foo" is an error.
28423  #
28424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28425  # It is also a way to make sure we got the proper file name for the real test later on.
28426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28427  if test "x$test_shortpath" = x; then
28428    # Short path failed, file does not exist as specified.
28429    # Try adding .exe or .cmd
28430    if test -f "${new_path}.exe"; then
28431       input_to_shortpath="${new_path}.exe"
28432    elif test -f "${new_path}.cmd"; then
28433       input_to_shortpath="${new_path}.cmd"
28434    else
28435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28436$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28437      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28438$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28439      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28440    fi
28441  else
28442    input_to_shortpath="$new_path"
28443  fi
28444
28445  # Call helper function which possibly converts this using DOS-style short mode.
28446  # If so, the updated path is stored in $new_path.
28447  new_path="$input_to_shortpath"
28448
28449  input_path="$input_to_shortpath"
28450  # Check if we need to convert this using DOS-style short mode. If the path
28451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28452  # take no chances and rewrite it.
28453  # Note: m4 eats our [], so we need to use [ and ] instead.
28454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28455  if test "x$has_forbidden_chars" != x; then
28456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28460      # Going to short mode and back again did indeed matter. Since short mode is
28461      # case insensitive, let's make it lowercase to improve readability.
28462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28463      # Now convert it back to Unix-stile (cygpath)
28464      input_path=`$CYGPATH -u "$shortmode_path"`
28465      new_path="$input_path"
28466    fi
28467  fi
28468
28469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28470  if test "x$test_cygdrive_prefix" = x; then
28471    # As a simple fix, exclude /usr/bin since it's not a real path.
28472    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28474      # a path prefixed by /cygdrive for fixpath to work.
28475      new_path="$CYGWIN_ROOT_PATH$input_path"
28476    fi
28477  fi
28478
28479  # remove trailing .exe if any
28480  new_path="${new_path/%.exe/}"
28481
28482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28483
28484  # First separate the path from the arguments. This will split at the first
28485  # space.
28486  complete="$LIPO"
28487  path="${complete%% *}"
28488  tmp="$complete EOL"
28489  arguments="${tmp#* }"
28490
28491  # Input might be given as Windows format, start by converting to
28492  # unix format.
28493  new_path="$path"
28494
28495  windows_path="$new_path"
28496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28497    unix_path=`$CYGPATH -u "$windows_path"`
28498    new_path="$unix_path"
28499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28501    new_path="$unix_path"
28502  fi
28503
28504
28505  # Now try to locate executable using which
28506  new_path=`$WHICH "$new_path" 2> /dev/null`
28507
28508  if test "x$new_path" = x; then
28509    # Oops. Which didn't find the executable.
28510    # The splitting of arguments from the executable at a space might have been incorrect,
28511    # since paths with space are more likely in Windows. Give it another try with the whole
28512    # argument.
28513    path="$complete"
28514    arguments="EOL"
28515    new_path="$path"
28516
28517  windows_path="$new_path"
28518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28519    unix_path=`$CYGPATH -u "$windows_path"`
28520    new_path="$unix_path"
28521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28523    new_path="$unix_path"
28524  fi
28525
28526
28527    new_path=`$WHICH "$new_path" 2> /dev/null`
28528
28529    if test "x$new_path" = x; then
28530      # It's still not found. Now this is an unrecoverable error.
28531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28532$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28533      has_space=`$ECHO "$complete" | $GREP " "`
28534      if test "x$has_space" != x; then
28535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28537      fi
28538      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28539    fi
28540  fi
28541
28542  # Now new_path has a complete unix path to the binary
28543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28544    # Keep paths in /bin as-is, but remove trailing .exe if any
28545    new_path="${new_path/%.exe/}"
28546    # Do not save /bin paths to all_fixpath_prefixes!
28547  else
28548    # Not in mixed or Windows style, start by that.
28549    new_path=`cmd //c echo $new_path`
28550
28551  input_path="$new_path"
28552  # Check if we need to convert this using DOS-style short mode. If the path
28553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28554  # take no chances and rewrite it.
28555  # Note: m4 eats our [], so we need to use [ and ] instead.
28556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28557  if test "x$has_forbidden_chars" != x; then
28558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28560  fi
28561
28562    # Output is in $new_path
28563
28564  windows_path="$new_path"
28565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28566    unix_path=`$CYGPATH -u "$windows_path"`
28567    new_path="$unix_path"
28568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28570    new_path="$unix_path"
28571  fi
28572
28573    # remove trailing .exe if any
28574    new_path="${new_path/%.exe/}"
28575
28576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28578  fi
28579
28580  else
28581    # We're on a posix platform. Hooray! :)
28582    # First separate the path from the arguments. This will split at the first
28583    # space.
28584    complete="$LIPO"
28585    path="${complete%% *}"
28586    tmp="$complete EOL"
28587    arguments="${tmp#* }"
28588
28589    # Cannot rely on the command "which" here since it doesn't always work.
28590    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28591    if test -z "$is_absolute_path"; then
28592      # Path to executable is not absolute. Find it.
28593      IFS_save="$IFS"
28594      IFS=:
28595      for p in $PATH; do
28596        if test -f "$p/$path" && test -x "$p/$path"; then
28597          new_path="$p/$path"
28598          break
28599        fi
28600      done
28601      IFS="$IFS_save"
28602    else
28603      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28604$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28605      new_path="$path"
28606    fi
28607
28608    if test "x$new_path" = x; then
28609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28610$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28611        has_space=`$ECHO "$complete" | $GREP " "`
28612        if test "x$has_space" != x; then
28613          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28615        fi
28616        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28617      fi
28618  fi
28619
28620      # Now join together the path and the arguments once again
28621      if test "x$arguments" != xEOL; then
28622        new_complete="$new_path ${arguments% *}"
28623      else
28624        new_complete="$new_path"
28625      fi
28626
28627  if test "x$complete" != "x$new_complete"; then
28628      LIPO="$new_complete"
28629      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28630$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28631    fi
28632
28633fi
28634
28635
28636
28637# Restore old path without tools dir
28638PATH="$OLD_PATH"
28639
28640
28641# FIXME: Currently we must test this after paths but before flags. Fix!
28642
28643# And we can test some aspects on the target using configure macros.
28644
28645
28646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28647$as_echo_n "checking for ANSI C header files... " >&6; }
28648if ${ac_cv_header_stdc+:} false; then :
28649  $as_echo_n "(cached) " >&6
28650else
28651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28652/* end confdefs.h.  */
28653#include <stdlib.h>
28654#include <stdarg.h>
28655#include <string.h>
28656#include <float.h>
28657
28658int
28659main ()
28660{
28661
28662  ;
28663  return 0;
28664}
28665_ACEOF
28666if ac_fn_cxx_try_compile "$LINENO"; then :
28667  ac_cv_header_stdc=yes
28668else
28669  ac_cv_header_stdc=no
28670fi
28671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28672
28673if test $ac_cv_header_stdc = yes; then
28674  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28676/* end confdefs.h.  */
28677#include <string.h>
28678
28679_ACEOF
28680if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28681  $EGREP "memchr" >/dev/null 2>&1; then :
28682
28683else
28684  ac_cv_header_stdc=no
28685fi
28686rm -f conftest*
28687
28688fi
28689
28690if test $ac_cv_header_stdc = yes; then
28691  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28693/* end confdefs.h.  */
28694#include <stdlib.h>
28695
28696_ACEOF
28697if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28698  $EGREP "free" >/dev/null 2>&1; then :
28699
28700else
28701  ac_cv_header_stdc=no
28702fi
28703rm -f conftest*
28704
28705fi
28706
28707if test $ac_cv_header_stdc = yes; then
28708  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28709  if test "$cross_compiling" = yes; then :
28710  :
28711else
28712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28713/* end confdefs.h.  */
28714#include <ctype.h>
28715#include <stdlib.h>
28716#if ((' ' & 0x0FF) == 0x020)
28717# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28718# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28719#else
28720# define ISLOWER(c) \
28721		   (('a' <= (c) && (c) <= 'i') \
28722		     || ('j' <= (c) && (c) <= 'r') \
28723		     || ('s' <= (c) && (c) <= 'z'))
28724# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28725#endif
28726
28727#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28728int
28729main ()
28730{
28731  int i;
28732  for (i = 0; i < 256; i++)
28733    if (XOR (islower (i), ISLOWER (i))
28734	|| toupper (i) != TOUPPER (i))
28735      return 2;
28736  return 0;
28737}
28738_ACEOF
28739if ac_fn_cxx_try_run "$LINENO"; then :
28740
28741else
28742  ac_cv_header_stdc=no
28743fi
28744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28745  conftest.$ac_objext conftest.beam conftest.$ac_ext
28746fi
28747
28748fi
28749fi
28750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28751$as_echo "$ac_cv_header_stdc" >&6; }
28752if test $ac_cv_header_stdc = yes; then
28753
28754$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28755
28756fi
28757
28758# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28759for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28760		  inttypes.h stdint.h unistd.h
28761do :
28762  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28763ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28764"
28765if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28766  cat >>confdefs.h <<_ACEOF
28767#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28768_ACEOF
28769
28770fi
28771
28772done
28773
28774
28775
28776###############################################################################
28777#
28778# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28779# (The JVM can use 32 or 64 bit Java pointers but that decision
28780# is made at runtime.)
28781#
28782
28783if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28784  # Always specify -m flags on Solaris
28785
28786  # keep track of c/cxx flags that we added outselves...
28787  #   to prevent emitting warning...
28788  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28789  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28790  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28791
28792  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28793  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28794  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28795
28796  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28797  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28798  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28799
28800elif test "x$COMPILE_TYPE" = xreduced; then
28801  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28802    # Specify -m if running reduced on other Posix platforms
28803
28804  # keep track of c/cxx flags that we added outselves...
28805  #   to prevent emitting warning...
28806  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28807  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28808  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28809
28810  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28811  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28812  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28813
28814  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28815  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28816  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28817
28818  fi
28819fi
28820
28821# Make compilation sanity check
28822for ac_header in stdio.h
28823do :
28824  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28825if test "x$ac_cv_header_stdio_h" = xyes; then :
28826  cat >>confdefs.h <<_ACEOF
28827#define HAVE_STDIO_H 1
28828_ACEOF
28829
28830else
28831
28832  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28833$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28834  if test "x$COMPILE_TYPE" = xreduced; then
28835    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28836$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28837  elif test "x$COMPILE_TYPE" = xcross; then
28838    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28839$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28840  fi
28841  as_fn_error $? "Cannot continue." "$LINENO" 5
28842
28843fi
28844
28845done
28846
28847
28848# The cast to long int works around a bug in the HP C Compiler
28849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28851# This bug is HP SR number 8606223364.
28852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28853$as_echo_n "checking size of int *... " >&6; }
28854if ${ac_cv_sizeof_int_p+:} false; then :
28855  $as_echo_n "(cached) " >&6
28856else
28857  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28858
28859else
28860  if test "$ac_cv_type_int_p" = yes; then
28861     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28863as_fn_error 77 "cannot compute sizeof (int *)
28864See \`config.log' for more details" "$LINENO" 5; }
28865   else
28866     ac_cv_sizeof_int_p=0
28867   fi
28868fi
28869
28870fi
28871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28872$as_echo "$ac_cv_sizeof_int_p" >&6; }
28873
28874
28875
28876cat >>confdefs.h <<_ACEOF
28877#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28878_ACEOF
28879
28880
28881
28882if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28883  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28884  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28885fi
28886
28887if test "x$SIZEOF_INT_P" = x; then
28888    # The test failed, lets stick to the assumed value.
28889    { $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
28890$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28891else
28892    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28893
28894    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28895        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
28896    fi
28897fi
28898
28899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28900$as_echo_n "checking for target address size... " >&6; }
28901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28902$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28903
28904
28905###############################################################################
28906#
28907# Is the target little of big endian?
28908#
28909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28910$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28911if ${ac_cv_c_bigendian+:} false; then :
28912  $as_echo_n "(cached) " >&6
28913else
28914  ac_cv_c_bigendian=unknown
28915    # See if we're dealing with a universal compiler.
28916    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28917/* end confdefs.h.  */
28918#ifndef __APPLE_CC__
28919	       not a universal capable compiler
28920	     #endif
28921	     typedef int dummy;
28922
28923_ACEOF
28924if ac_fn_cxx_try_compile "$LINENO"; then :
28925
28926	# Check for potential -arch flags.  It is not universal unless
28927	# there are at least two -arch flags with different values.
28928	ac_arch=
28929	ac_prev=
28930	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28931	 if test -n "$ac_prev"; then
28932	   case $ac_word in
28933	     i?86 | x86_64 | ppc | ppc64)
28934	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28935		 ac_arch=$ac_word
28936	       else
28937		 ac_cv_c_bigendian=universal
28938		 break
28939	       fi
28940	       ;;
28941	   esac
28942	   ac_prev=
28943	 elif test "x$ac_word" = "x-arch"; then
28944	   ac_prev=arch
28945	 fi
28946       done
28947fi
28948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28949    if test $ac_cv_c_bigendian = unknown; then
28950      # See if sys/param.h defines the BYTE_ORDER macro.
28951      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28952/* end confdefs.h.  */
28953#include <sys/types.h>
28954	     #include <sys/param.h>
28955
28956int
28957main ()
28958{
28959#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28960		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28961		     && LITTLE_ENDIAN)
28962	      bogus endian macros
28963	     #endif
28964
28965  ;
28966  return 0;
28967}
28968_ACEOF
28969if ac_fn_cxx_try_compile "$LINENO"; then :
28970  # It does; now see whether it defined to BIG_ENDIAN or not.
28971	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28972/* end confdefs.h.  */
28973#include <sys/types.h>
28974		#include <sys/param.h>
28975
28976int
28977main ()
28978{
28979#if BYTE_ORDER != BIG_ENDIAN
28980		 not big endian
28981		#endif
28982
28983  ;
28984  return 0;
28985}
28986_ACEOF
28987if ac_fn_cxx_try_compile "$LINENO"; then :
28988  ac_cv_c_bigendian=yes
28989else
28990  ac_cv_c_bigendian=no
28991fi
28992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28993fi
28994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28995    fi
28996    if test $ac_cv_c_bigendian = unknown; then
28997      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28998      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28999/* end confdefs.h.  */
29000#include <limits.h>
29001
29002int
29003main ()
29004{
29005#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29006	      bogus endian macros
29007	     #endif
29008
29009  ;
29010  return 0;
29011}
29012_ACEOF
29013if ac_fn_cxx_try_compile "$LINENO"; then :
29014  # It does; now see whether it defined to _BIG_ENDIAN or not.
29015	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29016/* end confdefs.h.  */
29017#include <limits.h>
29018
29019int
29020main ()
29021{
29022#ifndef _BIG_ENDIAN
29023		 not big endian
29024		#endif
29025
29026  ;
29027  return 0;
29028}
29029_ACEOF
29030if ac_fn_cxx_try_compile "$LINENO"; then :
29031  ac_cv_c_bigendian=yes
29032else
29033  ac_cv_c_bigendian=no
29034fi
29035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29036fi
29037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29038    fi
29039    if test $ac_cv_c_bigendian = unknown; then
29040      # Compile a test program.
29041      if test "$cross_compiling" = yes; then :
29042  # Try to guess by grepping values from an object file.
29043	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29044/* end confdefs.h.  */
29045short int ascii_mm[] =
29046		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29047		short int ascii_ii[] =
29048		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29049		int use_ascii (int i) {
29050		  return ascii_mm[i] + ascii_ii[i];
29051		}
29052		short int ebcdic_ii[] =
29053		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29054		short int ebcdic_mm[] =
29055		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29056		int use_ebcdic (int i) {
29057		  return ebcdic_mm[i] + ebcdic_ii[i];
29058		}
29059		extern int foo;
29060
29061int
29062main ()
29063{
29064return use_ascii (foo) == use_ebcdic (foo);
29065  ;
29066  return 0;
29067}
29068_ACEOF
29069if ac_fn_cxx_try_compile "$LINENO"; then :
29070  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29071	      ac_cv_c_bigendian=yes
29072	    fi
29073	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29074	      if test "$ac_cv_c_bigendian" = unknown; then
29075		ac_cv_c_bigendian=no
29076	      else
29077		# finding both strings is unlikely to happen, but who knows?
29078		ac_cv_c_bigendian=unknown
29079	      fi
29080	    fi
29081fi
29082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29083else
29084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29085/* end confdefs.h.  */
29086$ac_includes_default
29087int
29088main ()
29089{
29090
29091	     /* Are we little or big endian?  From Harbison&Steele.  */
29092	     union
29093	     {
29094	       long int l;
29095	       char c[sizeof (long int)];
29096	     } u;
29097	     u.l = 1;
29098	     return u.c[sizeof (long int) - 1] == 1;
29099
29100  ;
29101  return 0;
29102}
29103_ACEOF
29104if ac_fn_cxx_try_run "$LINENO"; then :
29105  ac_cv_c_bigendian=no
29106else
29107  ac_cv_c_bigendian=yes
29108fi
29109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29110  conftest.$ac_objext conftest.beam conftest.$ac_ext
29111fi
29112
29113    fi
29114fi
29115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29116$as_echo "$ac_cv_c_bigendian" >&6; }
29117 case $ac_cv_c_bigendian in #(
29118   yes)
29119     ENDIAN="big";; #(
29120   no)
29121     ENDIAN="little" ;; #(
29122   universal)
29123     ENDIAN="universal_endianness"
29124     ;; #(
29125   *)
29126     ENDIAN="unknown" ;;
29127 esac
29128
29129
29130if test "x$ENDIAN" = xuniversal_endianness; then
29131    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29132fi
29133if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29134    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
29135fi
29136
29137
29138# Configure flags for the tools
29139
29140
29141###############################################################################
29142#
29143# How to compile shared libraries.
29144#
29145
29146if test "x$GCC" = xyes; then
29147    COMPILER_NAME=gcc
29148    PICFLAG="-fPIC"
29149    LIBRARY_PREFIX=lib
29150    SHARED_LIBRARY='lib$1.so'
29151    STATIC_LIBRARY='lib$1.a'
29152    SHARED_LIBRARY_FLAGS="-shared"
29153    SHARED_LIBRARY_SUFFIX='.so'
29154    STATIC_LIBRARY_SUFFIX='.a'
29155    OBJ_SUFFIX='.o'
29156    EXE_SUFFIX=''
29157    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29158    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29159    C_FLAG_REORDER=''
29160    CXX_FLAG_REORDER=''
29161    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29162    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29163    LD="$CC"
29164    LDEXE="$CC"
29165    LDCXX="$CXX"
29166    LDEXECXX="$CXX"
29167    POST_STRIP_CMD="$STRIP -g"
29168
29169    # Linking is different on MacOSX
29170    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29171        # Might change in the future to clang.
29172        COMPILER_NAME=gcc
29173        SHARED_LIBRARY='lib$1.dylib'
29174        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29175        SHARED_LIBRARY_SUFFIX='.dylib'
29176        EXE_SUFFIX=''
29177        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29178        SET_SHARED_LIBRARY_MAPFILE=''
29179        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29180        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29181        POST_STRIP_CMD="$STRIP -S"
29182    fi
29183else
29184    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29185        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29186        COMPILER_NAME=ossc
29187        PICFLAG="-KPIC"
29188        LIBRARY_PREFIX=lib
29189        SHARED_LIBRARY='lib$1.so'
29190        STATIC_LIBRARY='lib$1.a'
29191        SHARED_LIBRARY_FLAGS="-G"
29192        SHARED_LIBRARY_SUFFIX='.so'
29193        STATIC_LIBRARY_SUFFIX='.a'
29194        OBJ_SUFFIX='.o'
29195        EXE_SUFFIX=''
29196        SET_SHARED_LIBRARY_NAME=''
29197        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29198	C_FLAG_REORDER='-xF'
29199	CXX_FLAG_REORDER='-xF'
29200        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29201        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29202        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29203        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29204        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29205        POST_STRIP_CMD="$STRIP -x"
29206        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29207    fi
29208    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29209        # If it is not gcc, then assume it is the MS Visual Studio compiler
29210        COMPILER_NAME=cl
29211        PICFLAG=""
29212        LIBRARY_PREFIX=
29213        SHARED_LIBRARY='$1.dll'
29214        STATIC_LIBRARY='$1.lib'
29215        SHARED_LIBRARY_FLAGS="-LD"
29216        SHARED_LIBRARY_SUFFIX='.dll'
29217        STATIC_LIBRARY_SUFFIX='.lib'
29218        OBJ_SUFFIX='.obj'
29219        EXE_SUFFIX='.exe'
29220        SET_SHARED_LIBRARY_NAME=''
29221        SET_SHARED_LIBRARY_MAPFILE=''
29222        SET_SHARED_LIBRARY_ORIGIN=''
29223        SET_EXECUTABLE_ORIGIN=''
29224    fi
29225fi
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245# The (cross) compiler is now configured, we can now test capabilities
29246# of the target platform.
29247
29248
29249
29250###############################################################################
29251#
29252# Setup the opt flags for different compilers
29253# and different operating systems.
29254#
29255
29256#
29257# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29258#
29259if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29260    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29261    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29262    CFLAGS="$CFLAGS -mstackrealign"
29263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29264$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29265    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29266/* end confdefs.h.  */
29267int main() { return 0; }
29268_ACEOF
29269if ac_fn_cxx_try_link "$LINENO"; then :
29270
29271		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29272$as_echo "yes" >&6; }
29273
29274else
29275
29276		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29277$as_echo "no" >&6; }
29278	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29279
29280fi
29281rm -f core conftest.err conftest.$ac_objext \
29282    conftest$ac_exeext conftest.$ac_ext
29283fi
29284
29285C_FLAG_DEPS="-MMD -MF"
29286CXX_FLAG_DEPS="-MMD -MF"
29287
29288case $COMPILER_TYPE in
29289  CC )
29290    case $COMPILER_NAME in
29291      gcc )
29292      	case $OPENJDK_TARGET_OS in
29293	  macosx )
29294	    # On MacOSX we optimize for size, something
29295	    # we should do for all platforms?
29296	    C_O_FLAG_HI="-Os"
29297	    C_O_FLAG_NORM="-Os"
29298	    C_O_FLAG_NONE=""
29299	    ;;
29300	  *)
29301	    C_O_FLAG_HI="-O3"
29302	    C_O_FLAG_NORM="-O2"
29303	    C_O_FLAG_NONE="-O0"
29304	    ;;
29305	esac
29306        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29307        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29308        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29309        CFLAGS_DEBUG_SYMBOLS="-g"
29310        CXXFLAGS_DEBUG_SYMBOLS="-g"
29311        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29312            CFLAGS_DEBUG_SYMBOLS="-g1"
29313            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29314        fi
29315        ;;
29316      ossc )
29317        #
29318        # Forte has different names for this with their C++ compiler...
29319        #
29320        C_FLAG_DEPS="-xMMD -xMF"
29321        CXX_FLAG_DEPS="-xMMD -xMF"
29322
29323        # Extra options used with HIGHEST
29324        #
29325        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29326        #          done with care, there are some assumptions below that need to
29327        #          be understood about the use of pointers, and IEEE behavior.
29328        #
29329        # Use non-standard floating point mode (not IEEE 754)
29330        CC_HIGHEST="$CC_HIGHEST -fns"
29331        # Do some simplification of floating point arithmetic (not IEEE 754)
29332        CC_HIGHEST="$CC_HIGHEST -fsimple"
29333        # Use single precision floating point with 'float'
29334        CC_HIGHEST="$CC_HIGHEST -fsingle"
29335        # Assume memory references via basic pointer types do not alias
29336        #   (Source with excessing pointer casting and data access with mixed
29337        #    pointer types are not recommended)
29338        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29339        # Use intrinsic or inline versions for math/std functions
29340        #   (If you expect perfect errno behavior, do not use this)
29341        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29342        # Loop data dependency optimizations (need -xO3 or higher)
29343        CC_HIGHEST="$CC_HIGHEST -xdepend"
29344        # Pointer parameters to functions do not overlap
29345        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29346        #    If you pass in multiple pointers to the same data, do not use this)
29347        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29348        # Inline some library routines
29349        #   (If you expect perfect errno behavior, do not use this)
29350        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29351        # Use optimized math routines
29352        #   (If you expect perfect errno behavior, do not use this)
29353        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29354        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29355
29356        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29357          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29358          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29359        fi
29360
29361        case $OPENJDK_TARGET_CPU_ARCH in
29362          x86)
29363            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29364            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29365            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29366            C_O_FLAG_NONE="-xregs=no%frameptr"
29367            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29368            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29369            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29370            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29371            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29372               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29373               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29374            fi
29375            ;;
29376          sparc)
29377            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29378            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29379            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29380            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29381            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29382            C_O_FLAG_NONE=""
29383            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29384            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29385            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29386            CXX_O_FLAG_NONE=""
29387            ;;
29388        esac
29389
29390    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29391    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29392    esac
29393    ;;
29394  CL )
29395    C_O_FLAG_HIGHEST="-O2"
29396    C_O_FLAG_HI="-O1"
29397    C_O_FLAG_NORM="-O1"
29398    C_O_FLAG_NONE="-Od"
29399    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29400    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29401    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29402    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29403    ;;
29404esac
29405
29406if test -z "$C_O_FLAG_HIGHEST"; then
29407   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29408fi
29409
29410if test -z "$CXX_O_FLAG_HIGHEST"; then
29411   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29412fi
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29428   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29429$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29430fi
29431
29432if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29433   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29434$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29435fi
29436
29437if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29438   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29439$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29440fi
29441
29442
29443# Check whether --with-extra-cflags was given.
29444if test "${with_extra_cflags+set}" = set; then :
29445  withval=$with_extra_cflags;
29446fi
29447
29448
29449
29450# Check whether --with-extra-cxxflags was given.
29451if test "${with_extra_cxxflags+set}" = set; then :
29452  withval=$with_extra_cxxflags;
29453fi
29454
29455
29456
29457# Check whether --with-extra-ldflags was given.
29458if test "${with_extra_ldflags+set}" = set; then :
29459  withval=$with_extra_ldflags;
29460fi
29461
29462
29463CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29464CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29465LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29466
29467# Hotspot needs these set in their legacy form
29468LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29469LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29470LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29471
29472
29473
29474
29475
29476###############################################################################
29477#
29478# Now setup the CFLAGS and LDFLAGS for the JDK build.
29479# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29480#
29481case $COMPILER_NAME in
29482      gcc )
29483      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29484                          -pipe \
29485                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29486	  case $OPENJDK_TARGET_CPU_ARCH in
29487	  arm )
29488            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29489	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29490	  ;;
29491	  ppc )
29492            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29493	  ;;
29494	  * )
29495	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29496	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29497          ;;
29498	  esac
29499          ;;
29500      ossc )
29501          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29502          case $OPENJDK_TARGET_CPU_ARCH in
29503          x86 )
29504            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29505       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29506          ;;
29507          esac
29508
29509      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29510      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29511
29512          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29513          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29514          ;;
29515      cl )
29516          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29517               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29518	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29519	       -DWIN32 -DIAL"
29520          case $OPENJDK_TARGET_CPU in
29521              x86 )
29522                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29523                  ;;
29524              x86_64 )
29525                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29526                  ;;
29527          esac
29528          ;;
29529esac
29530
29531###############################################################################
29532
29533# Adjust flags according to debug level.
29534case $DEBUG_LEVEL in
29535      fastdebug )
29536              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29537              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29538	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29539	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29540	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29541	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29542              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29543              ;;
29544      slowdebug )
29545              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29546              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29547	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29548	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29549	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29550	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29551              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29552              ;;
29553esac
29554
29555CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29556
29557# The package path is used only on macosx?
29558PACKAGE_PATH=/opt/local
29559
29560
29561if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29562    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29563    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29564    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29565    #   Note: -Dmacro         is the same as    #define macro 1
29566    #         -Dmacro=	    is the same as    #define macro
29567    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29568        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29569    else
29570        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29571    fi
29572else
29573    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29574fi
29575if test "x$OPENJDK_TARGET_OS" = xlinux; then
29576    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29577fi
29578if test "x$OPENJDK_TARGET_OS" = xwindows; then
29579    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29580fi
29581if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29582    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29583fi
29584if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29585    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29586    # Setting these parameters makes it an error to link to macosx APIs that are
29587    # newer than the given OS version and makes the linked binaries compatible even
29588    # if built on a newer version of the OS.
29589    # The expected format is X.Y.Z
29590    MACOSX_VERSION_MIN=10.7.0
29591
29592    # The macro takes the version with no dots, ex: 1070
29593    # Let the flags variables get resolved in make for easier override on make
29594    # command line.
29595    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29596    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29597fi
29598if test "x$OPENJDK_TARGET_OS" = xbsd; then
29599    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29600fi
29601if test "x$DEBUG_LEVEL" = xrelease; then
29602    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29603    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29604        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29605    fi
29606else
29607    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29608fi
29609
29610CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29611CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29612
29613CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29614        -I${JDK_OUTPUTDIR}/include \
29615        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29616        -I${JDK_TOPDIR}/src/share/javavm/export \
29617        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29618        -I${JDK_TOPDIR}/src/share/native/common \
29619        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29620
29621# The shared libraries are compiled using the picflag.
29622CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29623CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29624
29625# Executable flags
29626CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29627CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29628
29629# Now this is odd. The JDK native libraries have to link against libjvm.so
29630# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29631# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29632# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29633# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29634# libraries will link to whatever is in memory. Yuck.
29635#
29636# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29637if test "x$COMPILER_NAME" = xcl; then
29638    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29639    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29640        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29641    fi
29642    # TODO: make -debug optional "--disable-full-debug-symbols"
29643    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29644    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29645    LDFLAGS_JDKLIB_SUFFIX=""
29646    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29647        LDFLAGS_STACK_SIZE=1048576
29648    else
29649        LDFLAGS_STACK_SIZE=327680
29650    fi
29651    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29652else
29653    if test "x$COMPILER_NAME" = xgcc; then
29654        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29655        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29656        if test -n "$HAS_GNU_HASH"; then
29657            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29658        fi
29659        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29660          # And since we now know that the linker is gnu, then add -z defs, to forbid
29661          # undefined symbols in object files.
29662          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29663          if test "x$DEBUG_LEVEL" = "xrelease"; then
29664              # When building release libraries, tell the linker optimize them.
29665              # Should this be supplied to the OSS linker as well?
29666              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29667          fi
29668        fi
29669    fi
29670    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29671                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29672
29673    # On some platforms (mac) the linker warns about non existing -L dirs.
29674    # Add server first if available. Linking aginst client does not always produce the same results.
29675    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29676    # Default to server for other variants.
29677    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29678        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29679    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29680        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29681    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29682        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29683    else
29684        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29685    fi
29686
29687    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29688    if test "x$COMPILER_NAME" = xossc; then
29689        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29690    fi
29691
29692    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29693    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29694        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29695    fi
29696fi
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712  # Some Zero and Shark settings.
29713  # ZERO_ARCHFLAG tells the compiler which mode to build for
29714  case "${OPENJDK_TARGET_CPU}" in
29715    s390)
29716      ZERO_ARCHFLAG="-m31"
29717      ;;
29718    *)
29719      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29720  esac
29721
29722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29723$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29724  supports=yes
29725
29726  saved_cflags="$CFLAGS"
29727  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29728  ac_ext=c
29729ac_cpp='$CPP $CPPFLAGS'
29730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29732ac_compiler_gnu=$ac_cv_c_compiler_gnu
29733
29734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29735/* end confdefs.h.  */
29736
29737    int i;
29738
29739_ACEOF
29740if ac_fn_c_try_compile "$LINENO"; then :
29741
29742else
29743  supports=no
29744fi
29745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29746  ac_ext=cpp
29747ac_cpp='$CXXCPP $CPPFLAGS'
29748ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29749ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29750ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29751
29752  CFLAGS="$saved_cflags"
29753
29754  saved_cxxflags="$CXXFLAGS"
29755  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29756  ac_ext=cpp
29757ac_cpp='$CXXCPP $CPPFLAGS'
29758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29761
29762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29763/* end confdefs.h.  */
29764
29765    int i;
29766
29767_ACEOF
29768if ac_fn_cxx_try_compile "$LINENO"; then :
29769
29770else
29771  supports=no
29772fi
29773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29774  ac_ext=cpp
29775ac_cpp='$CXXCPP $CPPFLAGS'
29776ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29777ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29778ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29779
29780  CXXFLAGS="$saved_cxxflags"
29781
29782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29783$as_echo "$supports" >&6; }
29784  if test "x$supports" = "xyes" ; then
29785    :
29786  else
29787    ZERO_ARCHFLAG=""
29788  fi
29789
29790
29791
29792  # Check that the compiler supports -mX flags
29793  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29794
29795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29796$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29797  supports=yes
29798
29799  saved_cflags="$CFLAGS"
29800  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29801  ac_ext=c
29802ac_cpp='$CPP $CPPFLAGS'
29803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29805ac_compiler_gnu=$ac_cv_c_compiler_gnu
29806
29807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29808/* end confdefs.h.  */
29809
29810    int i;
29811
29812_ACEOF
29813if ac_fn_c_try_compile "$LINENO"; then :
29814
29815else
29816  supports=no
29817fi
29818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29819  ac_ext=cpp
29820ac_cpp='$CXXCPP $CPPFLAGS'
29821ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29822ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29823ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29824
29825  CFLAGS="$saved_cflags"
29826
29827  saved_cxxflags="$CXXFLAGS"
29828  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29829  ac_ext=cpp
29830ac_cpp='$CXXCPP $CPPFLAGS'
29831ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29832ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29833ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29834
29835  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29836/* end confdefs.h.  */
29837
29838    int i;
29839
29840_ACEOF
29841if ac_fn_cxx_try_compile "$LINENO"; then :
29842
29843else
29844  supports=no
29845fi
29846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29847  ac_ext=cpp
29848ac_cpp='$CXXCPP $CPPFLAGS'
29849ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29850ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29851ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29852
29853  CXXFLAGS="$saved_cxxflags"
29854
29855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29856$as_echo "$supports" >&6; }
29857  if test "x$supports" = "xyes" ; then
29858    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29859  else
29860    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29861  fi
29862
29863
29864
29865
29866# Setup debug symbols (need objcopy from the toolchain for that)
29867
29868#
29869# ENABLE_DEBUG_SYMBOLS
29870# This must be done after the toolchain is setup, since we're looking at objcopy.
29871#
29872# Check whether --enable-debug-symbols was given.
29873if test "${enable_debug_symbols+set}" = set; then :
29874  enableval=$enable_debug_symbols;
29875fi
29876
29877
29878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29879$as_echo_n "checking if we should generate debug symbols... " >&6; }
29880
29881if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29882   # explicit enabling of enable-debug-symbols and can't find objcopy
29883   #   this is an error
29884   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29885fi
29886
29887if test "x$enable_debug_symbols" = "xyes"; then
29888  ENABLE_DEBUG_SYMBOLS=true
29889elif test "x$enable_debug_symbols" = "xno"; then
29890  ENABLE_DEBUG_SYMBOLS=false
29891else
29892  # default on macosx is false
29893  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29894    ENABLE_DEBUG_SYMBOLS=false
29895  # Default is on if objcopy is found, otherwise off
29896  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29897    ENABLE_DEBUG_SYMBOLS=true
29898  else
29899    ENABLE_DEBUG_SYMBOLS=false
29900  fi
29901fi
29902
29903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29904$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29905
29906#
29907# ZIP_DEBUGINFO_FILES
29908#
29909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29910$as_echo_n "checking if we should zip debug-info files... " >&6; }
29911# Check whether --enable-zip-debug-info was given.
29912if test "${enable_zip_debug_info+set}" = set; then :
29913  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29914else
29915  enable_zip_debug_info="yes"
29916fi
29917
29918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29919$as_echo "${enable_zip_debug_info}" >&6; }
29920
29921if test "x${enable_zip_debug_info}" = "xno"; then
29922   ZIP_DEBUGINFO_FILES=false
29923else
29924   ZIP_DEBUGINFO_FILES=true
29925fi
29926
29927
29928
29929
29930
29931
29932
29933###############################################################################
29934#
29935# Check dependencies for external and internal libraries.
29936#
29937###############################################################################
29938
29939
29940
29941###############################################################################
29942#
29943# OS specific settings that we never will need to probe.
29944#
29945if test "x$OPENJDK_TARGET_OS" = xlinux; then
29946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29947$as_echo_n "checking what is not needed on Linux?... " >&6; }
29948    PULSE_NOT_NEEDED=yes
29949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29950$as_echo "pulse" >&6; }
29951fi
29952
29953if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29955$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29956    ALSA_NOT_NEEDED=yes
29957    PULSE_NOT_NEEDED=yes
29958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29959$as_echo "alsa pulse" >&6; }
29960fi
29961
29962if test "x$OPENJDK_TARGET_OS" = xwindows; then
29963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29964$as_echo_n "checking what is not needed on Windows?... " >&6; }
29965    CUPS_NOT_NEEDED=yes
29966    ALSA_NOT_NEEDED=yes
29967    PULSE_NOT_NEEDED=yes
29968    X11_NOT_NEEDED=yes
29969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29970$as_echo "alsa cups pulse x11" >&6; }
29971fi
29972
29973if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29975$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29976    ALSA_NOT_NEEDED=yes
29977    PULSE_NOT_NEEDED=yes
29978    X11_NOT_NEEDED=yes
29979    FREETYPE2_NOT_NEEDED=yes
29980    # If the java runtime framework is disabled, then we need X11.
29981    # This will be adjusted below.
29982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29983$as_echo "alsa pulse x11" >&6; }
29984fi
29985
29986if test "x$OPENJDK_TARGET_OS" = xbsd; then
29987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29988$as_echo_n "checking what is not needed on bsd?... " >&6; }
29989    ALSA_NOT_NEEDED=yes
29990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29991$as_echo "alsa" >&6; }
29992fi
29993
29994if test "x$OPENJDK" = "xfalse"; then
29995    FREETYPE2_NOT_NEEDED=yes
29996fi
29997
29998if test "x$SUPPORT_HEADFUL" = xno; then
29999    X11_NOT_NEEDED=yes
30000fi
30001
30002###############################################################################
30003#
30004# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
30005# that uses this API.
30006#
30007# Check whether --enable-macosx-runtime-support was given.
30008if test "${enable_macosx_runtime_support+set}" = set; then :
30009  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30010else
30011  MACOSX_RUNTIME_SUPPORT="no"
30012fi
30013
30014
30015USE_MACOSX_RUNTIME_SUPPORT=no
30016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30017$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30018if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30019    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30020        MACOSX_RUNTIME_SUPPORT=yes
30021        USE_MACOSX_RUNTIME_SUPPORT=yes
30022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30023$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30024    else
30025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30026$as_echo "yes, but explicitly disabled." >&6; }
30027    fi
30028else
30029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30030$as_echo "no" >&6; }
30031fi
30032
30033if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30035$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30036    X11_NOT_NEEDED=
30037    FREETYPE2_NOT_NEEDED=
30038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30039$as_echo "alsa pulse" >&6; }
30040fi
30041
30042
30043
30044###############################################################################
30045#
30046# Check for X Windows
30047#
30048
30049# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30050# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30051# --x-libraries for the sysroot, if that seems to be correct.
30052if test "x$SYS_ROOT" != "x/"; then
30053  if test "x$x_includes" = xNONE; then
30054    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30055      x_includes="$SYS_ROOT/usr/X11R6/include"
30056    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30057      x_includes="$SYS_ROOT/usr/include"
30058    fi
30059  fi
30060  if test "x$x_libraries" = xNONE; then
30061    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30062      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30063    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30064      x_libraries="$SYS_ROOT/usr/lib64"
30065    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30066      x_libraries="$SYS_ROOT/usr/lib"
30067    fi
30068  fi
30069fi
30070
30071# Now let autoconf do it's magic
30072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30073$as_echo_n "checking for X... " >&6; }
30074
30075
30076# Check whether --with-x was given.
30077if test "${with_x+set}" = set; then :
30078  withval=$with_x;
30079fi
30080
30081# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30082if test "x$with_x" = xno; then
30083  # The user explicitly disabled X.
30084  have_x=disabled
30085else
30086  case $x_includes,$x_libraries in #(
30087    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30088    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30089  $as_echo_n "(cached) " >&6
30090else
30091  # One or both of the vars are not set, and there is no cached value.
30092ac_x_includes=no ac_x_libraries=no
30093rm -f -r conftest.dir
30094if mkdir conftest.dir; then
30095  cd conftest.dir
30096  cat >Imakefile <<'_ACEOF'
30097incroot:
30098	@echo incroot='${INCROOT}'
30099usrlibdir:
30100	@echo usrlibdir='${USRLIBDIR}'
30101libdir:
30102	@echo libdir='${LIBDIR}'
30103_ACEOF
30104  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30105    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30106    for ac_var in incroot usrlibdir libdir; do
30107      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30108    done
30109    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30110    for ac_extension in a so sl dylib la dll; do
30111      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30112	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30113	ac_im_usrlibdir=$ac_im_libdir; break
30114      fi
30115    done
30116    # Screen out bogus values from the imake configuration.  They are
30117    # bogus both because they are the default anyway, and because
30118    # using them would break gcc on systems where it needs fixed includes.
30119    case $ac_im_incroot in
30120	/usr/include) ac_x_includes= ;;
30121	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30122    esac
30123    case $ac_im_usrlibdir in
30124	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30125	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30126    esac
30127  fi
30128  cd ..
30129  rm -f -r conftest.dir
30130fi
30131
30132# Standard set of common directories for X headers.
30133# Check X11 before X11Rn because it is often a symlink to the current release.
30134ac_x_header_dirs='
30135/usr/X11/include
30136/usr/X11R7/include
30137/usr/X11R6/include
30138/usr/X11R5/include
30139/usr/X11R4/include
30140
30141/usr/include/X11
30142/usr/include/X11R7
30143/usr/include/X11R6
30144/usr/include/X11R5
30145/usr/include/X11R4
30146
30147/usr/local/X11/include
30148/usr/local/X11R7/include
30149/usr/local/X11R6/include
30150/usr/local/X11R5/include
30151/usr/local/X11R4/include
30152
30153/usr/local/include/X11
30154/usr/local/include/X11R7
30155/usr/local/include/X11R6
30156/usr/local/include/X11R5
30157/usr/local/include/X11R4
30158
30159/usr/X386/include
30160/usr/x386/include
30161/usr/XFree86/include/X11
30162
30163/usr/include
30164/usr/local/include
30165/usr/unsupported/include
30166/usr/athena/include
30167/usr/local/x11r5/include
30168/usr/lpp/Xamples/include
30169
30170/usr/openwin/include
30171/usr/openwin/share/include'
30172
30173if test "$ac_x_includes" = no; then
30174  # Guess where to find include files, by looking for Xlib.h.
30175  # First, try using that file with no special directory specified.
30176  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30177/* end confdefs.h.  */
30178#include <X11/Xlib.h>
30179_ACEOF
30180if ac_fn_cxx_try_cpp "$LINENO"; then :
30181  # We can compile using X headers with no special include directory.
30182ac_x_includes=
30183else
30184  for ac_dir in $ac_x_header_dirs; do
30185  if test -r "$ac_dir/X11/Xlib.h"; then
30186    ac_x_includes=$ac_dir
30187    break
30188  fi
30189done
30190fi
30191rm -f conftest.err conftest.i conftest.$ac_ext
30192fi # $ac_x_includes = no
30193
30194if test "$ac_x_libraries" = no; then
30195  # Check for the libraries.
30196  # See if we find them without any special options.
30197  # Don't add to $LIBS permanently.
30198  ac_save_LIBS=$LIBS
30199  LIBS="-lX11 $LIBS"
30200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30201/* end confdefs.h.  */
30202#include <X11/Xlib.h>
30203int
30204main ()
30205{
30206XrmInitialize ()
30207  ;
30208  return 0;
30209}
30210_ACEOF
30211if ac_fn_cxx_try_link "$LINENO"; then :
30212  LIBS=$ac_save_LIBS
30213# We can link X programs with no special library path.
30214ac_x_libraries=
30215else
30216  LIBS=$ac_save_LIBS
30217for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30218do
30219  # Don't even attempt the hair of trying to link an X program!
30220  for ac_extension in a so sl dylib la dll; do
30221    if test -r "$ac_dir/libX11.$ac_extension"; then
30222      ac_x_libraries=$ac_dir
30223      break 2
30224    fi
30225  done
30226done
30227fi
30228rm -f core conftest.err conftest.$ac_objext \
30229    conftest$ac_exeext conftest.$ac_ext
30230fi # $ac_x_libraries = no
30231
30232case $ac_x_includes,$ac_x_libraries in #(
30233  no,* | *,no | *\'*)
30234    # Didn't find X, or a directory has "'" in its name.
30235    ac_cv_have_x="have_x=no";; #(
30236  *)
30237    # Record where we found X for the cache.
30238    ac_cv_have_x="have_x=yes\
30239	ac_x_includes='$ac_x_includes'\
30240	ac_x_libraries='$ac_x_libraries'"
30241esac
30242fi
30243;; #(
30244    *) have_x=yes;;
30245  esac
30246  eval "$ac_cv_have_x"
30247fi # $with_x != no
30248
30249if test "$have_x" != yes; then
30250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30251$as_echo "$have_x" >&6; }
30252  no_x=yes
30253else
30254  # If each of the values was on the command line, it overrides each guess.
30255  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30256  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30257  # Update the cache value to reflect the command line values.
30258  ac_cv_have_x="have_x=yes\
30259	ac_x_includes='$x_includes'\
30260	ac_x_libraries='$x_libraries'"
30261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30262$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30263fi
30264
30265if test "$no_x" = yes; then
30266  # Not all programs may use this symbol, but it does not hurt to define it.
30267
30268$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30269
30270  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30271else
30272  if test -n "$x_includes"; then
30273    X_CFLAGS="$X_CFLAGS -I$x_includes"
30274  fi
30275
30276  # It would also be nice to do this for all -L options, not just this one.
30277  if test -n "$x_libraries"; then
30278    X_LIBS="$X_LIBS -L$x_libraries"
30279    # For Solaris; some versions of Sun CC require a space after -R and
30280    # others require no space.  Words are not sufficient . . . .
30281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30282$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30283    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30284    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30285    ac_cxx_werror_flag=yes
30286    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30287/* end confdefs.h.  */
30288
30289int
30290main ()
30291{
30292
30293  ;
30294  return 0;
30295}
30296_ACEOF
30297if ac_fn_cxx_try_link "$LINENO"; then :
30298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30299$as_echo "no" >&6; }
30300       X_LIBS="$X_LIBS -R$x_libraries"
30301else
30302  LIBS="$ac_xsave_LIBS -R $x_libraries"
30303       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30304/* end confdefs.h.  */
30305
30306int
30307main ()
30308{
30309
30310  ;
30311  return 0;
30312}
30313_ACEOF
30314if ac_fn_cxx_try_link "$LINENO"; then :
30315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30316$as_echo "yes" >&6; }
30317	  X_LIBS="$X_LIBS -R $x_libraries"
30318else
30319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30320$as_echo "neither works" >&6; }
30321fi
30322rm -f core conftest.err conftest.$ac_objext \
30323    conftest$ac_exeext conftest.$ac_ext
30324fi
30325rm -f core conftest.err conftest.$ac_objext \
30326    conftest$ac_exeext conftest.$ac_ext
30327    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30328    LIBS=$ac_xsave_LIBS
30329  fi
30330
30331  # Check for system-dependent libraries X programs must link with.
30332  # Do this before checking for the system-independent R6 libraries
30333  # (-lICE), since we may need -lsocket or whatever for X linking.
30334
30335  if test "$ISC" = yes; then
30336    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30337  else
30338    # Martyn Johnson says this is needed for Ultrix, if the X
30339    # libraries were built with DECnet support.  And Karl Berry says
30340    # the Alpha needs dnet_stub (dnet does not exist).
30341    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30342    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30343/* end confdefs.h.  */
30344
30345/* Override any GCC internal prototype to avoid an error.
30346   Use char because int might match the return type of a GCC
30347   builtin and then its argument prototype would still apply.  */
30348#ifdef __cplusplus
30349extern "C"
30350#endif
30351char XOpenDisplay ();
30352int
30353main ()
30354{
30355return XOpenDisplay ();
30356  ;
30357  return 0;
30358}
30359_ACEOF
30360if ac_fn_cxx_try_link "$LINENO"; then :
30361
30362else
30363  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30364$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30365if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30366  $as_echo_n "(cached) " >&6
30367else
30368  ac_check_lib_save_LIBS=$LIBS
30369LIBS="-ldnet  $LIBS"
30370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30371/* end confdefs.h.  */
30372
30373/* Override any GCC internal prototype to avoid an error.
30374   Use char because int might match the return type of a GCC
30375   builtin and then its argument prototype would still apply.  */
30376#ifdef __cplusplus
30377extern "C"
30378#endif
30379char dnet_ntoa ();
30380int
30381main ()
30382{
30383return dnet_ntoa ();
30384  ;
30385  return 0;
30386}
30387_ACEOF
30388if ac_fn_cxx_try_link "$LINENO"; then :
30389  ac_cv_lib_dnet_dnet_ntoa=yes
30390else
30391  ac_cv_lib_dnet_dnet_ntoa=no
30392fi
30393rm -f core conftest.err conftest.$ac_objext \
30394    conftest$ac_exeext conftest.$ac_ext
30395LIBS=$ac_check_lib_save_LIBS
30396fi
30397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30398$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30399if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30400  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30401fi
30402
30403    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30404      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30405$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30406if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30407  $as_echo_n "(cached) " >&6
30408else
30409  ac_check_lib_save_LIBS=$LIBS
30410LIBS="-ldnet_stub  $LIBS"
30411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30412/* end confdefs.h.  */
30413
30414/* Override any GCC internal prototype to avoid an error.
30415   Use char because int might match the return type of a GCC
30416   builtin and then its argument prototype would still apply.  */
30417#ifdef __cplusplus
30418extern "C"
30419#endif
30420char dnet_ntoa ();
30421int
30422main ()
30423{
30424return dnet_ntoa ();
30425  ;
30426  return 0;
30427}
30428_ACEOF
30429if ac_fn_cxx_try_link "$LINENO"; then :
30430  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30431else
30432  ac_cv_lib_dnet_stub_dnet_ntoa=no
30433fi
30434rm -f core conftest.err conftest.$ac_objext \
30435    conftest$ac_exeext conftest.$ac_ext
30436LIBS=$ac_check_lib_save_LIBS
30437fi
30438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30439$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30440if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30441  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30442fi
30443
30444    fi
30445fi
30446rm -f core conftest.err conftest.$ac_objext \
30447    conftest$ac_exeext conftest.$ac_ext
30448    LIBS="$ac_xsave_LIBS"
30449
30450    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30451    # to get the SysV transport functions.
30452    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30453    # needs -lnsl.
30454    # The nsl library prevents programs from opening the X display
30455    # on Irix 5.2, according to T.E. Dickey.
30456    # The functions gethostbyname, getservbyname, and inet_addr are
30457    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30458    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30459if test "x$ac_cv_func_gethostbyname" = xyes; then :
30460
30461fi
30462
30463    if test $ac_cv_func_gethostbyname = no; then
30464      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30465$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30466if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30467  $as_echo_n "(cached) " >&6
30468else
30469  ac_check_lib_save_LIBS=$LIBS
30470LIBS="-lnsl  $LIBS"
30471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30472/* end confdefs.h.  */
30473
30474/* Override any GCC internal prototype to avoid an error.
30475   Use char because int might match the return type of a GCC
30476   builtin and then its argument prototype would still apply.  */
30477#ifdef __cplusplus
30478extern "C"
30479#endif
30480char gethostbyname ();
30481int
30482main ()
30483{
30484return gethostbyname ();
30485  ;
30486  return 0;
30487}
30488_ACEOF
30489if ac_fn_cxx_try_link "$LINENO"; then :
30490  ac_cv_lib_nsl_gethostbyname=yes
30491else
30492  ac_cv_lib_nsl_gethostbyname=no
30493fi
30494rm -f core conftest.err conftest.$ac_objext \
30495    conftest$ac_exeext conftest.$ac_ext
30496LIBS=$ac_check_lib_save_LIBS
30497fi
30498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30499$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30500if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30501  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30502fi
30503
30504      if test $ac_cv_lib_nsl_gethostbyname = no; then
30505	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30506$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30507if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30508  $as_echo_n "(cached) " >&6
30509else
30510  ac_check_lib_save_LIBS=$LIBS
30511LIBS="-lbsd  $LIBS"
30512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30513/* end confdefs.h.  */
30514
30515/* Override any GCC internal prototype to avoid an error.
30516   Use char because int might match the return type of a GCC
30517   builtin and then its argument prototype would still apply.  */
30518#ifdef __cplusplus
30519extern "C"
30520#endif
30521char gethostbyname ();
30522int
30523main ()
30524{
30525return gethostbyname ();
30526  ;
30527  return 0;
30528}
30529_ACEOF
30530if ac_fn_cxx_try_link "$LINENO"; then :
30531  ac_cv_lib_bsd_gethostbyname=yes
30532else
30533  ac_cv_lib_bsd_gethostbyname=no
30534fi
30535rm -f core conftest.err conftest.$ac_objext \
30536    conftest$ac_exeext conftest.$ac_ext
30537LIBS=$ac_check_lib_save_LIBS
30538fi
30539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30540$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30541if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30542  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30543fi
30544
30545      fi
30546    fi
30547
30548    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30549    # socket/setsockopt and other routines are undefined under SCO ODT
30550    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30551    # on later versions), says Simon Leinen: it contains gethostby*
30552    # variants that don't use the name server (or something).  -lsocket
30553    # must be given before -lnsl if both are needed.  We assume that
30554    # if connect needs -lnsl, so does gethostbyname.
30555    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30556if test "x$ac_cv_func_connect" = xyes; then :
30557
30558fi
30559
30560    if test $ac_cv_func_connect = no; then
30561      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30562$as_echo_n "checking for connect in -lsocket... " >&6; }
30563if ${ac_cv_lib_socket_connect+:} false; then :
30564  $as_echo_n "(cached) " >&6
30565else
30566  ac_check_lib_save_LIBS=$LIBS
30567LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30569/* end confdefs.h.  */
30570
30571/* Override any GCC internal prototype to avoid an error.
30572   Use char because int might match the return type of a GCC
30573   builtin and then its argument prototype would still apply.  */
30574#ifdef __cplusplus
30575extern "C"
30576#endif
30577char connect ();
30578int
30579main ()
30580{
30581return connect ();
30582  ;
30583  return 0;
30584}
30585_ACEOF
30586if ac_fn_cxx_try_link "$LINENO"; then :
30587  ac_cv_lib_socket_connect=yes
30588else
30589  ac_cv_lib_socket_connect=no
30590fi
30591rm -f core conftest.err conftest.$ac_objext \
30592    conftest$ac_exeext conftest.$ac_ext
30593LIBS=$ac_check_lib_save_LIBS
30594fi
30595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30596$as_echo "$ac_cv_lib_socket_connect" >&6; }
30597if test "x$ac_cv_lib_socket_connect" = xyes; then :
30598  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30599fi
30600
30601    fi
30602
30603    # Guillermo Gomez says -lposix is necessary on A/UX.
30604    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30605if test "x$ac_cv_func_remove" = xyes; then :
30606
30607fi
30608
30609    if test $ac_cv_func_remove = no; then
30610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30611$as_echo_n "checking for remove in -lposix... " >&6; }
30612if ${ac_cv_lib_posix_remove+:} false; then :
30613  $as_echo_n "(cached) " >&6
30614else
30615  ac_check_lib_save_LIBS=$LIBS
30616LIBS="-lposix  $LIBS"
30617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30618/* end confdefs.h.  */
30619
30620/* Override any GCC internal prototype to avoid an error.
30621   Use char because int might match the return type of a GCC
30622   builtin and then its argument prototype would still apply.  */
30623#ifdef __cplusplus
30624extern "C"
30625#endif
30626char remove ();
30627int
30628main ()
30629{
30630return remove ();
30631  ;
30632  return 0;
30633}
30634_ACEOF
30635if ac_fn_cxx_try_link "$LINENO"; then :
30636  ac_cv_lib_posix_remove=yes
30637else
30638  ac_cv_lib_posix_remove=no
30639fi
30640rm -f core conftest.err conftest.$ac_objext \
30641    conftest$ac_exeext conftest.$ac_ext
30642LIBS=$ac_check_lib_save_LIBS
30643fi
30644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30645$as_echo "$ac_cv_lib_posix_remove" >&6; }
30646if test "x$ac_cv_lib_posix_remove" = xyes; then :
30647  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30648fi
30649
30650    fi
30651
30652    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30653    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30654if test "x$ac_cv_func_shmat" = xyes; then :
30655
30656fi
30657
30658    if test $ac_cv_func_shmat = no; then
30659      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30660$as_echo_n "checking for shmat in -lipc... " >&6; }
30661if ${ac_cv_lib_ipc_shmat+:} false; then :
30662  $as_echo_n "(cached) " >&6
30663else
30664  ac_check_lib_save_LIBS=$LIBS
30665LIBS="-lipc  $LIBS"
30666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30667/* end confdefs.h.  */
30668
30669/* Override any GCC internal prototype to avoid an error.
30670   Use char because int might match the return type of a GCC
30671   builtin and then its argument prototype would still apply.  */
30672#ifdef __cplusplus
30673extern "C"
30674#endif
30675char shmat ();
30676int
30677main ()
30678{
30679return shmat ();
30680  ;
30681  return 0;
30682}
30683_ACEOF
30684if ac_fn_cxx_try_link "$LINENO"; then :
30685  ac_cv_lib_ipc_shmat=yes
30686else
30687  ac_cv_lib_ipc_shmat=no
30688fi
30689rm -f core conftest.err conftest.$ac_objext \
30690    conftest$ac_exeext conftest.$ac_ext
30691LIBS=$ac_check_lib_save_LIBS
30692fi
30693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30694$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30695if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30696  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30697fi
30698
30699    fi
30700  fi
30701
30702  # Check for libraries that X11R6 Xt/Xaw programs need.
30703  ac_save_LDFLAGS=$LDFLAGS
30704  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30705  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30706  # check for ICE first), but we must link in the order -lSM -lICE or
30707  # we get undefined symbols.  So assume we have SM if we have ICE.
30708  # These have to be linked with before -lX11, unlike the other
30709  # libraries we check for below, so use a different variable.
30710  # John Interrante, Karl Berry
30711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30712$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30713if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30714  $as_echo_n "(cached) " >&6
30715else
30716  ac_check_lib_save_LIBS=$LIBS
30717LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30719/* end confdefs.h.  */
30720
30721/* Override any GCC internal prototype to avoid an error.
30722   Use char because int might match the return type of a GCC
30723   builtin and then its argument prototype would still apply.  */
30724#ifdef __cplusplus
30725extern "C"
30726#endif
30727char IceConnectionNumber ();
30728int
30729main ()
30730{
30731return IceConnectionNumber ();
30732  ;
30733  return 0;
30734}
30735_ACEOF
30736if ac_fn_cxx_try_link "$LINENO"; then :
30737  ac_cv_lib_ICE_IceConnectionNumber=yes
30738else
30739  ac_cv_lib_ICE_IceConnectionNumber=no
30740fi
30741rm -f core conftest.err conftest.$ac_objext \
30742    conftest$ac_exeext conftest.$ac_ext
30743LIBS=$ac_check_lib_save_LIBS
30744fi
30745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30746$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30747if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30748  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30749fi
30750
30751  LDFLAGS=$ac_save_LDFLAGS
30752
30753fi
30754
30755
30756# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30757# this doesn't make sense so we remove it.
30758if test "x$COMPILE_TYPE" = xcross; then
30759  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30760fi
30761
30762if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30763
30764    # Print a helpful message on how to acquire the necessary build dependency.
30765    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30766    MISSING_DEPENDENCY=x11
30767    PKGHANDLER_COMMAND=
30768
30769    case $PKGHANDLER in
30770	apt-get)
30771                apt_help     $MISSING_DEPENDENCY ;;
30772    yum)
30773                yum_help     $MISSING_DEPENDENCY ;;
30774	port)
30775                port_help    $MISSING_DEPENDENCY ;;
30776	pkgutil)
30777                pkgutil_help $MISSING_DEPENDENCY ;;
30778	pkgadd)
30779                pkgadd_help  $MISSING_DEPENDENCY ;;
30780    * )
30781      break ;;
30782    esac
30783
30784    if test "x$PKGHANDLER_COMMAND" != x; then
30785        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30786    fi
30787
30788    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30789fi
30790
30791# Some of the old makefiles require a setting of OPENWIN_HOME
30792# Since the X11R6 directory has disappeared on later Linuxes,
30793# we need to probe for it.
30794if test "x$OPENJDK_TARGET_OS" = xlinux; then
30795    if test -d "$SYS_ROOT/usr/X11R6"; then
30796        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30797    elif test -d "$SYS_ROOT/usr/include/X11"; then
30798        OPENWIN_HOME="$SYS_ROOT/usr"
30799    fi
30800fi
30801if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30802    OPENWIN_HOME="/usr/openwin"
30803fi
30804
30805
30806
30807#
30808# Weird Sol10 something check...TODO change to try compile
30809#
30810if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30811  if test "`uname -r`" = "5.10"; then
30812     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30813     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30814     fi
30815  fi
30816fi
30817
30818ac_ext=c
30819ac_cpp='$CPP $CPPFLAGS'
30820ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30821ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30822ac_compiler_gnu=$ac_cv_c_compiler_gnu
30823
30824OLD_CFLAGS="$CFLAGS"
30825CFLAGS="$CFLAGS $X_CFLAGS"
30826
30827# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30828for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30829do :
30830  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30831ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30832                   # include <X11/Xutil.h>
30833
30834"
30835if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30836  cat >>confdefs.h <<_ACEOF
30837#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30838_ACEOF
30839 X11_A_OK=yes
30840else
30841  X11_A_OK=no; break
30842fi
30843
30844done
30845
30846
30847CFLAGS="$OLD_CFLAGS"
30848ac_ext=cpp
30849ac_cpp='$CXXCPP $CPPFLAGS'
30850ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30851ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30852ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30853
30854
30855if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30856
30857    # Print a helpful message on how to acquire the necessary build dependency.
30858    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30859    MISSING_DEPENDENCY=x11
30860    PKGHANDLER_COMMAND=
30861
30862    case $PKGHANDLER in
30863	apt-get)
30864                apt_help     $MISSING_DEPENDENCY ;;
30865    yum)
30866                yum_help     $MISSING_DEPENDENCY ;;
30867	port)
30868                port_help    $MISSING_DEPENDENCY ;;
30869	pkgutil)
30870                pkgutil_help $MISSING_DEPENDENCY ;;
30871	pkgadd)
30872                pkgadd_help  $MISSING_DEPENDENCY ;;
30873    * )
30874      break ;;
30875    esac
30876
30877    if test "x$PKGHANDLER_COMMAND" != x; then
30878        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30879    fi
30880
30881    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30882fi
30883
30884
30885
30886
30887
30888
30889###############################################################################
30890#
30891# The common unix printing system cups is used to print from java.
30892#
30893
30894# Check whether --with-cups was given.
30895if test "${with_cups+set}" = set; then :
30896  withval=$with_cups;
30897fi
30898
30899
30900# Check whether --with-cups-include was given.
30901if test "${with_cups_include+set}" = set; then :
30902  withval=$with_cups_include;
30903fi
30904
30905
30906if test "x$CUPS_NOT_NEEDED" = xyes; then
30907	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30908		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30909$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30910	fi
30911	CUPS_CFLAGS=
30912else
30913	CUPS_FOUND=no
30914
30915	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30916	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30917	fi
30918
30919	if test "x${with_cups}" != x; then
30920	    CUPS_CFLAGS="-I${with_cups}/include"
30921	    CUPS_FOUND=yes
30922	fi
30923	if test "x${with_cups_include}" != x; then
30924	    CUPS_CFLAGS="-I${with_cups_include}"
30925	    CUPS_FOUND=yes
30926	fi
30927	if test "x$CUPS_FOUND" = xno; then
30928
30929
30930    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30931        # Source the builddeps file again, to make sure it uses the latest variables!
30932        . $builddepsfile
30933        # Look for a target and build machine specific resource!
30934        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30935        if test "x$resource" = x; then
30936            # Ok, lets instead look for a target specific resource
30937            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30938        fi
30939        if test "x$resource" = x; then
30940            # Ok, lets instead look for a build specific resource
30941            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30942        fi
30943        if test "x$resource" = x; then
30944            # Ok, lets instead look for a generic resource
30945            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30946            resource=${builddep_cups}
30947        fi
30948        if test "x$resource" != x; then
30949            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30950$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30951	    # If the resource in the builddeps.conf file is an existing directory,
30952	    # for example /java/linux/cups
30953	    if test -d ${resource}; then
30954	       depdir=${resource}
30955	    else
30956
30957# cups is for example mymodule
30958# $resource is for example libs/general/libmymod_1_2_3.zip
30959# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30960# $with_builddeps_dir is for example /localhome/builddeps
30961# depdir is the name of the variable into which we store the depdir, eg MYMOD
30962# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30963# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30964    filename=`basename $resource`
30965    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30966    filebase=${filename%%.*}
30967    extension=${filename#*.}
30968    installdir=$with_builddeps_dir/$filebase
30969    if test ! -f $installdir/$filename.unpacked; then
30970        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30971$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30972        if test ! -d $installdir; then
30973            mkdir -p $installdir
30974        fi
30975        if test ! -d $installdir; then
30976            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30977        fi
30978        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30979        touch $tmpfile
30980        if test ! -f $tmpfile; then
30981            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30982        fi
30983
30984    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30985    # $tmpfile is the local file name for the downloaded file.
30986    VALID_TOOL=no
30987    if test "x$BDEPS_FTP" = xwget; then
30988       VALID_TOOL=yes
30989       wget -O $tmpfile $with_builddeps_server/$resource
30990    fi
30991    if test "x$BDEPS_FTP" = xlftp; then
30992       VALID_TOOL=yes
30993       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30994    fi
30995    if test "x$BDEPS_FTP" = xftp; then
30996        VALID_TOOL=yes
30997        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30998        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30999        FTPUSERPWD=${FTPSERVER%%@*}
31000        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31001            FTPUSER=${userpwd%%:*}
31002            FTPPWD=${userpwd#*@}
31003            FTPSERVER=${FTPSERVER#*@}
31004        else
31005            FTPUSER=ftp
31006            FTPPWD=ftp
31007        fi
31008        # the "pass" command does not work on some
31009        # ftp clients (read ftp.exe) but if it works,
31010        # passive mode is better!
31011        (\
31012            echo "user $FTPUSER $FTPPWD"        ;\
31013            echo "pass"                         ;\
31014            echo "bin"                          ;\
31015            echo "get $FTPPATH $tmpfile"              ;\
31016        ) | ftp -in $FTPSERVER
31017    fi
31018    if test "x$VALID_TOOL" != xyes; then
31019       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31020    fi
31021
31022        mv $tmpfile $installdir/$filename
31023        if test ! -s $installdir/$filename; then
31024            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31025        fi
31026        case "$extension" in
31027            zip)  echo "Unzipping $installdir/$filename..."
31028               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31029            ;;
31030            tar.gz) echo "Untaring $installdir/$filename..."
31031               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31032            ;;
31033            tgz) echo "Untaring $installdir/$filename..."
31034               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31035            ;;
31036            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31037            ;;
31038        esac
31039    fi
31040    if test -f $installdir/$filename.unpacked; then
31041        depdir=$installdir
31042    fi
31043
31044	    fi
31045            # Source the builddeps file again, because in the previous command, the depdir
31046            # was updated to point at the current build dependency install directory.
31047            . $builddepsfile
31048            # Now extract variables from the builddeps.conf files.
31049            theroot=${builddep_cups_ROOT}
31050            thecflags=${builddep_cups_CFLAGS}
31051            thelibs=${builddep_cups_LIBS}
31052            if test "x$depdir" = x; then
31053                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31054            fi
31055            CUPS=$depdir
31056            if test "x$theroot" != x; then
31057               CUPS="$theroot"
31058            fi
31059            if test "x$thecflags" != x; then
31060               CUPS_CFLAGS="$thecflags"
31061            fi
31062            if test "x$thelibs" != x; then
31063               CUPS_LIBS="$thelibs"
31064            fi
31065            CUPS_FOUND=yes
31066
31067        fi
31068
31069    fi
31070
31071	fi
31072	if test "x$CUPS_FOUND" = xno; then
31073	    # Are the cups headers installed in the default /usr/include location?
31074	    for ac_header in cups/cups.h cups/ppd.h
31075do :
31076  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31077ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31078if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31079  cat >>confdefs.h <<_ACEOF
31080#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31081_ACEOF
31082 CUPS_FOUND=yes
31083	                      CUPS_CFLAGS=
31084	                      DEFAULT_CUPS=yes
31085fi
31086
31087done
31088
31089	fi
31090	if test "x$CUPS_FOUND" = xno; then
31091	    # Getting nervous now? Lets poke around for standard Solaris third-party
31092	    # package installation locations.
31093	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31094$as_echo_n "checking for cups headers... " >&6; }
31095	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31096	       # An SFW package seems to be installed!
31097	       CUPS_FOUND=yes
31098	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31099	    elif test -s /opt/csw/include/cups/cups.h; then
31100	       # A CSW package seems to be installed!
31101	       CUPS_FOUND=yes
31102	       CUPS_CFLAGS="-I/opt/csw/include"
31103	    fi
31104	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31105$as_echo "$CUPS_FOUND" >&6; }
31106	fi
31107	if test "x$CUPS_FOUND" = xno; then
31108
31109    # Print a helpful message on how to acquire the necessary build dependency.
31110    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31111    MISSING_DEPENDENCY=cups
31112    PKGHANDLER_COMMAND=
31113
31114    case $PKGHANDLER in
31115	apt-get)
31116                apt_help     $MISSING_DEPENDENCY ;;
31117    yum)
31118                yum_help     $MISSING_DEPENDENCY ;;
31119	port)
31120                port_help    $MISSING_DEPENDENCY ;;
31121	pkgutil)
31122                pkgutil_help $MISSING_DEPENDENCY ;;
31123	pkgadd)
31124                pkgadd_help  $MISSING_DEPENDENCY ;;
31125    * )
31126      break ;;
31127    esac
31128
31129    if test "x$PKGHANDLER_COMMAND" != x; then
31130        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31131    fi
31132
31133	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31134	fi
31135fi
31136
31137
31138
31139
31140
31141
31142###############################################################################
31143#
31144# The ubiquitous freetype2 library is used to render fonts.
31145#
31146
31147# Check whether --with-freetype was given.
31148if test "${with_freetype+set}" = set; then :
31149  withval=$with_freetype;
31150fi
31151
31152
31153# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31154USING_SYSTEM_FT_LIB=false
31155
31156if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31157	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31158		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31159$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31160	fi
31161	FREETYPE2_CFLAGS=
31162	FREETYPE2_LIBS=
31163        FREETYPE2_LIB_PATH=
31164else
31165	FREETYPE2_FOUND=no
31166
31167	if test "x$with_freetype" != x; then
31168
31169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31170
31171  # Input might be given as Windows format, start by converting to
31172  # unix format.
31173  path="$with_freetype"
31174  new_path=`$CYGPATH -u "$path"`
31175
31176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31179  # "foo.exe" is OK but "foo" is an error.
31180  #
31181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31182  # It is also a way to make sure we got the proper file name for the real test later on.
31183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31184  if test "x$test_shortpath" = x; then
31185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31186$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31187    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31188  fi
31189
31190  # Call helper function which possibly converts this using DOS-style short mode.
31191  # If so, the updated path is stored in $new_path.
31192
31193  input_path="$new_path"
31194  # Check if we need to convert this using DOS-style short mode. If the path
31195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31196  # take no chances and rewrite it.
31197  # Note: m4 eats our [], so we need to use [ and ] instead.
31198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31199  if test "x$has_forbidden_chars" != x; then
31200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31204      # Going to short mode and back again did indeed matter. Since short mode is
31205      # case insensitive, let's make it lowercase to improve readability.
31206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31207      # Now convert it back to Unix-stile (cygpath)
31208      input_path=`$CYGPATH -u "$shortmode_path"`
31209      new_path="$input_path"
31210    fi
31211  fi
31212
31213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31214  if test "x$test_cygdrive_prefix" = x; then
31215    # As a simple fix, exclude /usr/bin since it's not a real path.
31216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31218      # a path prefixed by /cygdrive for fixpath to work.
31219      new_path="$CYGWIN_ROOT_PATH$input_path"
31220    fi
31221  fi
31222
31223
31224  if test "x$path" != "x$new_path"; then
31225    with_freetype="$new_path"
31226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31227$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31228  fi
31229
31230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31231
31232  path="$with_freetype"
31233  has_colon=`$ECHO $path | $GREP ^.:`
31234  new_path="$path"
31235  if test "x$has_colon" = x; then
31236    # Not in mixed or Windows style, start by that.
31237    new_path=`cmd //c echo $path`
31238  fi
31239
31240
31241  input_path="$new_path"
31242  # Check if we need to convert this using DOS-style short mode. If the path
31243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31244  # take no chances and rewrite it.
31245  # Note: m4 eats our [], so we need to use [ and ] instead.
31246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31247  if test "x$has_forbidden_chars" != x; then
31248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31250  fi
31251
31252
31253  windows_path="$new_path"
31254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31255    unix_path=`$CYGPATH -u "$windows_path"`
31256    new_path="$unix_path"
31257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31259    new_path="$unix_path"
31260  fi
31261
31262  if test "x$path" != "x$new_path"; then
31263    with_freetype="$new_path"
31264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31265$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31266  fi
31267
31268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31270
31271  else
31272    # We're on a posix platform. Hooray! :)
31273    path="$with_freetype"
31274    has_space=`$ECHO "$path" | $GREP " "`
31275    if test "x$has_space" != x; then
31276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31277$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31278      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31279    fi
31280
31281    # Use eval to expand a potential ~
31282    eval path="$path"
31283    if test ! -f "$path" && test ! -d "$path"; then
31284      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31285    fi
31286
31287    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31288  fi
31289
31290	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31291            FREETYPE2_LIB_PATH="$with_freetype/lib"
31292            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31293                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31294                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31295            fi
31296            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31297                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31298            fi
31299	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31300            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31301                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31302            fi
31303 	    FREETYPE2_FOUND=yes
31304   	    if test "x$FREETYPE2_FOUND" = xyes; then
31305	        # Verify that the directories exist
31306                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31307		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31308		fi
31309	        # List the contents of the lib.
31310		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31311                if test "x$FREETYPELIB" = x; then
31312		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31313		fi
31314	        # Check one h-file
31315                if ! test -s "$with_freetype/include/ft2build.h"; then
31316		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31317		fi
31318            fi
31319        fi
31320	if test "x$FREETYPE2_FOUND" = xno; then
31321
31322
31323    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31324        # Source the builddeps file again, to make sure it uses the latest variables!
31325        . $builddepsfile
31326        # Look for a target and build machine specific resource!
31327        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31328        if test "x$resource" = x; then
31329            # Ok, lets instead look for a target specific resource
31330            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31331        fi
31332        if test "x$resource" = x; then
31333            # Ok, lets instead look for a build specific resource
31334            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31335        fi
31336        if test "x$resource" = x; then
31337            # Ok, lets instead look for a generic resource
31338            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31339            resource=${builddep_freetype2}
31340        fi
31341        if test "x$resource" != x; then
31342            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31343$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31344	    # If the resource in the builddeps.conf file is an existing directory,
31345	    # for example /java/linux/cups
31346	    if test -d ${resource}; then
31347	       depdir=${resource}
31348	    else
31349
31350# freetype2 is for example mymodule
31351# $resource is for example libs/general/libmymod_1_2_3.zip
31352# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31353# $with_builddeps_dir is for example /localhome/builddeps
31354# depdir is the name of the variable into which we store the depdir, eg MYMOD
31355# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31356# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31357    filename=`basename $resource`
31358    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31359    filebase=${filename%%.*}
31360    extension=${filename#*.}
31361    installdir=$with_builddeps_dir/$filebase
31362    if test ! -f $installdir/$filename.unpacked; then
31363        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31364$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31365        if test ! -d $installdir; then
31366            mkdir -p $installdir
31367        fi
31368        if test ! -d $installdir; then
31369            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31370        fi
31371        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31372        touch $tmpfile
31373        if test ! -f $tmpfile; then
31374            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31375        fi
31376
31377    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31378    # $tmpfile is the local file name for the downloaded file.
31379    VALID_TOOL=no
31380    if test "x$BDEPS_FTP" = xwget; then
31381       VALID_TOOL=yes
31382       wget -O $tmpfile $with_builddeps_server/$resource
31383    fi
31384    if test "x$BDEPS_FTP" = xlftp; then
31385       VALID_TOOL=yes
31386       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31387    fi
31388    if test "x$BDEPS_FTP" = xftp; then
31389        VALID_TOOL=yes
31390        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31391        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31392        FTPUSERPWD=${FTPSERVER%%@*}
31393        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31394            FTPUSER=${userpwd%%:*}
31395            FTPPWD=${userpwd#*@}
31396            FTPSERVER=${FTPSERVER#*@}
31397        else
31398            FTPUSER=ftp
31399            FTPPWD=ftp
31400        fi
31401        # the "pass" command does not work on some
31402        # ftp clients (read ftp.exe) but if it works,
31403        # passive mode is better!
31404        (\
31405            echo "user $FTPUSER $FTPPWD"        ;\
31406            echo "pass"                         ;\
31407            echo "bin"                          ;\
31408            echo "get $FTPPATH $tmpfile"              ;\
31409        ) | ftp -in $FTPSERVER
31410    fi
31411    if test "x$VALID_TOOL" != xyes; then
31412       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31413    fi
31414
31415        mv $tmpfile $installdir/$filename
31416        if test ! -s $installdir/$filename; then
31417            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31418        fi
31419        case "$extension" in
31420            zip)  echo "Unzipping $installdir/$filename..."
31421               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31422            ;;
31423            tar.gz) echo "Untaring $installdir/$filename..."
31424               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31425            ;;
31426            tgz) echo "Untaring $installdir/$filename..."
31427               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31428            ;;
31429            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31430            ;;
31431        esac
31432    fi
31433    if test -f $installdir/$filename.unpacked; then
31434        depdir=$installdir
31435    fi
31436
31437	    fi
31438            # Source the builddeps file again, because in the previous command, the depdir
31439            # was updated to point at the current build dependency install directory.
31440            . $builddepsfile
31441            # Now extract variables from the builddeps.conf files.
31442            theroot=${builddep_freetype2_ROOT}
31443            thecflags=${builddep_freetype2_CFLAGS}
31444            thelibs=${builddep_freetype2_LIBS}
31445            if test "x$depdir" = x; then
31446                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31447            fi
31448            FREETYPE2=$depdir
31449            if test "x$theroot" != x; then
31450               FREETYPE2="$theroot"
31451            fi
31452            if test "x$thecflags" != x; then
31453               FREETYPE2_CFLAGS="$thecflags"
31454            fi
31455            if test "x$thelibs" != x; then
31456               FREETYPE2_LIBS="$thelibs"
31457            fi
31458            FREETYPE2_FOUND=yes
31459            else FREETYPE2_FOUND=no
31460
31461        fi
31462        else FREETYPE2_FOUND=no
31463
31464    fi
31465
31466            USING_SYSTEM_FT_LIB=true
31467	fi
31468	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31469            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31470
31471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31472
31473  # Input might be given as Windows format, start by converting to
31474  # unix format.
31475  path="$FREETYPELOCATION"
31476  new_path=`$CYGPATH -u "$path"`
31477
31478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31481  # "foo.exe" is OK but "foo" is an error.
31482  #
31483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31484  # It is also a way to make sure we got the proper file name for the real test later on.
31485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31486  if test "x$test_shortpath" = x; then
31487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31488$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31489    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31490  fi
31491
31492  # Call helper function which possibly converts this using DOS-style short mode.
31493  # If so, the updated path is stored in $new_path.
31494
31495  input_path="$new_path"
31496  # Check if we need to convert this using DOS-style short mode. If the path
31497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31498  # take no chances and rewrite it.
31499  # Note: m4 eats our [], so we need to use [ and ] instead.
31500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31501  if test "x$has_forbidden_chars" != x; then
31502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31506      # Going to short mode and back again did indeed matter. Since short mode is
31507      # case insensitive, let's make it lowercase to improve readability.
31508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31509      # Now convert it back to Unix-stile (cygpath)
31510      input_path=`$CYGPATH -u "$shortmode_path"`
31511      new_path="$input_path"
31512    fi
31513  fi
31514
31515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31516  if test "x$test_cygdrive_prefix" = x; then
31517    # As a simple fix, exclude /usr/bin since it's not a real path.
31518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31520      # a path prefixed by /cygdrive for fixpath to work.
31521      new_path="$CYGWIN_ROOT_PATH$input_path"
31522    fi
31523  fi
31524
31525
31526  if test "x$path" != "x$new_path"; then
31527    FREETYPELOCATION="$new_path"
31528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31529$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31530  fi
31531
31532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31533
31534  path="$FREETYPELOCATION"
31535  has_colon=`$ECHO $path | $GREP ^.:`
31536  new_path="$path"
31537  if test "x$has_colon" = x; then
31538    # Not in mixed or Windows style, start by that.
31539    new_path=`cmd //c echo $path`
31540  fi
31541
31542
31543  input_path="$new_path"
31544  # Check if we need to convert this using DOS-style short mode. If the path
31545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31546  # take no chances and rewrite it.
31547  # Note: m4 eats our [], so we need to use [ and ] instead.
31548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31549  if test "x$has_forbidden_chars" != x; then
31550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31552  fi
31553
31554
31555  windows_path="$new_path"
31556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31557    unix_path=`$CYGPATH -u "$windows_path"`
31558    new_path="$unix_path"
31559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31561    new_path="$unix_path"
31562  fi
31563
31564  if test "x$path" != "x$new_path"; then
31565    FREETYPELOCATION="$new_path"
31566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31567$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31568  fi
31569
31570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31572
31573  else
31574    # We're on a posix platform. Hooray! :)
31575    path="$FREETYPELOCATION"
31576    has_space=`$ECHO "$path" | $GREP " "`
31577    if test "x$has_space" != x; then
31578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31579$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31580      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31581    fi
31582
31583    # Use eval to expand a potential ~
31584    eval path="$path"
31585    if test ! -f "$path" && test ! -d "$path"; then
31586      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31587    fi
31588
31589    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31590  fi
31591
31592	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31593$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31594	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31595	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31596	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31597 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31598                if ! test -s "$FREETYPE2_LIBS"; then
31599		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31600		fi
31601                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31602		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31603		fi
31604                USING_SYSTEM_FT_LIB=true
31605                FREETYPE2_FOUND=yes
31606	    fi
31607	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31608$as_echo "$FREETYPE2_FOUND" >&6; }
31609        fi
31610	if test "x$FREETYPE2_FOUND" = xno; then
31611
31612pkg_failed=no
31613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31614$as_echo_n "checking for FREETYPE2... " >&6; }
31615
31616if test -n "$FREETYPE2_CFLAGS"; then
31617    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31618 elif test -n "$PKG_CONFIG"; then
31619    if test -n "$PKG_CONFIG" && \
31620    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31621  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31622  ac_status=$?
31623  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31624  test $ac_status = 0; }; then
31625  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31626else
31627  pkg_failed=yes
31628fi
31629 else
31630    pkg_failed=untried
31631fi
31632if test -n "$FREETYPE2_LIBS"; then
31633    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31634 elif test -n "$PKG_CONFIG"; then
31635    if test -n "$PKG_CONFIG" && \
31636    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31637  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31638  ac_status=$?
31639  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31640  test $ac_status = 0; }; then
31641  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31642else
31643  pkg_failed=yes
31644fi
31645 else
31646    pkg_failed=untried
31647fi
31648
31649
31650
31651if test $pkg_failed = yes; then
31652
31653if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31654        _pkg_short_errors_supported=yes
31655else
31656        _pkg_short_errors_supported=no
31657fi
31658        if test $_pkg_short_errors_supported = yes; then
31659	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31660        else
31661	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31662        fi
31663	# Put the nasty error message in config.log where it belongs
31664	echo "$FREETYPE2_PKG_ERRORS" >&5
31665
31666	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31667$as_echo "no" >&6; }
31668                FREETYPE2_FOUND=no
31669elif test $pkg_failed = untried; then
31670	FREETYPE2_FOUND=no
31671else
31672	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31673	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31675$as_echo "yes" >&6; }
31676	FREETYPE2_FOUND=yes
31677fi
31678            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31679            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31680            USING_SYSTEM_FT_LIB=true
31681            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31682            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31683              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31684            fi
31685	fi
31686	if test "x$FREETYPE2_FOUND" = xno; then
31687	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31688$as_echo_n "checking for freetype in some standard locations... " >&6; }
31689
31690	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31691	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31692	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31693	    fi
31694	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31695	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31696	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31697	    fi
31698
31699	    PREV_CXXCFLAGS="$CXXFLAGS"
31700	    PREV_LDFLAGS="$LDFLAGS"
31701	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31702	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31703	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31704/* end confdefs.h.  */
31705#include<ft2build.h>
31706	                    #include FT_FREETYPE_H
31707	                   int main() { return 0; }
31708
31709_ACEOF
31710if ac_fn_cxx_try_link "$LINENO"; then :
31711
31712	                      # Yes, the default cflags and libs did the trick.
31713	                      FREETYPE2_FOUND=yes
31714	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31715	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31716
31717else
31718
31719	                      FREETYPE2_FOUND=no
31720
31721fi
31722rm -f core conftest.err conftest.$ac_objext \
31723    conftest$ac_exeext conftest.$ac_ext
31724            CXXCFLAGS="$PREV_CXXFLAGS"
31725	    LDFLAGS="$PREV_LDFLAGS"
31726	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31727$as_echo "$FREETYPE2_FOUND" >&6; }
31728            USING_SYSTEM_FT_LIB=true
31729	fi
31730	if test "x$FREETYPE2_FOUND" = xno; then
31731
31732    # Print a helpful message on how to acquire the necessary build dependency.
31733    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31734    MISSING_DEPENDENCY=freetype2
31735    PKGHANDLER_COMMAND=
31736
31737    case $PKGHANDLER in
31738	apt-get)
31739                apt_help     $MISSING_DEPENDENCY ;;
31740    yum)
31741                yum_help     $MISSING_DEPENDENCY ;;
31742	port)
31743                port_help    $MISSING_DEPENDENCY ;;
31744	pkgutil)
31745                pkgutil_help $MISSING_DEPENDENCY ;;
31746	pkgadd)
31747                pkgadd_help  $MISSING_DEPENDENCY ;;
31748    * )
31749      break ;;
31750    esac
31751
31752    if test "x$PKGHANDLER_COMMAND" != x; then
31753        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31754    fi
31755
31756		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31757	fi
31758
31759        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31760            # AC_CHECK_LIB does not support use of cl.exe
31761            PREV_LDFLAGS="$LDFLAGS"
31762            LDFLAGS="$FREETYPE2_LIBS"
31763            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31764$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31765if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31766  $as_echo_n "(cached) " >&6
31767else
31768  ac_check_lib_save_LIBS=$LIBS
31769LIBS="-lfreetype  $LIBS"
31770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31771/* end confdefs.h.  */
31772
31773/* Override any GCC internal prototype to avoid an error.
31774   Use char because int might match the return type of a GCC
31775   builtin and then its argument prototype would still apply.  */
31776#ifdef __cplusplus
31777extern "C"
31778#endif
31779char FT_Init_FreeType ();
31780int
31781main ()
31782{
31783return FT_Init_FreeType ();
31784  ;
31785  return 0;
31786}
31787_ACEOF
31788if ac_fn_cxx_try_link "$LINENO"; then :
31789  ac_cv_lib_freetype_FT_Init_FreeType=yes
31790else
31791  ac_cv_lib_freetype_FT_Init_FreeType=no
31792fi
31793rm -f core conftest.err conftest.$ac_objext \
31794    conftest$ac_exeext conftest.$ac_ext
31795LIBS=$ac_check_lib_save_LIBS
31796fi
31797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31798$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31799if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31800  FREETYPE2_FOUND=true
31801else
31802  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31803fi
31804
31805            LDFLAGS="$PREV_LDFLAGS"
31806        fi
31807fi
31808
31809
31810
31811
31812
31813
31814
31815
31816
31817###############################################################################
31818#
31819# Check for alsa headers and libraries. Used on Linux/GNU systems.
31820#
31821
31822# Check whether --with-alsa was given.
31823if test "${with_alsa+set}" = set; then :
31824  withval=$with_alsa;
31825fi
31826
31827
31828# Check whether --with-alsa-include was given.
31829if test "${with_alsa_include+set}" = set; then :
31830  withval=$with_alsa_include;
31831fi
31832
31833
31834# Check whether --with-alsa-lib was given.
31835if test "${with_alsa_lib+set}" = set; then :
31836  withval=$with_alsa_lib;
31837fi
31838
31839
31840if test "x$ALSA_NOT_NEEDED" = xyes; then
31841	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31842		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31843$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31844	fi
31845	ALSA_CFLAGS=
31846	ALSA_LIBS=
31847else
31848	ALSA_FOUND=no
31849
31850	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31851	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31852	fi
31853
31854	if test "x${with_alsa}" != x; then
31855	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31856	    ALSA_CFLAGS="-I${with_alsa}/include"
31857	    ALSA_FOUND=yes
31858	fi
31859	if test "x${with_alsa_include}" != x; then
31860	    ALSA_CFLAGS="-I${with_alsa_include}"
31861	    ALSA_FOUND=yes
31862	fi
31863	if test "x${with_alsa_lib}" != x; then
31864	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31865	    ALSA_FOUND=yes
31866	fi
31867	if test "x$ALSA_FOUND" = xno; then
31868
31869
31870    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31871        # Source the builddeps file again, to make sure it uses the latest variables!
31872        . $builddepsfile
31873        # Look for a target and build machine specific resource!
31874        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31875        if test "x$resource" = x; then
31876            # Ok, lets instead look for a target specific resource
31877            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31878        fi
31879        if test "x$resource" = x; then
31880            # Ok, lets instead look for a build specific resource
31881            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31882        fi
31883        if test "x$resource" = x; then
31884            # Ok, lets instead look for a generic resource
31885            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31886            resource=${builddep_alsa}
31887        fi
31888        if test "x$resource" != x; then
31889            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31890$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31891	    # If the resource in the builddeps.conf file is an existing directory,
31892	    # for example /java/linux/cups
31893	    if test -d ${resource}; then
31894	       depdir=${resource}
31895	    else
31896
31897# alsa is for example mymodule
31898# $resource is for example libs/general/libmymod_1_2_3.zip
31899# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31900# $with_builddeps_dir is for example /localhome/builddeps
31901# depdir is the name of the variable into which we store the depdir, eg MYMOD
31902# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31903# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31904    filename=`basename $resource`
31905    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31906    filebase=${filename%%.*}
31907    extension=${filename#*.}
31908    installdir=$with_builddeps_dir/$filebase
31909    if test ! -f $installdir/$filename.unpacked; then
31910        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31911$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31912        if test ! -d $installdir; then
31913            mkdir -p $installdir
31914        fi
31915        if test ! -d $installdir; then
31916            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31917        fi
31918        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31919        touch $tmpfile
31920        if test ! -f $tmpfile; then
31921            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31922        fi
31923
31924    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31925    # $tmpfile is the local file name for the downloaded file.
31926    VALID_TOOL=no
31927    if test "x$BDEPS_FTP" = xwget; then
31928       VALID_TOOL=yes
31929       wget -O $tmpfile $with_builddeps_server/$resource
31930    fi
31931    if test "x$BDEPS_FTP" = xlftp; then
31932       VALID_TOOL=yes
31933       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31934    fi
31935    if test "x$BDEPS_FTP" = xftp; then
31936        VALID_TOOL=yes
31937        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31938        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31939        FTPUSERPWD=${FTPSERVER%%@*}
31940        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31941            FTPUSER=${userpwd%%:*}
31942            FTPPWD=${userpwd#*@}
31943            FTPSERVER=${FTPSERVER#*@}
31944        else
31945            FTPUSER=ftp
31946            FTPPWD=ftp
31947        fi
31948        # the "pass" command does not work on some
31949        # ftp clients (read ftp.exe) but if it works,
31950        # passive mode is better!
31951        (\
31952            echo "user $FTPUSER $FTPPWD"        ;\
31953            echo "pass"                         ;\
31954            echo "bin"                          ;\
31955            echo "get $FTPPATH $tmpfile"              ;\
31956        ) | ftp -in $FTPSERVER
31957    fi
31958    if test "x$VALID_TOOL" != xyes; then
31959       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31960    fi
31961
31962        mv $tmpfile $installdir/$filename
31963        if test ! -s $installdir/$filename; then
31964            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31965        fi
31966        case "$extension" in
31967            zip)  echo "Unzipping $installdir/$filename..."
31968               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31969            ;;
31970            tar.gz) echo "Untaring $installdir/$filename..."
31971               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31972            ;;
31973            tgz) echo "Untaring $installdir/$filename..."
31974               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31975            ;;
31976            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31977            ;;
31978        esac
31979    fi
31980    if test -f $installdir/$filename.unpacked; then
31981        depdir=$installdir
31982    fi
31983
31984	    fi
31985            # Source the builddeps file again, because in the previous command, the depdir
31986            # was updated to point at the current build dependency install directory.
31987            . $builddepsfile
31988            # Now extract variables from the builddeps.conf files.
31989            theroot=${builddep_alsa_ROOT}
31990            thecflags=${builddep_alsa_CFLAGS}
31991            thelibs=${builddep_alsa_LIBS}
31992            if test "x$depdir" = x; then
31993                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31994            fi
31995            ALSA=$depdir
31996            if test "x$theroot" != x; then
31997               ALSA="$theroot"
31998            fi
31999            if test "x$thecflags" != x; then
32000               ALSA_CFLAGS="$thecflags"
32001            fi
32002            if test "x$thelibs" != x; then
32003               ALSA_LIBS="$thelibs"
32004            fi
32005            ALSA_FOUND=yes
32006            else ALSA_FOUND=no
32007
32008        fi
32009        else ALSA_FOUND=no
32010
32011    fi
32012
32013	fi
32014	if test "x$ALSA_FOUND" = xno; then
32015
32016pkg_failed=no
32017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32018$as_echo_n "checking for ALSA... " >&6; }
32019
32020if test -n "$ALSA_CFLAGS"; then
32021    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32022 elif test -n "$PKG_CONFIG"; then
32023    if test -n "$PKG_CONFIG" && \
32024    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32025  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32026  ac_status=$?
32027  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32028  test $ac_status = 0; }; then
32029  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32030else
32031  pkg_failed=yes
32032fi
32033 else
32034    pkg_failed=untried
32035fi
32036if test -n "$ALSA_LIBS"; then
32037    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32038 elif test -n "$PKG_CONFIG"; then
32039    if test -n "$PKG_CONFIG" && \
32040    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32041  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32042  ac_status=$?
32043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32044  test $ac_status = 0; }; then
32045  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32046else
32047  pkg_failed=yes
32048fi
32049 else
32050    pkg_failed=untried
32051fi
32052
32053
32054
32055if test $pkg_failed = yes; then
32056
32057if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32058        _pkg_short_errors_supported=yes
32059else
32060        _pkg_short_errors_supported=no
32061fi
32062        if test $_pkg_short_errors_supported = yes; then
32063	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32064        else
32065	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32066        fi
32067	# Put the nasty error message in config.log where it belongs
32068	echo "$ALSA_PKG_ERRORS" >&5
32069
32070	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32071$as_echo "no" >&6; }
32072                ALSA_FOUND=no
32073elif test $pkg_failed = untried; then
32074	ALSA_FOUND=no
32075else
32076	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32077	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32079$as_echo "yes" >&6; }
32080	ALSA_FOUND=yes
32081fi
32082	fi
32083	if test "x$ALSA_FOUND" = xno; then
32084	    for ac_header in alsa/asoundlib.h
32085do :
32086  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32087if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
32088  cat >>confdefs.h <<_ACEOF
32089#define HAVE_ALSA_ASOUNDLIB_H 1
32090_ACEOF
32091 ALSA_FOUND=yes
32092	                      ALSA_CFLAGS=-Iignoreme
32093	                      ALSA_LIBS=-lasound
32094	                      DEFAULT_ALSA=yes
32095else
32096  ALSA_FOUND=no
32097fi
32098
32099done
32100
32101	fi
32102	if test "x$ALSA_FOUND" = xno; then
32103
32104    # Print a helpful message on how to acquire the necessary build dependency.
32105    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32106    MISSING_DEPENDENCY=alsa
32107    PKGHANDLER_COMMAND=
32108
32109    case $PKGHANDLER in
32110	apt-get)
32111                apt_help     $MISSING_DEPENDENCY ;;
32112    yum)
32113                yum_help     $MISSING_DEPENDENCY ;;
32114	port)
32115                port_help    $MISSING_DEPENDENCY ;;
32116	pkgutil)
32117                pkgutil_help $MISSING_DEPENDENCY ;;
32118	pkgadd)
32119                pkgadd_help  $MISSING_DEPENDENCY ;;
32120    * )
32121      break ;;
32122    esac
32123
32124    if test "x$PKGHANDLER_COMMAND" != x; then
32125        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32126    fi
32127
32128	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32129	fi
32130fi
32131
32132
32133
32134
32135
32136
32137
32138###############################################################################
32139#
32140# Check for the jpeg library
32141#
32142
32143USE_EXTERNAL_LIBJPEG=true
32144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32145$as_echo_n "checking for main in -ljpeg... " >&6; }
32146if ${ac_cv_lib_jpeg_main+:} false; then :
32147  $as_echo_n "(cached) " >&6
32148else
32149  ac_check_lib_save_LIBS=$LIBS
32150LIBS="-ljpeg  $LIBS"
32151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32152/* end confdefs.h.  */
32153
32154
32155int
32156main ()
32157{
32158return main ();
32159  ;
32160  return 0;
32161}
32162_ACEOF
32163if ac_fn_cxx_try_link "$LINENO"; then :
32164  ac_cv_lib_jpeg_main=yes
32165else
32166  ac_cv_lib_jpeg_main=no
32167fi
32168rm -f core conftest.err conftest.$ac_objext \
32169    conftest$ac_exeext conftest.$ac_ext
32170LIBS=$ac_check_lib_save_LIBS
32171fi
32172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32173$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32174if test "x$ac_cv_lib_jpeg_main" = xyes; then :
32175  cat >>confdefs.h <<_ACEOF
32176#define HAVE_LIBJPEG 1
32177_ACEOF
32178
32179  LIBS="-ljpeg $LIBS"
32180
32181else
32182   USE_EXTERNAL_LIBJPEG=false
32183               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32184$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32185
32186fi
32187
32188
32189
32190###############################################################################
32191#
32192# Check for the gif library
32193#
32194
32195
32196# Check whether --with-giflib was given.
32197if test "${with_giflib+set}" = set; then :
32198  withval=$with_giflib;
32199fi
32200
32201
32202
32203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32204$as_echo_n "checking for which giflib to use... " >&6; }
32205
32206# default is bundled
32207DEFAULT_GIFLIB=bundled
32208
32209#
32210# if user didn't specify, use DEFAULT_GIFLIB
32211#
32212if test "x${with_giflib}" = "x"; then
32213    with_giflib=${DEFAULT_GIFLIB}
32214fi
32215
32216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32217$as_echo "${with_giflib}" >&6; }
32218
32219if test "x${with_giflib}" = "xbundled"; then
32220    USE_EXTERNAL_LIBGIF=false
32221elif test "x${with_giflib}" = "xsystem"; then
32222    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32223if test "x$ac_cv_header_gif_lib_h" = xyes; then :
32224
32225else
32226   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32227fi
32228
32229
32230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32231$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32232if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
32233  $as_echo_n "(cached) " >&6
32234else
32235  ac_check_lib_save_LIBS=$LIBS
32236LIBS="-lgif  $LIBS"
32237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32238/* end confdefs.h.  */
32239
32240/* Override any GCC internal prototype to avoid an error.
32241   Use char because int might match the return type of a GCC
32242   builtin and then its argument prototype would still apply.  */
32243#ifdef __cplusplus
32244extern "C"
32245#endif
32246char DGifGetCode ();
32247int
32248main ()
32249{
32250return DGifGetCode ();
32251  ;
32252  return 0;
32253}
32254_ACEOF
32255if ac_fn_cxx_try_link "$LINENO"; then :
32256  ac_cv_lib_gif_DGifGetCode=yes
32257else
32258  ac_cv_lib_gif_DGifGetCode=no
32259fi
32260rm -f core conftest.err conftest.$ac_objext \
32261    conftest$ac_exeext conftest.$ac_ext
32262LIBS=$ac_check_lib_save_LIBS
32263fi
32264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32265$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32266if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
32267  cat >>confdefs.h <<_ACEOF
32268#define HAVE_LIBGIF 1
32269_ACEOF
32270
32271  LIBS="-lgif $LIBS"
32272
32273else
32274   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32275fi
32276
32277
32278    USE_EXTERNAL_LIBGIF=true
32279else
32280    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32281fi
32282
32283
32284###############################################################################
32285#
32286# Check for the zlib library
32287#
32288
32289
32290# Check whether --with-zlib was given.
32291if test "${with_zlib+set}" = set; then :
32292  withval=$with_zlib;
32293fi
32294
32295
32296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32297$as_echo_n "checking for compress in -lz... " >&6; }
32298if ${ac_cv_lib_z_compress+:} false; then :
32299  $as_echo_n "(cached) " >&6
32300else
32301  ac_check_lib_save_LIBS=$LIBS
32302LIBS="-lz  $LIBS"
32303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32304/* end confdefs.h.  */
32305
32306/* Override any GCC internal prototype to avoid an error.
32307   Use char because int might match the return type of a GCC
32308   builtin and then its argument prototype would still apply.  */
32309#ifdef __cplusplus
32310extern "C"
32311#endif
32312char compress ();
32313int
32314main ()
32315{
32316return compress ();
32317  ;
32318  return 0;
32319}
32320_ACEOF
32321if ac_fn_cxx_try_link "$LINENO"; then :
32322  ac_cv_lib_z_compress=yes
32323else
32324  ac_cv_lib_z_compress=no
32325fi
32326rm -f core conftest.err conftest.$ac_objext \
32327    conftest$ac_exeext conftest.$ac_ext
32328LIBS=$ac_check_lib_save_LIBS
32329fi
32330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32331$as_echo "$ac_cv_lib_z_compress" >&6; }
32332if test "x$ac_cv_lib_z_compress" = xyes; then :
32333   ZLIB_FOUND=yes
32334else
32335   ZLIB_FOUND=no
32336fi
32337
32338
32339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32340$as_echo_n "checking for which zlib to use... " >&6; }
32341
32342DEFAULT_ZLIB=bundled
32343if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32344#
32345# On macosx default is system...on others default is
32346#
32347    DEFAULT_ZLIB=system
32348fi
32349
32350if test "x${ZLIB_FOUND}" != "xyes"; then
32351#
32352# If we don't find any system...set default to bundled
32353#
32354    DEFAULT_ZLIB=bundled
32355fi
32356
32357#
32358# If user didn't specify, use DEFAULT_ZLIB
32359#
32360if test "x${with_zlib}" = "x"; then
32361    with_zlib=${DEFAULT_ZLIB}
32362fi
32363
32364if test "x${with_zlib}" = "xbundled"; then
32365    USE_EXTERNAL_LIBZ=false
32366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32367$as_echo "bundled" >&6; }
32368elif test "x${with_zlib}" = "xsystem"; then
32369    if test "x${ZLIB_FOUND}" = "xyes"; then
32370        USE_EXTERNAL_LIBZ=true
32371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32372$as_echo "system" >&6; }
32373    else
32374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32375$as_echo "system not found" >&6; }
32376        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32377    fi
32378else
32379    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32380fi
32381
32382
32383
32384###############################################################################
32385LIBZIP_CAN_USE_MMAP=true
32386
32387
32388
32389###############################################################################
32390#
32391# Check if altzone exists in time.h
32392#
32393
32394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32395/* end confdefs.h.  */
32396#include <time.h>
32397int
32398main ()
32399{
32400return (int)altzone;
32401  ;
32402  return 0;
32403}
32404_ACEOF
32405if ac_fn_cxx_try_link "$LINENO"; then :
32406  has_altzone=yes
32407else
32408  has_altzone=no
32409fi
32410rm -f core conftest.err conftest.$ac_objext \
32411    conftest$ac_exeext conftest.$ac_ext
32412if test "x$has_altzone" = xyes; then
32413
32414$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32415
32416fi
32417
32418###############################################################################
32419#
32420# Check the maths library
32421#
32422
32423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32424$as_echo_n "checking for cos in -lm... " >&6; }
32425if ${ac_cv_lib_m_cos+:} false; then :
32426  $as_echo_n "(cached) " >&6
32427else
32428  ac_check_lib_save_LIBS=$LIBS
32429LIBS="-lm  $LIBS"
32430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32431/* end confdefs.h.  */
32432
32433/* Override any GCC internal prototype to avoid an error.
32434   Use char because int might match the return type of a GCC
32435   builtin and then its argument prototype would still apply.  */
32436#ifdef __cplusplus
32437extern "C"
32438#endif
32439char cos ();
32440int
32441main ()
32442{
32443return cos ();
32444  ;
32445  return 0;
32446}
32447_ACEOF
32448if ac_fn_cxx_try_link "$LINENO"; then :
32449  ac_cv_lib_m_cos=yes
32450else
32451  ac_cv_lib_m_cos=no
32452fi
32453rm -f core conftest.err conftest.$ac_objext \
32454    conftest$ac_exeext conftest.$ac_ext
32455LIBS=$ac_check_lib_save_LIBS
32456fi
32457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32458$as_echo "$ac_cv_lib_m_cos" >&6; }
32459if test "x$ac_cv_lib_m_cos" = xyes; then :
32460  cat >>confdefs.h <<_ACEOF
32461#define HAVE_LIBM 1
32462_ACEOF
32463
32464  LIBS="-lm $LIBS"
32465
32466else
32467
32468                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32469$as_echo "$as_me: Maths library was not found" >&6;}
32470
32471fi
32472
32473
32474
32475###############################################################################
32476#
32477# Check for libdl.so
32478
32479save_LIBS="$LIBS"
32480LIBS=""
32481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32482$as_echo_n "checking for dlopen in -ldl... " >&6; }
32483if ${ac_cv_lib_dl_dlopen+:} false; then :
32484  $as_echo_n "(cached) " >&6
32485else
32486  ac_check_lib_save_LIBS=$LIBS
32487LIBS="-ldl  $LIBS"
32488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32489/* end confdefs.h.  */
32490
32491/* Override any GCC internal prototype to avoid an error.
32492   Use char because int might match the return type of a GCC
32493   builtin and then its argument prototype would still apply.  */
32494#ifdef __cplusplus
32495extern "C"
32496#endif
32497char dlopen ();
32498int
32499main ()
32500{
32501return dlopen ();
32502  ;
32503  return 0;
32504}
32505_ACEOF
32506if ac_fn_cxx_try_link "$LINENO"; then :
32507  ac_cv_lib_dl_dlopen=yes
32508else
32509  ac_cv_lib_dl_dlopen=no
32510fi
32511rm -f core conftest.err conftest.$ac_objext \
32512    conftest$ac_exeext conftest.$ac_ext
32513LIBS=$ac_check_lib_save_LIBS
32514fi
32515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32516$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32517if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32518  cat >>confdefs.h <<_ACEOF
32519#define HAVE_LIBDL 1
32520_ACEOF
32521
32522  LIBS="-ldl $LIBS"
32523
32524fi
32525
32526LIBDL="$LIBS"
32527
32528LIBS="$save_LIBS"
32529
32530
32531
32532###############################################################################
32533#
32534# statically link libstdc++ before C++ ABI is stablized on Linux unless
32535# dynamic build is configured on command line.
32536#
32537
32538# Check whether --with-stdc++lib was given.
32539if test "${with_stdc__lib+set}" = set; then :
32540  withval=$with_stdc__lib;
32541    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32542        && test "x$with_stdc__lib" != xdefault; then
32543      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32544    fi
32545
32546else
32547  with_stdc__lib=default
32548
32549fi
32550
32551
32552if test "x$OPENJDK_TARGET_OS" = xlinux; then
32553    # Test if -lstdc++ works.
32554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32555$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32556    ac_ext=cpp
32557ac_cpp='$CXXCPP $CPPFLAGS'
32558ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32559ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32560ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32561
32562    OLD_CXXFLAGS="$CXXFLAGS"
32563    CXXFLAGS="$CXXFLAGS -lstdc++"
32564    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32565/* end confdefs.h.  */
32566
32567int
32568main ()
32569{
32570return 0;
32571  ;
32572  return 0;
32573}
32574_ACEOF
32575if ac_fn_cxx_try_link "$LINENO"; then :
32576  has_dynamic_libstdcxx=yes
32577else
32578  has_dynamic_libstdcxx=no
32579fi
32580rm -f core conftest.err conftest.$ac_objext \
32581    conftest$ac_exeext conftest.$ac_ext
32582    CXXFLAGS="$OLD_CXXFLAGS"
32583    ac_ext=cpp
32584ac_cpp='$CXXCPP $CPPFLAGS'
32585ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32586ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32587ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32588
32589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32590$as_echo "$has_dynamic_libstdcxx" >&6; }
32591
32592    # Test if stdc++ can be linked statically.
32593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32594$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32595    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32596    ac_ext=cpp
32597ac_cpp='$CXXCPP $CPPFLAGS'
32598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32601
32602    OLD_LIBS="$LIBS"
32603    OLD_CXX="$CXX"
32604    LIBS="$STATIC_STDCXX_FLAGS"
32605    CXX="$CC"
32606    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32607/* end confdefs.h.  */
32608
32609int
32610main ()
32611{
32612return 0;
32613  ;
32614  return 0;
32615}
32616_ACEOF
32617if ac_fn_cxx_try_link "$LINENO"; then :
32618  has_static_libstdcxx=yes
32619else
32620  has_static_libstdcxx=no
32621fi
32622rm -f core conftest.err conftest.$ac_objext \
32623    conftest$ac_exeext conftest.$ac_ext
32624    LIBS="$OLD_LIBS"
32625    CXX="$OLD_CXX"
32626    ac_ext=cpp
32627ac_cpp='$CXXCPP $CPPFLAGS'
32628ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32629ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32630ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32631
32632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32633$as_echo "$has_static_libstdcxx" >&6; }
32634
32635    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32636        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32637    fi
32638
32639    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32640        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32641    fi
32642
32643    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32644        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32645    fi
32646
32647    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32648$as_echo_n "checking how to link with libstdc++... " >&6; }
32649    # If dynamic was requested, it's available since it would fail above otherwise.
32650    # If dynamic wasn't requested, go with static unless it isn't available.
32651    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32652        LIBCXX="$LIBCXX -lstdc++"
32653        LDCXX="$CXX"
32654        STATIC_CXX_SETTING="STATIC_CXX=false"
32655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32656$as_echo "dynamic" >&6; }
32657    else
32658        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32659        LDCXX="$CC"
32660        STATIC_CXX_SETTING="STATIC_CXX=true"
32661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32662$as_echo "static" >&6; }
32663    fi
32664fi
32665
32666
32667if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32668    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32669
32670pkg_failed=no
32671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32672$as_echo_n "checking for LIBFFI... " >&6; }
32673
32674if test -n "$LIBFFI_CFLAGS"; then
32675    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32676 elif test -n "$PKG_CONFIG"; then
32677    if test -n "$PKG_CONFIG" && \
32678    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32679  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32680  ac_status=$?
32681  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32682  test $ac_status = 0; }; then
32683  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32684else
32685  pkg_failed=yes
32686fi
32687 else
32688    pkg_failed=untried
32689fi
32690if test -n "$LIBFFI_LIBS"; then
32691    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32692 elif test -n "$PKG_CONFIG"; then
32693    if test -n "$PKG_CONFIG" && \
32694    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32695  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32696  ac_status=$?
32697  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32698  test $ac_status = 0; }; then
32699  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32700else
32701  pkg_failed=yes
32702fi
32703 else
32704    pkg_failed=untried
32705fi
32706
32707
32708
32709if test $pkg_failed = yes; then
32710
32711if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32712        _pkg_short_errors_supported=yes
32713else
32714        _pkg_short_errors_supported=no
32715fi
32716        if test $_pkg_short_errors_supported = yes; then
32717	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32718        else
32719	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32720        fi
32721	# Put the nasty error message in config.log where it belongs
32722	echo "$LIBFFI_PKG_ERRORS" >&5
32723
32724	as_fn_error $? "Package requirements (libffi) were not met:
32725
32726$LIBFFI_PKG_ERRORS
32727
32728Consider adjusting the PKG_CONFIG_PATH environment variable if you
32729installed software in a non-standard prefix.
32730
32731Alternatively, you may set the environment variables LIBFFI_CFLAGS
32732and LIBFFI_LIBS to avoid the need to call pkg-config.
32733See the pkg-config man page for more details.
32734" "$LINENO" 5
32735elif test $pkg_failed = untried; then
32736	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32738as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32739is in your PATH or set the PKG_CONFIG environment variable to the full
32740path to pkg-config.
32741
32742Alternatively, you may set the environment variables LIBFFI_CFLAGS
32743and LIBFFI_LIBS to avoid the need to call pkg-config.
32744See the pkg-config man page for more details.
32745
32746To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32747See \`config.log' for more details" "$LINENO" 5; }
32748else
32749	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32750	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32752$as_echo "yes" >&6; }
32753	:
32754fi
32755
32756fi
32757
32758if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32759    # Extract the first word of "llvm-config", so it can be a program name with args.
32760set dummy llvm-config; ac_word=$2
32761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32762$as_echo_n "checking for $ac_word... " >&6; }
32763if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32764  $as_echo_n "(cached) " >&6
32765else
32766  if test -n "$LLVM_CONFIG"; then
32767  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32768else
32769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32770for as_dir in $PATH
32771do
32772  IFS=$as_save_IFS
32773  test -z "$as_dir" && as_dir=.
32774    for ac_exec_ext in '' $ac_executable_extensions; do
32775  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32776    ac_cv_prog_LLVM_CONFIG="llvm-config"
32777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32778    break 2
32779  fi
32780done
32781  done
32782IFS=$as_save_IFS
32783
32784fi
32785fi
32786LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32787if test -n "$LLVM_CONFIG"; then
32788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32789$as_echo "$LLVM_CONFIG" >&6; }
32790else
32791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32792$as_echo "no" >&6; }
32793fi
32794
32795
32796
32797    if test "x$LLVM_CONFIG" != xllvm-config; then
32798        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32799    fi
32800
32801    llvm_components="jit mcjit engine nativecodegen native"
32802    unset LLVM_CFLAGS
32803    for flag in $("$LLVM_CONFIG" --cxxflags); do
32804      if echo "${flag}" | grep -q '^-[ID]'; then
32805        if test "${flag}" != "-D_DEBUG" ; then
32806          if test "${LLVM_CFLAGS}" != "" ; then
32807            LLVM_CFLAGS="${LLVM_CFLAGS} "
32808          fi
32809          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32810        fi
32811      fi
32812    done
32813    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32814    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32815
32816    unset LLVM_LDFLAGS
32817    for flag in $("${LLVM_CONFIG}" --ldflags); do
32818      if echo "${flag}" | grep -q '^-L'; then
32819        if test "${LLVM_LDFLAGS}" != ""; then
32820          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32821        fi
32822        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32823      fi
32824    done
32825
32826    unset LLVM_LIBS
32827    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32828      if echo "${flag}" | grep -q '^-l'; then
32829        if test "${LLVM_LIBS}" != ""; then
32830          LLVM_LIBS="${LLVM_LIBS} "
32831        fi
32832        LLVM_LIBS="${LLVM_LIBS}${flag}"
32833      fi
32834    done
32835
32836
32837
32838
32839fi
32840
32841# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32842if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32843    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32844fi
32845
32846# TODO better (platform agnostic) test
32847if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32848    LIBCXX="-lstdc++"
32849fi
32850
32851
32852
32853
32854
32855# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32856
32857# When using cygwin or msys, we need a wrapper binary that renames
32858# /cygdrive/c/ arguments into c:/ arguments and peeks into
32859# @files and rewrites these too! This wrapper binary is
32860# called fixpath.
32861FIXPATH=
32862if test "x$OPENJDK_BUILD_OS" = xwindows; then
32863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32864$as_echo_n "checking if fixpath can be created... " >&6; }
32865    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32866    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32867    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32868      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32869      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32870      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32871      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32872    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32873      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32874      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32875
32876      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32877      # @ was chosen as separator to minimize risk of other tools messing around with it
32878      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32879      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32880
32881      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32882    fi
32883    rm -f $OUTPUT_ROOT/fixpath*
32884    cd $OUTPUT_ROOT
32885    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32886    cd $CURDIR
32887
32888    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32890$as_echo "no" >&6; }
32891        cat $OUTPUT_ROOT/fixpath1.log
32892        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32893    fi
32894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32895$as_echo "yes" >&6; }
32896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32897$as_echo_n "checking if fixpath.exe works... " >&6; }
32898    cd $OUTPUT_ROOT
32899    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32900    cd $CURDIR
32901    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32903$as_echo "no" >&6; }
32904        cat $OUTPUT_ROOT/fixpath2.log
32905        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32906    fi
32907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32908$as_echo "yes" >&6; }
32909    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32910fi
32911
32912
32913
32914
32915###############################################################################
32916#
32917# We need to do some final tweaking, when everything else is done.
32918#
32919###############################################################################
32920
32921
32922HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32923
32924
32925# The name of the Service Agent jar.
32926SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32927if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32928  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32929fi
32930
32931
32932
32933
32934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32935$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32936
32937if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32938    ENABLE_INTREE_EC=yes
32939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32940$as_echo "yes" >&6; }
32941else
32942    ENABLE_INTREE_EC=no
32943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32944$as_echo "no" >&6; }
32945fi
32946
32947
32948
32949
32950###############################################################################
32951#
32952# Configure parts of the build that only affect the build performance,
32953# not the result.
32954#
32955###############################################################################
32956
32957
32958  # How many cores do we have on this build system?
32959
32960# Check whether --with-num-cores was given.
32961if test "${with_num_cores+set}" = set; then :
32962  withval=$with_num_cores;
32963fi
32964
32965  if test "x$with_num_cores" = x; then
32966    # The number of cores were not specified, try to probe them.
32967
32968    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32969$as_echo_n "checking for number of cores... " >&6; }
32970    NUM_CORES=1
32971    FOUND_CORES=no
32972
32973    if test -f /proc/cpuinfo; then
32974        # Looks like a Linux (or cygwin) system
32975        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32976        FOUND_CORES=yes
32977    elif test -x /usr/sbin/psrinfo; then
32978        # Looks like a Solaris system
32979        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32980        FOUND_CORES=yes
32981    elif test -x /usr/sbin/system_profiler; then
32982        # Looks like a MacOSX system
32983        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32984        FOUND_CORES=yes
32985    elif test -n "$NUMBER_OF_PROCESSORS"; then
32986        # On windows, look in the env
32987        NUM_CORES=$NUMBER_OF_PROCESSORS
32988        FOUND_CORES=yes
32989    fi
32990
32991    if test "x$FOUND_CORES" = xyes; then
32992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32993$as_echo "$NUM_CORES" >&6; }
32994    else
32995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32996$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32997        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32998$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32999    fi
33000
33001
33002  else
33003    NUM_CORES=$with_num_cores
33004  fi
33005
33006
33007
33008  # How much memory do we have on this build system?
33009
33010# Check whether --with-memory-size was given.
33011if test "${with_memory_size+set}" = set; then :
33012  withval=$with_memory_size;
33013fi
33014
33015  if test "x$with_memory_size" = x; then
33016    # The memory size was not specified, try to probe it.
33017
33018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33019$as_echo_n "checking for memory size... " >&6; }
33020    # Default to 1024 MB
33021    MEMORY_SIZE=1024
33022    FOUND_MEM=no
33023
33024    if test -f /proc/meminfo; then
33025        # Looks like a Linux (or cygwin) system
33026        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33027        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33028        FOUND_MEM=yes
33029    elif test -x /usr/sbin/prtconf; then
33030        # Looks like a Solaris system
33031        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33032        FOUND_MEM=yes
33033    elif test -x /usr/sbin/system_profiler; then
33034        # Looks like a MacOSX system
33035        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33036        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33037        FOUND_MEM=yes
33038    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33039        # Windows, but without cygwin
33040        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33041        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33042        FOUND_MEM=yes
33043    fi
33044
33045    if test "x$FOUND_MEM" = xyes; then
33046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33047$as_echo "$MEMORY_SIZE MB" >&6; }
33048    else
33049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33050$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33051        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33052$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33053    fi
33054
33055  else
33056    MEMORY_SIZE=$with_memory_size
33057  fi
33058
33059
33060
33061  # Provide a decent default number of parallel jobs for make depending on
33062  # number of cores, amount of memory and machine architecture.
33063
33064# Check whether --with-jobs was given.
33065if test "${with_jobs+set}" = set; then :
33066  withval=$with_jobs;
33067fi
33068
33069  if test "x$with_jobs" = x; then
33070    # Number of jobs was not specified, calculate.
33071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33072$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33073    # Approximate memory in GB, rounding up a bit.
33074    memory_gb=`expr $MEMORY_SIZE / 1100`
33075    # Pick the lowest of memory in gb and number of cores.
33076    if test "$memory_gb" -lt "$NUM_CORES"; then
33077      JOBS="$memory_gb"
33078    else
33079      JOBS="$NUM_CORES"
33080      # On bigger machines, leave some room for other processes to run
33081      if test "$JOBS" -gt "4"; then
33082        JOBS=`expr $JOBS '*' 90 / 100`
33083      fi
33084    fi
33085    # Cap number of jobs to 16
33086    if test "$JOBS" -gt "16"; then
33087      JOBS=16
33088    fi
33089    if test "$JOBS" -eq "0"; then
33090      JOBS=1
33091    fi
33092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33093$as_echo "$JOBS" >&6; }
33094  else
33095    JOBS=$with_jobs
33096  fi
33097
33098
33099
33100# Setup smart javac (after cores and memory have been setup)
33101
33102
33103# Check whether --with-sjavac-server-java was given.
33104if test "${with_sjavac_server_java+set}" = set; then :
33105  withval=$with_sjavac_server_java;
33106fi
33107
33108
33109if test "x$with_sjavac_server_java" != x; then
33110    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33111    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33112    if test "x$FOUND_VERSION" = x; then
33113        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33114    fi
33115else
33116    SJAVAC_SERVER_JAVA=""
33117    # Hotspot specific options.
33118
33119    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33120    $ECHO "Command: $JAVA -verbosegc -version" >&5
33121    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33122    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33123    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33124    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33125        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33126	JVM_ARG_OK=true
33127    else
33128	$ECHO "Arg failed:" >&5
33129	$ECHO "$OUTPUT" >&5
33130	JVM_ARG_OK=false
33131    fi
33132
33133    # JRockit specific options.
33134
33135    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33136    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33137    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33138    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33139    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33140    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33141        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33142	JVM_ARG_OK=true
33143    else
33144	$ECHO "Arg failed:" >&5
33145	$ECHO "$OUTPUT" >&5
33146	JVM_ARG_OK=false
33147    fi
33148
33149    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33150fi
33151
33152
33153if test "$MEMORY_SIZE" -gt "2500"; then
33154
33155    $ECHO "Check if jvm arg is ok: -d64" >&5
33156    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33157    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33158    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33159    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33160    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33161        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33162	JVM_ARG_OK=true
33163    else
33164	$ECHO "Arg failed:" >&5
33165	$ECHO "$OUTPUT" >&5
33166	JVM_ARG_OK=false
33167    fi
33168
33169    if test "$JVM_ARG_OK" = true; then
33170        JVM_64BIT=true
33171	JVM_ARG_OK=false
33172    fi
33173    fi
33174
33175if test "$JVM_64BIT" = true; then
33176    if test "$MEMORY_SIZE" -gt "17000"; then
33177
33178    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33179    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33180    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33181    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33182    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33183    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33184        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33185	JVM_ARG_OK=true
33186    else
33187	$ECHO "Arg failed:" >&5
33188	$ECHO "$OUTPUT" >&5
33189	JVM_ARG_OK=false
33190    fi
33191
33192    fi
33193    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33194
33195    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33196    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33197    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33198    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33199    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33200    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33201        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33202	JVM_ARG_OK=true
33203    else
33204	$ECHO "Arg failed:" >&5
33205	$ECHO "$OUTPUT" >&5
33206	JVM_ARG_OK=false
33207    fi
33208
33209    fi
33210    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33211
33212    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33213    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33214    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33215    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33216    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33217    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33218        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33219	JVM_ARG_OK=true
33220    else
33221	$ECHO "Arg failed:" >&5
33222	$ECHO "$OUTPUT" >&5
33223	JVM_ARG_OK=false
33224    fi
33225
33226    fi
33227    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33228
33229    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33230    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33231    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33232    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33233    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33234    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33235        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33236	JVM_ARG_OK=true
33237    else
33238	$ECHO "Arg failed:" >&5
33239	$ECHO "$OUTPUT" >&5
33240	JVM_ARG_OK=false
33241    fi
33242
33243    fi
33244fi
33245if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33246
33247    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33248    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33249    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33250    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33251    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33252    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33253        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33254	JVM_ARG_OK=true
33255    else
33256	$ECHO "Arg failed:" >&5
33257	$ECHO "$OUTPUT" >&5
33258	JVM_ARG_OK=false
33259    fi
33260
33261fi
33262if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33263
33264    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33265    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33266    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33267    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33268    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33269    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33270        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33271	JVM_ARG_OK=true
33272    else
33273	$ECHO "Arg failed:" >&5
33274	$ECHO "$OUTPUT" >&5
33275	JVM_ARG_OK=false
33276    fi
33277
33278fi
33279if test "$JVM_ARG_OK" = false; then
33280
33281    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33282    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33283    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33284    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33285    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33286    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33287        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33288	JVM_ARG_OK=true
33289    else
33290	$ECHO "Arg failed:" >&5
33291	$ECHO "$OUTPUT" >&5
33292	JVM_ARG_OK=false
33293    fi
33294
33295fi
33296
33297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33298$as_echo_n "checking whether to use sjavac... " >&6; }
33299# Check whether --enable-sjavac was given.
33300if test "${enable_sjavac+set}" = set; then :
33301  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33302else
33303  ENABLE_SJAVAC='no'
33304fi
33305
33306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33307$as_echo "$ENABLE_SJAVAC" >&6; }
33308
33309
33310if test "x$ENABLE_SJAVAC" = xyes; then
33311    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33312else
33313    SJAVAC_SERVER_DIR=
33314fi
33315
33316
33317
33318
33319# Can the C/C++ compiler use precompiled headers?
33320
33321
33322###############################################################################
33323#
33324# Can the C/C++ compiler use precompiled headers?
33325#
33326# Check whether --enable-precompiled-headers was given.
33327if test "${enable_precompiled_headers+set}" = set; then :
33328  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33329else
33330  ENABLE_PRECOMPH=yes
33331fi
33332
33333
33334USE_PRECOMPILED_HEADER=1
33335if test "x$ENABLE_PRECOMPH" = xno; then
33336    USE_PRECOMPILED_HEADER=0
33337fi
33338
33339if test "x$ENABLE_PRECOMPH" = xyes; then
33340    # Check that the compiler actually supports precomp headers.
33341    if test "x$GCC" = xyes; then
33342         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33343$as_echo_n "checking that precompiled headers work... " >&6; }
33344         echo "int alfa();" > conftest.h
33345         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33346         if test ! -f conftest.hpp.gch; then
33347             USE_PRECOMPILED_HEADER=0
33348             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33349$as_echo "no" >&6; }
33350         else
33351             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33352$as_echo "yes" >&6; }
33353         fi
33354         rm -f conftest.h conftest.hpp.gch
33355    fi
33356fi
33357
33358
33359
33360
33361# Setup use of ccache, if available
33362
33363    # Check whether --enable-ccache was given.
33364if test "${enable_ccache+set}" = set; then :
33365  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33366else
33367  ENABLE_CCACHE=yes
33368fi
33369
33370    if test "x$ENABLE_CCACHE" = xyes; then
33371        OLD_PATH="$PATH"
33372        if test "x$TOOLS_DIR" != x; then
33373          PATH=$TOOLS_DIR:$PATH
33374        fi
33375        # Extract the first word of "ccache", so it can be a program name with args.
33376set dummy ccache; ac_word=$2
33377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33378$as_echo_n "checking for $ac_word... " >&6; }
33379if ${ac_cv_path_CCACHE+:} false; then :
33380  $as_echo_n "(cached) " >&6
33381else
33382  case $CCACHE in
33383  [\\/]* | ?:[\\/]*)
33384  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33385  ;;
33386  *)
33387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33388for as_dir in $PATH
33389do
33390  IFS=$as_save_IFS
33391  test -z "$as_dir" && as_dir=.
33392    for ac_exec_ext in '' $ac_executable_extensions; do
33393  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33394    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33396    break 2
33397  fi
33398done
33399  done
33400IFS=$as_save_IFS
33401
33402  ;;
33403esac
33404fi
33405CCACHE=$ac_cv_path_CCACHE
33406if test -n "$CCACHE"; then
33407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33408$as_echo "$CCACHE" >&6; }
33409else
33410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33411$as_echo "no" >&6; }
33412fi
33413
33414
33415        PATH="$OLD_PATH"
33416    else
33417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33418$as_echo_n "checking for ccache... " >&6; }
33419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33420$as_echo "explicitly disabled" >&6; }
33421        CCACHE=
33422    fi
33423
33424
33425
33426# Check whether --with-ccache-dir was given.
33427if test "${with_ccache_dir+set}" = set; then :
33428  withval=$with_ccache_dir;
33429fi
33430
33431
33432    if test "x$with_ccache_dir" != x; then
33433        # When using a non home ccache directory, assume the use is to share ccache files
33434        # with other users. Thus change the umask.
33435        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33436    fi
33437    CCACHE_FOUND=""
33438    if test "x$CCACHE" != x; then
33439
33440    if test "x$CCACHE" != x; then
33441        CCACHE_FOUND="true"
33442        # Only use ccache if it is 3.1.4 or later, which supports
33443        # precompiled headers.
33444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33445$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33446        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33447        if test "x$HAS_GOOD_CCACHE" = x; then
33448            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33449$as_echo "no, disabling ccache" >&6; }
33450            CCACHE=
33451        else
33452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33453$as_echo "yes" >&6; }
33454            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33455$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33456            PUSHED_FLAGS="$CXXFLAGS"
33457            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33458            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33459/* end confdefs.h.  */
33460
33461int
33462main ()
33463{
33464
33465  ;
33466  return 0;
33467}
33468_ACEOF
33469if ac_fn_cxx_try_compile "$LINENO"; then :
33470  CC_KNOWS_CCACHE_TRICK=yes
33471else
33472  CC_KNOWS_CCACHE_TRICK=no
33473fi
33474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33475            CXXFLAGS="$PUSHED_FLAGS"
33476            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33477                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33478$as_echo "yes" >&6; }
33479            else
33480                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33481$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33482                CCACHE=
33483            fi
33484        fi
33485    fi
33486
33487    if test "x$CCACHE" != x; then
33488        CCACHE_SLOPPINESS=time_macros
33489        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33490        CCACHE_FLAGS=-fpch-preprocess
33491
33492        if test "x$SET_CCACHE_DIR" != x; then
33493            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33494	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33495        fi
33496    fi
33497
33498    fi
33499
33500
33501###############################################################################
33502#
33503# And now the finish...
33504#
33505###############################################################################
33506
33507# Check for some common pitfalls
33508
33509  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33510    file_to_test="$SRC_ROOT/LICENSE"
33511    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33512      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
33513    fi
33514  fi
33515
33516
33517
33518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33519$as_echo_n "checking if build directory is on local disk... " >&6; }
33520
33521	# df -l lists only local disks; if the given directory is not found then
33522	# a non-zero exit code is given
33523  if test "x$DF" = x; then
33524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33525      # msys does not have df; use Windows "net use" instead.
33526      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33527      if test "x$IS_NETWORK_DISK" = x; then
33528        OUTPUT_DIR_IS_LOCAL="yes"
33529      else
33530        OUTPUT_DIR_IS_LOCAL="no"
33531      fi
33532    else
33533      # No df here, say it's local
33534      OUTPUT_DIR_IS_LOCAL="yes"
33535    fi
33536  else
33537    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33538      OUTPUT_DIR_IS_LOCAL="yes"
33539    else
33540      OUTPUT_DIR_IS_LOCAL="no"
33541    fi
33542  fi
33543
33544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33545$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33546
33547
33548
33549# Check if the user has any old-style ALT_ variables set.
33550FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33551
33552# Before generating output files, test if they exist. If they do, this is a reconfigure.
33553# Since we can't properly handle the dependencies for this, warn the user about the situation
33554if test -e $OUTPUT_ROOT/spec.gmk; then
33555  IS_RECONFIGURE=yes
33556else
33557  IS_RECONFIGURE=no
33558fi
33559
33560if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33561  HIDE_PERFORMANCE_HINTS=yes
33562else
33563  HIDE_PERFORMANCE_HINTS=no
33564  # Hide it the next time around...
33565  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33566fi
33567
33568
33569
33570# At the end, call the custom hook. (Dummy macro if no custom sources available)
33571
33572
33573# We're messing a bit with internal autoconf variables to put the config.status
33574# in the output directory instead of the current directory.
33575CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33576# Create the actual output files. Now the main work of configure is done.
33577cat >confcache <<\_ACEOF
33578# This file is a shell script that caches the results of configure
33579# tests run on this system so they can be shared between configure
33580# scripts and configure runs, see configure's option --config-cache.
33581# It is not useful on other systems.  If it contains results you don't
33582# want to keep, you may remove or edit it.
33583#
33584# config.status only pays attention to the cache file if you give it
33585# the --recheck option to rerun configure.
33586#
33587# `ac_cv_env_foo' variables (set or unset) will be overridden when
33588# loading this file, other *unset* `ac_cv_foo' will be assigned the
33589# following values.
33590
33591_ACEOF
33592
33593# The following way of writing the cache mishandles newlines in values,
33594# but we know of no workaround that is simple, portable, and efficient.
33595# So, we kill variables containing newlines.
33596# Ultrix sh set writes to stderr and can't be redirected directly,
33597# and sets the high bit in the cache file unless we assign to the vars.
33598(
33599  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33600    eval ac_val=\$$ac_var
33601    case $ac_val in #(
33602    *${as_nl}*)
33603      case $ac_var in #(
33604      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33605$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33606      esac
33607      case $ac_var in #(
33608      _ | IFS | as_nl) ;; #(
33609      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33610      *) { eval $ac_var=; unset $ac_var;} ;;
33611      esac ;;
33612    esac
33613  done
33614
33615  (set) 2>&1 |
33616    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33617    *${as_nl}ac_space=\ *)
33618      # `set' does not quote correctly, so add quotes: double-quote
33619      # substitution turns \\\\ into \\, and sed turns \\ into \.
33620      sed -n \
33621	"s/'/'\\\\''/g;
33622	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33623      ;; #(
33624    *)
33625      # `set' quotes correctly as required by POSIX, so do not add quotes.
33626      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33627      ;;
33628    esac |
33629    sort
33630) |
33631  sed '
33632     /^ac_cv_env_/b end
33633     t clear
33634     :clear
33635     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33636     t end
33637     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33638     :end' >>confcache
33639if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33640  if test -w "$cache_file"; then
33641    if test "x$cache_file" != "x/dev/null"; then
33642      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33643$as_echo "$as_me: updating cache $cache_file" >&6;}
33644      if test ! -f "$cache_file" || test -h "$cache_file"; then
33645	cat confcache >"$cache_file"
33646      else
33647        case $cache_file in #(
33648        */* | ?:*)
33649	  mv -f confcache "$cache_file"$$ &&
33650	  mv -f "$cache_file"$$ "$cache_file" ;; #(
33651        *)
33652	  mv -f confcache "$cache_file" ;;
33653	esac
33654      fi
33655    fi
33656  else
33657    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33658$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33659  fi
33660fi
33661rm -f confcache
33662
33663test "x$prefix" = xNONE && prefix=$ac_default_prefix
33664# Let make expand exec_prefix.
33665test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33666
33667DEFS=-DHAVE_CONFIG_H
33668
33669ac_libobjs=
33670ac_ltlibobjs=
33671U=
33672for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33673  # 1. Remove the extension, and $U if already installed.
33674  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33675  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33676  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33677  #    will be set to the directory where LIBOBJS objects are built.
33678  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33679  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33680done
33681LIBOBJS=$ac_libobjs
33682
33683LTLIBOBJS=$ac_ltlibobjs
33684
33685
33686
33687: "${CONFIG_STATUS=./config.status}"
33688ac_write_fail=0
33689ac_clean_files_save=$ac_clean_files
33690ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33691{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33692$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33693as_write_fail=0
33694cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33695#! $SHELL
33696# Generated by $as_me.
33697# Run this file to recreate the current configuration.
33698# Compiler output produced by configure, useful for debugging
33699# configure, is in config.log if it exists.
33700
33701debug=false
33702ac_cs_recheck=false
33703ac_cs_silent=false
33704
33705SHELL=\${CONFIG_SHELL-$SHELL}
33706export SHELL
33707_ASEOF
33708cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33709## -------------------- ##
33710## M4sh Initialization. ##
33711## -------------------- ##
33712
33713# Be more Bourne compatible
33714DUALCASE=1; export DUALCASE # for MKS sh
33715if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33716  emulate sh
33717  NULLCMD=:
33718  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33719  # is contrary to our usage.  Disable this feature.
33720  alias -g '${1+"$@"}'='"$@"'
33721  setopt NO_GLOB_SUBST
33722else
33723  case `(set -o) 2>/dev/null` in #(
33724  *posix*) :
33725    set -o posix ;; #(
33726  *) :
33727     ;;
33728esac
33729fi
33730
33731
33732as_nl='
33733'
33734export as_nl
33735# Printing a long string crashes Solaris 7 /usr/bin/printf.
33736as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33737as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33738as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33739# Prefer a ksh shell builtin over an external printf program on Solaris,
33740# but without wasting forks for bash or zsh.
33741if test -z "$BASH_VERSION$ZSH_VERSION" \
33742    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33743  as_echo='print -r --'
33744  as_echo_n='print -rn --'
33745elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33746  as_echo='printf %s\n'
33747  as_echo_n='printf %s'
33748else
33749  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33750    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33751    as_echo_n='/usr/ucb/echo -n'
33752  else
33753    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33754    as_echo_n_body='eval
33755      arg=$1;
33756      case $arg in #(
33757      *"$as_nl"*)
33758	expr "X$arg" : "X\\(.*\\)$as_nl";
33759	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33760      esac;
33761      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33762    '
33763    export as_echo_n_body
33764    as_echo_n='sh -c $as_echo_n_body as_echo'
33765  fi
33766  export as_echo_body
33767  as_echo='sh -c $as_echo_body as_echo'
33768fi
33769
33770# The user is always right.
33771if test "${PATH_SEPARATOR+set}" != set; then
33772  PATH_SEPARATOR=:
33773  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33774    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33775      PATH_SEPARATOR=';'
33776  }
33777fi
33778
33779
33780# IFS
33781# We need space, tab and new line, in precisely that order.  Quoting is
33782# there to prevent editors from complaining about space-tab.
33783# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33784# splitting by setting IFS to empty value.)
33785IFS=" ""	$as_nl"
33786
33787# Find who we are.  Look in the path if we contain no directory separator.
33788as_myself=
33789case $0 in #((
33790  *[\\/]* ) as_myself=$0 ;;
33791  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33792for as_dir in $PATH
33793do
33794  IFS=$as_save_IFS
33795  test -z "$as_dir" && as_dir=.
33796    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33797  done
33798IFS=$as_save_IFS
33799
33800     ;;
33801esac
33802# We did not find ourselves, most probably we were run as `sh COMMAND'
33803# in which case we are not to be found in the path.
33804if test "x$as_myself" = x; then
33805  as_myself=$0
33806fi
33807if test ! -f "$as_myself"; then
33808  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33809  exit 1
33810fi
33811
33812# Unset variables that we do not need and which cause bugs (e.g. in
33813# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33814# suppresses any "Segmentation fault" message there.  '((' could
33815# trigger a bug in pdksh 5.2.14.
33816for as_var in BASH_ENV ENV MAIL MAILPATH
33817do eval test x\${$as_var+set} = xset \
33818  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33819done
33820PS1='$ '
33821PS2='> '
33822PS4='+ '
33823
33824# NLS nuisances.
33825LC_ALL=C
33826export LC_ALL
33827LANGUAGE=C
33828export LANGUAGE
33829
33830# CDPATH.
33831(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33832
33833
33834# as_fn_error STATUS ERROR [LINENO LOG_FD]
33835# ----------------------------------------
33836# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33837# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33838# script with STATUS, using 1 if that was 0.
33839as_fn_error ()
33840{
33841  as_status=$1; test $as_status -eq 0 && as_status=1
33842  if test "$4"; then
33843    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33844    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33845  fi
33846  $as_echo "$as_me: error: $2" >&2
33847  as_fn_exit $as_status
33848} # as_fn_error
33849
33850
33851# as_fn_set_status STATUS
33852# -----------------------
33853# Set $? to STATUS, without forking.
33854as_fn_set_status ()
33855{
33856  return $1
33857} # as_fn_set_status
33858
33859# as_fn_exit STATUS
33860# -----------------
33861# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33862as_fn_exit ()
33863{
33864  set +e
33865  as_fn_set_status $1
33866  exit $1
33867} # as_fn_exit
33868
33869# as_fn_unset VAR
33870# ---------------
33871# Portably unset VAR.
33872as_fn_unset ()
33873{
33874  { eval $1=; unset $1;}
33875}
33876as_unset=as_fn_unset
33877# as_fn_append VAR VALUE
33878# ----------------------
33879# Append the text in VALUE to the end of the definition contained in VAR. Take
33880# advantage of any shell optimizations that allow amortized linear growth over
33881# repeated appends, instead of the typical quadratic growth present in naive
33882# implementations.
33883if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33884  eval 'as_fn_append ()
33885  {
33886    eval $1+=\$2
33887  }'
33888else
33889  as_fn_append ()
33890  {
33891    eval $1=\$$1\$2
33892  }
33893fi # as_fn_append
33894
33895# as_fn_arith ARG...
33896# ------------------
33897# Perform arithmetic evaluation on the ARGs, and store the result in the
33898# global $as_val. Take advantage of shells that can avoid forks. The arguments
33899# must be portable across $(()) and expr.
33900if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33901  eval 'as_fn_arith ()
33902  {
33903    as_val=$(( $* ))
33904  }'
33905else
33906  as_fn_arith ()
33907  {
33908    as_val=`expr "$@" || test $? -eq 1`
33909  }
33910fi # as_fn_arith
33911
33912
33913if expr a : '\(a\)' >/dev/null 2>&1 &&
33914   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33915  as_expr=expr
33916else
33917  as_expr=false
33918fi
33919
33920if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33921  as_basename=basename
33922else
33923  as_basename=false
33924fi
33925
33926if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33927  as_dirname=dirname
33928else
33929  as_dirname=false
33930fi
33931
33932as_me=`$as_basename -- "$0" ||
33933$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33934	 X"$0" : 'X\(//\)$' \| \
33935	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33936$as_echo X/"$0" |
33937    sed '/^.*\/\([^/][^/]*\)\/*$/{
33938	    s//\1/
33939	    q
33940	  }
33941	  /^X\/\(\/\/\)$/{
33942	    s//\1/
33943	    q
33944	  }
33945	  /^X\/\(\/\).*/{
33946	    s//\1/
33947	    q
33948	  }
33949	  s/.*/./; q'`
33950
33951# Avoid depending upon Character Ranges.
33952as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33953as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33954as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33955as_cr_digits='0123456789'
33956as_cr_alnum=$as_cr_Letters$as_cr_digits
33957
33958ECHO_C= ECHO_N= ECHO_T=
33959case `echo -n x` in #(((((
33960-n*)
33961  case `echo 'xy\c'` in
33962  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33963  xy)  ECHO_C='\c';;
33964  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33965       ECHO_T='	';;
33966  esac;;
33967*)
33968  ECHO_N='-n';;
33969esac
33970
33971rm -f conf$$ conf$$.exe conf$$.file
33972if test -d conf$$.dir; then
33973  rm -f conf$$.dir/conf$$.file
33974else
33975  rm -f conf$$.dir
33976  mkdir conf$$.dir 2>/dev/null
33977fi
33978if (echo >conf$$.file) 2>/dev/null; then
33979  if ln -s conf$$.file conf$$ 2>/dev/null; then
33980    as_ln_s='ln -s'
33981    # ... but there are two gotchas:
33982    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33983    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33984    # In both cases, we have to default to `cp -p'.
33985    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33986      as_ln_s='cp -p'
33987  elif ln conf$$.file conf$$ 2>/dev/null; then
33988    as_ln_s=ln
33989  else
33990    as_ln_s='cp -p'
33991  fi
33992else
33993  as_ln_s='cp -p'
33994fi
33995rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33996rmdir conf$$.dir 2>/dev/null
33997
33998
33999# as_fn_mkdir_p
34000# -------------
34001# Create "$as_dir" as a directory, including parents if necessary.
34002as_fn_mkdir_p ()
34003{
34004
34005  case $as_dir in #(
34006  -*) as_dir=./$as_dir;;
34007  esac
34008  test -d "$as_dir" || eval $as_mkdir_p || {
34009    as_dirs=
34010    while :; do
34011      case $as_dir in #(
34012      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34013      *) as_qdir=$as_dir;;
34014      esac
34015      as_dirs="'$as_qdir' $as_dirs"
34016      as_dir=`$as_dirname -- "$as_dir" ||
34017$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34018	 X"$as_dir" : 'X\(//\)[^/]' \| \
34019	 X"$as_dir" : 'X\(//\)$' \| \
34020	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34021$as_echo X"$as_dir" |
34022    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34023	    s//\1/
34024	    q
34025	  }
34026	  /^X\(\/\/\)[^/].*/{
34027	    s//\1/
34028	    q
34029	  }
34030	  /^X\(\/\/\)$/{
34031	    s//\1/
34032	    q
34033	  }
34034	  /^X\(\/\).*/{
34035	    s//\1/
34036	    q
34037	  }
34038	  s/.*/./; q'`
34039      test -d "$as_dir" && break
34040    done
34041    test -z "$as_dirs" || eval "mkdir $as_dirs"
34042  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34043
34044
34045} # as_fn_mkdir_p
34046if mkdir -p . 2>/dev/null; then
34047  as_mkdir_p='mkdir -p "$as_dir"'
34048else
34049  test -d ./-p && rmdir ./-p
34050  as_mkdir_p=false
34051fi
34052
34053if test -x / >/dev/null 2>&1; then
34054  as_test_x='test -x'
34055else
34056  if ls -dL / >/dev/null 2>&1; then
34057    as_ls_L_option=L
34058  else
34059    as_ls_L_option=
34060  fi
34061  as_test_x='
34062    eval sh -c '\''
34063      if test -d "$1"; then
34064	test -d "$1/.";
34065      else
34066	case $1 in #(
34067	-*)set "./$1";;
34068	esac;
34069	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
34070	???[sx]*):;;*)false;;esac;fi
34071    '\'' sh
34072  '
34073fi
34074as_executable_p=$as_test_x
34075
34076# Sed expression to map a string onto a valid CPP name.
34077as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34078
34079# Sed expression to map a string onto a valid variable name.
34080as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34081
34082
34083exec 6>&1
34084## ----------------------------------- ##
34085## Main body of $CONFIG_STATUS script. ##
34086## ----------------------------------- ##
34087_ASEOF
34088test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34089
34090cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34091# Save the log message, to keep $0 and so on meaningful, and to
34092# report actual input values of CONFIG_FILES etc. instead of their
34093# values after options handling.
34094ac_log="
34095This file was extended by OpenJDK $as_me jdk8, which was
34096generated by GNU Autoconf 2.68.  Invocation command line was
34097
34098  CONFIG_FILES    = $CONFIG_FILES
34099  CONFIG_HEADERS  = $CONFIG_HEADERS
34100  CONFIG_LINKS    = $CONFIG_LINKS
34101  CONFIG_COMMANDS = $CONFIG_COMMANDS
34102  $ $0 $@
34103
34104on `(hostname || uname -n) 2>/dev/null | sed 1q`
34105"
34106
34107_ACEOF
34108
34109case $ac_config_files in *"
34110"*) set x $ac_config_files; shift; ac_config_files=$*;;
34111esac
34112
34113case $ac_config_headers in *"
34114"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34115esac
34116
34117
34118cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34119# Files that config.status was made for.
34120config_files="$ac_config_files"
34121config_headers="$ac_config_headers"
34122
34123_ACEOF
34124
34125cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34126ac_cs_usage="\
34127\`$as_me' instantiates files and other configuration actions
34128from templates according to the current configuration.  Unless the files
34129and actions are specified as TAGs, all are instantiated by default.
34130
34131Usage: $0 [OPTION]... [TAG]...
34132
34133  -h, --help       print this help, then exit
34134  -V, --version    print version number and configuration settings, then exit
34135      --config     print configuration, then exit
34136  -q, --quiet, --silent
34137                   do not print progress messages
34138  -d, --debug      don't remove temporary files
34139      --recheck    update $as_me by reconfiguring in the same conditions
34140      --file=FILE[:TEMPLATE]
34141                   instantiate the configuration file FILE
34142      --header=FILE[:TEMPLATE]
34143                   instantiate the configuration header FILE
34144
34145Configuration files:
34146$config_files
34147
34148Configuration headers:
34149$config_headers
34150
34151Report bugs to <build-dev@openjdk.java.net>.
34152OpenJDK home page: <http://openjdk.java.net>."
34153
34154_ACEOF
34155cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34156ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34157ac_cs_version="\\
34158OpenJDK config.status jdk8
34159configured by $0, generated by GNU Autoconf 2.68,
34160  with options \\"\$ac_cs_config\\"
34161
34162Copyright (C) 2010 Free Software Foundation, Inc.
34163This config.status script is free software; the Free Software Foundation
34164gives unlimited permission to copy, distribute and modify it."
34165
34166ac_pwd='$ac_pwd'
34167srcdir='$srcdir'
34168AWK='$AWK'
34169test -n "\$AWK" || AWK=awk
34170_ACEOF
34171
34172cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34173# The default lists apply if the user does not specify any file.
34174ac_need_defaults=:
34175while test $# != 0
34176do
34177  case $1 in
34178  --*=?*)
34179    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34180    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34181    ac_shift=:
34182    ;;
34183  --*=)
34184    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34185    ac_optarg=
34186    ac_shift=:
34187    ;;
34188  *)
34189    ac_option=$1
34190    ac_optarg=$2
34191    ac_shift=shift
34192    ;;
34193  esac
34194
34195  case $ac_option in
34196  # Handling of the options.
34197  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34198    ac_cs_recheck=: ;;
34199  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34200    $as_echo "$ac_cs_version"; exit ;;
34201  --config | --confi | --conf | --con | --co | --c )
34202    $as_echo "$ac_cs_config"; exit ;;
34203  --debug | --debu | --deb | --de | --d | -d )
34204    debug=: ;;
34205  --file | --fil | --fi | --f )
34206    $ac_shift
34207    case $ac_optarg in
34208    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34209    '') as_fn_error $? "missing file argument" ;;
34210    esac
34211    as_fn_append CONFIG_FILES " '$ac_optarg'"
34212    ac_need_defaults=false;;
34213  --header | --heade | --head | --hea )
34214    $ac_shift
34215    case $ac_optarg in
34216    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34217    esac
34218    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34219    ac_need_defaults=false;;
34220  --he | --h)
34221    # Conflict between --help and --header
34222    as_fn_error $? "ambiguous option: \`$1'
34223Try \`$0 --help' for more information.";;
34224  --help | --hel | -h )
34225    $as_echo "$ac_cs_usage"; exit ;;
34226  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34227  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34228    ac_cs_silent=: ;;
34229
34230  # This is an error.
34231  -*) as_fn_error $? "unrecognized option: \`$1'
34232Try \`$0 --help' for more information." ;;
34233
34234  *) as_fn_append ac_config_targets " $1"
34235     ac_need_defaults=false ;;
34236
34237  esac
34238  shift
34239done
34240
34241ac_configure_extra_args=
34242
34243if $ac_cs_silent; then
34244  exec 6>/dev/null
34245  ac_configure_extra_args="$ac_configure_extra_args --silent"
34246fi
34247
34248_ACEOF
34249cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34250if \$ac_cs_recheck; then
34251  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34252  shift
34253  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34254  CONFIG_SHELL='$SHELL'
34255  export CONFIG_SHELL
34256  exec "\$@"
34257fi
34258
34259_ACEOF
34260cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34261exec 5>>config.log
34262{
34263  echo
34264  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34265## Running $as_me. ##
34266_ASBOX
34267  $as_echo "$ac_log"
34268} >&5
34269
34270_ACEOF
34271cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34272_ACEOF
34273
34274cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34275
34276# Handling of arguments.
34277for ac_config_target in $ac_config_targets
34278do
34279  case $ac_config_target in
34280    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34281    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34282    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34283    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34284    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34285    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34286    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34287
34288  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34289  esac
34290done
34291
34292
34293# If the user did not use the arguments to specify the items to instantiate,
34294# then the envvar interface is used.  Set only those that are not.
34295# We use the long form for the default assignment because of an extremely
34296# bizarre bug on SunOS 4.1.3.
34297if $ac_need_defaults; then
34298  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34299  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34300fi
34301
34302# Have a temporary directory for convenience.  Make it in the build tree
34303# simply because there is no reason against having it here, and in addition,
34304# creating and moving files from /tmp can sometimes cause problems.
34305# Hook for its removal unless debugging.
34306# Note that there is a small window in which the directory will not be cleaned:
34307# after its creation but before its name has been assigned to `$tmp'.
34308$debug ||
34309{
34310  tmp= ac_tmp=
34311  trap 'exit_status=$?
34312  : "${ac_tmp:=$tmp}"
34313  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34314' 0
34315  trap 'as_fn_exit 1' 1 2 13 15
34316}
34317# Create a (secure) tmp directory for tmp files.
34318
34319{
34320  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34321  test -d "$tmp"
34322}  ||
34323{
34324  tmp=./conf$$-$RANDOM
34325  (umask 077 && mkdir "$tmp")
34326} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34327ac_tmp=$tmp
34328
34329# Set up the scripts for CONFIG_FILES section.
34330# No need to generate them if there are no CONFIG_FILES.
34331# This happens for instance with `./config.status config.h'.
34332if test -n "$CONFIG_FILES"; then
34333
34334
34335ac_cr=`echo X | tr X '\015'`
34336# On cygwin, bash can eat \r inside `` if the user requested igncr.
34337# But we know of no other shell where ac_cr would be empty at this
34338# point, so we can use a bashism as a fallback.
34339if test "x$ac_cr" = x; then
34340  eval ac_cr=\$\'\\r\'
34341fi
34342ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34343if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34344  ac_cs_awk_cr='\\r'
34345else
34346  ac_cs_awk_cr=$ac_cr
34347fi
34348
34349echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34350_ACEOF
34351
34352
34353{
34354  echo "cat >conf$$subs.awk <<_ACEOF" &&
34355  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34356  echo "_ACEOF"
34357} >conf$$subs.sh ||
34358  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34359ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34360ac_delim='%!_!# '
34361for ac_last_try in false false false false false :; do
34362  . ./conf$$subs.sh ||
34363    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34364
34365  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34366  if test $ac_delim_n = $ac_delim_num; then
34367    break
34368  elif $ac_last_try; then
34369    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34370  else
34371    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34372  fi
34373done
34374rm -f conf$$subs.sh
34375
34376cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34377cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34378_ACEOF
34379sed -n '
34380h
34381s/^/S["/; s/!.*/"]=/
34382p
34383g
34384s/^[^!]*!//
34385:repl
34386t repl
34387s/'"$ac_delim"'$//
34388t delim
34389:nl
34390h
34391s/\(.\{148\}\)..*/\1/
34392t more1
34393s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34394p
34395n
34396b repl
34397:more1
34398s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34399p
34400g
34401s/.\{148\}//
34402t nl
34403:delim
34404h
34405s/\(.\{148\}\)..*/\1/
34406t more2
34407s/["\\]/\\&/g; s/^/"/; s/$/"/
34408p
34409b
34410:more2
34411s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34412p
34413g
34414s/.\{148\}//
34415t delim
34416' <conf$$subs.awk | sed '
34417/^[^""]/{
34418  N
34419  s/\n//
34420}
34421' >>$CONFIG_STATUS || ac_write_fail=1
34422rm -f conf$$subs.awk
34423cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34424_ACAWK
34425cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34426  for (key in S) S_is_set[key] = 1
34427  FS = ""
34428
34429}
34430{
34431  line = $ 0
34432  nfields = split(line, field, "@")
34433  substed = 0
34434  len = length(field[1])
34435  for (i = 2; i < nfields; i++) {
34436    key = field[i]
34437    keylen = length(key)
34438    if (S_is_set[key]) {
34439      value = S[key]
34440      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34441      len += length(value) + length(field[++i])
34442      substed = 1
34443    } else
34444      len += 1 + keylen
34445  }
34446
34447  print line
34448}
34449
34450_ACAWK
34451_ACEOF
34452cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34453if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34454  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34455else
34456  cat
34457fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34458  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34459_ACEOF
34460
34461# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34462# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34463# trailing colons and then remove the whole line if VPATH becomes empty
34464# (actually we leave an empty line to preserve line numbers).
34465if test "x$srcdir" = x.; then
34466  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34467h
34468s///
34469s/^/:/
34470s/[	 ]*$/:/
34471s/:\$(srcdir):/:/g
34472s/:\${srcdir}:/:/g
34473s/:@srcdir@:/:/g
34474s/^:*//
34475s/:*$//
34476x
34477s/\(=[	 ]*\).*/\1/
34478G
34479s/\n//
34480s/^[^=]*=[	 ]*$//
34481}'
34482fi
34483
34484cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34485fi # test -n "$CONFIG_FILES"
34486
34487# Set up the scripts for CONFIG_HEADERS section.
34488# No need to generate them if there are no CONFIG_HEADERS.
34489# This happens for instance with `./config.status Makefile'.
34490if test -n "$CONFIG_HEADERS"; then
34491cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34492BEGIN {
34493_ACEOF
34494
34495# Transform confdefs.h into an awk script `defines.awk', embedded as
34496# here-document in config.status, that substitutes the proper values into
34497# config.h.in to produce config.h.
34498
34499# Create a delimiter string that does not exist in confdefs.h, to ease
34500# handling of long lines.
34501ac_delim='%!_!# '
34502for ac_last_try in false false :; do
34503  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34504  if test -z "$ac_tt"; then
34505    break
34506  elif $ac_last_try; then
34507    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34508  else
34509    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34510  fi
34511done
34512
34513# For the awk script, D is an array of macro values keyed by name,
34514# likewise P contains macro parameters if any.  Preserve backslash
34515# newline sequences.
34516
34517ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34518sed -n '
34519s/.\{148\}/&'"$ac_delim"'/g
34520t rset
34521:rset
34522s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34523t def
34524d
34525:def
34526s/\\$//
34527t bsnl
34528s/["\\]/\\&/g
34529s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34530D["\1"]=" \3"/p
34531s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34532d
34533:bsnl
34534s/["\\]/\\&/g
34535s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34536D["\1"]=" \3\\\\\\n"\\/p
34537t cont
34538s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34539t cont
34540d
34541:cont
34542n
34543s/.\{148\}/&'"$ac_delim"'/g
34544t clear
34545:clear
34546s/\\$//
34547t bsnlc
34548s/["\\]/\\&/g; s/^/"/; s/$/"/p
34549d
34550:bsnlc
34551s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34552b cont
34553' <confdefs.h | sed '
34554s/'"$ac_delim"'/"\\\
34555"/g' >>$CONFIG_STATUS || ac_write_fail=1
34556
34557cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34558  for (key in D) D_is_set[key] = 1
34559  FS = ""
34560}
34561/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34562  line = \$ 0
34563  split(line, arg, " ")
34564  if (arg[1] == "#") {
34565    defundef = arg[2]
34566    mac1 = arg[3]
34567  } else {
34568    defundef = substr(arg[1], 2)
34569    mac1 = arg[2]
34570  }
34571  split(mac1, mac2, "(") #)
34572  macro = mac2[1]
34573  prefix = substr(line, 1, index(line, defundef) - 1)
34574  if (D_is_set[macro]) {
34575    # Preserve the white space surrounding the "#".
34576    print prefix "define", macro P[macro] D[macro]
34577    next
34578  } else {
34579    # Replace #undef with comments.  This is necessary, for example,
34580    # in the case of _POSIX_SOURCE, which is predefined and required
34581    # on some systems where configure will not decide to define it.
34582    if (defundef == "undef") {
34583      print "/*", prefix defundef, macro, "*/"
34584      next
34585    }
34586  }
34587}
34588{ print }
34589_ACAWK
34590_ACEOF
34591cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34592  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34593fi # test -n "$CONFIG_HEADERS"
34594
34595
34596eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34597shift
34598for ac_tag
34599do
34600  case $ac_tag in
34601  :[FHLC]) ac_mode=$ac_tag; continue;;
34602  esac
34603  case $ac_mode$ac_tag in
34604  :[FHL]*:*);;
34605  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34606  :[FH]-) ac_tag=-:-;;
34607  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34608  esac
34609  ac_save_IFS=$IFS
34610  IFS=:
34611  set x $ac_tag
34612  IFS=$ac_save_IFS
34613  shift
34614  ac_file=$1
34615  shift
34616
34617  case $ac_mode in
34618  :L) ac_source=$1;;
34619  :[FH])
34620    ac_file_inputs=
34621    for ac_f
34622    do
34623      case $ac_f in
34624      -) ac_f="$ac_tmp/stdin";;
34625      *) # Look for the file first in the build tree, then in the source tree
34626	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34627	 # because $ac_f cannot contain `:'.
34628	 test -f "$ac_f" ||
34629	   case $ac_f in
34630	   [\\/$]*) false;;
34631	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34632	   esac ||
34633	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34634      esac
34635      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34636      as_fn_append ac_file_inputs " '$ac_f'"
34637    done
34638
34639    # Let's still pretend it is `configure' which instantiates (i.e., don't
34640    # use $as_me), people would be surprised to read:
34641    #    /* config.h.  Generated by config.status.  */
34642    configure_input='Generated from '`
34643	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34644	`' by configure.'
34645    if test x"$ac_file" != x-; then
34646      configure_input="$ac_file.  $configure_input"
34647      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34648$as_echo "$as_me: creating $ac_file" >&6;}
34649    fi
34650    # Neutralize special characters interpreted by sed in replacement strings.
34651    case $configure_input in #(
34652    *\&* | *\|* | *\\* )
34653       ac_sed_conf_input=`$as_echo "$configure_input" |
34654       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34655    *) ac_sed_conf_input=$configure_input;;
34656    esac
34657
34658    case $ac_tag in
34659    *:-:* | *:-) cat >"$ac_tmp/stdin" \
34660      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34661    esac
34662    ;;
34663  esac
34664
34665  ac_dir=`$as_dirname -- "$ac_file" ||
34666$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34667	 X"$ac_file" : 'X\(//\)[^/]' \| \
34668	 X"$ac_file" : 'X\(//\)$' \| \
34669	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34670$as_echo X"$ac_file" |
34671    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34672	    s//\1/
34673	    q
34674	  }
34675	  /^X\(\/\/\)[^/].*/{
34676	    s//\1/
34677	    q
34678	  }
34679	  /^X\(\/\/\)$/{
34680	    s//\1/
34681	    q
34682	  }
34683	  /^X\(\/\).*/{
34684	    s//\1/
34685	    q
34686	  }
34687	  s/.*/./; q'`
34688  as_dir="$ac_dir"; as_fn_mkdir_p
34689  ac_builddir=.
34690
34691case "$ac_dir" in
34692.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34693*)
34694  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34695  # A ".." for each directory in $ac_dir_suffix.
34696  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34697  case $ac_top_builddir_sub in
34698  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34699  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34700  esac ;;
34701esac
34702ac_abs_top_builddir=$ac_pwd
34703ac_abs_builddir=$ac_pwd$ac_dir_suffix
34704# for backward compatibility:
34705ac_top_builddir=$ac_top_build_prefix
34706
34707case $srcdir in
34708  .)  # We are building in place.
34709    ac_srcdir=.
34710    ac_top_srcdir=$ac_top_builddir_sub
34711    ac_abs_top_srcdir=$ac_pwd ;;
34712  [\\/]* | ?:[\\/]* )  # Absolute name.
34713    ac_srcdir=$srcdir$ac_dir_suffix;
34714    ac_top_srcdir=$srcdir
34715    ac_abs_top_srcdir=$srcdir ;;
34716  *) # Relative name.
34717    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34718    ac_top_srcdir=$ac_top_build_prefix$srcdir
34719    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34720esac
34721ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34722
34723
34724  case $ac_mode in
34725  :F)
34726  #
34727  # CONFIG_FILE
34728  #
34729
34730_ACEOF
34731
34732cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34733# If the template does not know about datarootdir, expand it.
34734# FIXME: This hack should be removed a few years after 2.60.
34735ac_datarootdir_hack=; ac_datarootdir_seen=
34736ac_sed_dataroot='
34737/datarootdir/ {
34738  p
34739  q
34740}
34741/@datadir@/p
34742/@docdir@/p
34743/@infodir@/p
34744/@localedir@/p
34745/@mandir@/p'
34746case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34747*datarootdir*) ac_datarootdir_seen=yes;;
34748*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34749  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34750$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34751_ACEOF
34752cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34753  ac_datarootdir_hack='
34754  s&@datadir@&$datadir&g
34755  s&@docdir@&$docdir&g
34756  s&@infodir@&$infodir&g
34757  s&@localedir@&$localedir&g
34758  s&@mandir@&$mandir&g
34759  s&\\\${datarootdir}&$datarootdir&g' ;;
34760esac
34761_ACEOF
34762
34763# Neutralize VPATH when `$srcdir' = `.'.
34764# Shell code in configure.ac might set extrasub.
34765# FIXME: do we really want to maintain this feature?
34766cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34767ac_sed_extra="$ac_vpsub
34768$extrasub
34769_ACEOF
34770cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34771:t
34772/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34773s|@configure_input@|$ac_sed_conf_input|;t t
34774s&@top_builddir@&$ac_top_builddir_sub&;t t
34775s&@top_build_prefix@&$ac_top_build_prefix&;t t
34776s&@srcdir@&$ac_srcdir&;t t
34777s&@abs_srcdir@&$ac_abs_srcdir&;t t
34778s&@top_srcdir@&$ac_top_srcdir&;t t
34779s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34780s&@builddir@&$ac_builddir&;t t
34781s&@abs_builddir@&$ac_abs_builddir&;t t
34782s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34783$ac_datarootdir_hack
34784"
34785eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34786  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34787
34788test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34789  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34790  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
34791      "$ac_tmp/out"`; test -z "$ac_out"; } &&
34792  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34793which seems to be undefined.  Please make sure it is defined" >&5
34794$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34795which seems to be undefined.  Please make sure it is defined" >&2;}
34796
34797  rm -f "$ac_tmp/stdin"
34798  case $ac_file in
34799  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34800  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34801  esac \
34802  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34803 ;;
34804  :H)
34805  #
34806  # CONFIG_HEADER
34807  #
34808  if test x"$ac_file" != x-; then
34809    {
34810      $as_echo "/* $configure_input  */" \
34811      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34812    } >"$ac_tmp/config.h" \
34813      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34814    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34815      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34816$as_echo "$as_me: $ac_file is unchanged" >&6;}
34817    else
34818      rm -f "$ac_file"
34819      mv "$ac_tmp/config.h" "$ac_file" \
34820	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34821    fi
34822  else
34823    $as_echo "/* $configure_input  */" \
34824      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34825      || as_fn_error $? "could not create -" "$LINENO" 5
34826  fi
34827 ;;
34828
34829
34830  esac
34831
34832done # for ac_tag
34833
34834
34835as_fn_exit 0
34836_ACEOF
34837ac_clean_files=$ac_clean_files_save
34838
34839test $ac_write_fail = 0 ||
34840  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34841
34842
34843# configure is writing to config.log, and then calls config.status.
34844# config.status does its own redirection, appending to config.log.
34845# Unfortunately, on DOS this fails, as config.log is still kept open
34846# by configure, so config.status won't be able to write to it; its
34847# output is simply discarded.  So we exec the FD to /dev/null,
34848# effectively closing config.log, so it can be properly (re)opened and
34849# appended to by config.status.  When coming back to configure, we
34850# need to make the FD available again.
34851if test "$no_create" != yes; then
34852  ac_cs_success=:
34853  ac_config_status_args=
34854  test "$silent" = yes &&
34855    ac_config_status_args="$ac_config_status_args --quiet"
34856  exec 5>/dev/null
34857  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34858  exec 5>>config.log
34859  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34860  # would make configure fail if this is the last instruction.
34861  $ac_cs_success || as_fn_exit 1
34862fi
34863if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34864  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34865$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34866fi
34867
34868
34869# Make the compare script executable
34870$CHMOD +x $OUTPUT_ROOT/compare.sh
34871
34872# Finally output some useful information to the user
34873
34874# Finally output some useful information to the user
34875
34876if test "x$CCACHE_FOUND" != x; then
34877	if  test "x$HAS_GOOD_CCACHE" = x; then
34878		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34879		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34880	else
34881		CCACHE_STATUS="installed and in use"
34882	fi
34883else
34884	if test "x$GCC" = xyes; then
34885		CCACHE_STATUS="not installed (consider installing)"
34886		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34887	else
34888		CCACHE_STATUS="not available for your system"
34889	fi
34890fi
34891
34892printf "\n"
34893printf "====================================================\n"
34894printf "A new configuration has been successfully created in\n"
34895printf "$OUTPUT_ROOT\n"
34896if test "x$CONFIGURE_COMMAND_LINE" != x; then
34897	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34898else
34899	printf "using default settings.\n"
34900fi
34901
34902printf "\n"
34903printf "Configuration summary:\n"
34904printf "* Debug level:    $DEBUG_LEVEL\n"
34905printf "* JDK variant:    $JDK_VARIANT\n"
34906printf "* JVM variants:   $with_jvm_variants\n"
34907printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34908
34909printf "\n"
34910printf "Tools summary:\n"
34911if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34912  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34913fi
34914printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34915printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34916printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34917
34918printf "\n"
34919printf "Build performance summary:\n"
34920printf "* Cores to use:   $JOBS\n"
34921printf "* Memory limit:   $MEMORY_SIZE MB\n"
34922printf "* ccache status:  $CCACHE_STATUS\n"
34923printf "\n"
34924
34925if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34926	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34927	printf "$CCACHE_HELP_MSG\n"
34928
34929    # Print a helpful message on how to acquire the necessary build dependency.
34930    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34931    MISSING_DEPENDENCY=ccache
34932    PKGHANDLER_COMMAND=
34933
34934    case $PKGHANDLER in
34935	apt-get)
34936                apt_help     $MISSING_DEPENDENCY ;;
34937    yum)
34938                yum_help     $MISSING_DEPENDENCY ;;
34939	port)
34940                port_help    $MISSING_DEPENDENCY ;;
34941	pkgutil)
34942                pkgutil_help $MISSING_DEPENDENCY ;;
34943	pkgadd)
34944                pkgadd_help  $MISSING_DEPENDENCY ;;
34945    * )
34946      break ;;
34947    esac
34948
34949    if test "x$PKGHANDLER_COMMAND" != x; then
34950        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34951    fi
34952
34953	printf "$HELP_MSG\n"
34954	printf "\n"
34955fi
34956
34957if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34958	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34959	printf "will result in longer build times.\n"
34960	printf "\n"
34961fi
34962
34963if test "x$FOUND_ALT_VARIABLES" != "x"; then
34964	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34965	printf "These are not respected, and will be ignored. It is recommended\n"
34966	printf "that you clean your environment. The following variables are set:\n"
34967	printf "$FOUND_ALT_VARIABLES\n"
34968	printf "\n"
34969fi
34970
34971if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34972	printf "WARNING: Your build output directory is not on a local disk.\n"
34973	printf "This will severely degrade build performance!\n"
34974	printf "It is recommended that you create an output directory on a local disk,\n"
34975	printf "and run the configure script again from that directory.\n"
34976	printf "\n"
34977fi
34978
34979if test "x$IS_RECONFIGURE" = "xyes"; then
34980	printf "WARNING: The result of this configuration has overridden an older\n"
34981	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34982	printf "proper build. Failure to do so might result in strange build problems.\n"
34983	printf "\n"
34984fi
34985
34986